Repackage crypto and rpcclient into modules of their own #1360

Open
opened 2025-12-28 17:16:10 +00:00 by sami · 1 comment
Owner

Originally created by @roman-khimov on GitHub (Sep 3, 2024).

I'm always frustrated when NeoGo import pulls a hell lot of dependencies into other packages. In many cases it's just to have Neo-specific crypto, some also use the RPC client. Not a lot of projects use anything else. And these don't need all of the stuff we have in go.mod.

Describe the solution you'd like

Create modules for crypto/rpcclient in a way similar to github.com/decred/dcrd/dcrec/secp256k1/v4. It requires additional tags which is not very pretty and there are gonna be some interop-style dances with updates (but replace). So it will definitely increase the maintenance burden. At the same time it'll help downstream projects.

Describe alternatives you've considered

Keep things as is. It works too.

Originally created by @roman-khimov on GitHub (Sep 3, 2024). ## Is your feature request related to a problem? Please describe. I'm always frustrated when NeoGo import pulls a hell lot of dependencies into other packages. In many cases it's just to have Neo-specific crypto, some also use the RPC client. Not a lot of projects use anything else. And these don't need all of the stuff we have in `go.mod`. ## Describe the solution you'd like Create modules for crypto/rpcclient in a way similar to github.com/decred/dcrd/dcrec/secp256k1/v4. It requires additional tags which is not very pretty and there are gonna be some interop-style dances with updates (but `replace`). So it will definitely increase the maintenance burden. At the same time it'll help downstream projects. ## Describe alternatives you've considered Keep things as is. It works too.
Author
Owner

@roman-khimov commented on GitHub (Jul 22, 2025):

Might be problematic wrt replace directive (which would be required for local crypto/client overrides), similar to #3964.

@roman-khimov commented on GitHub (Jul 22, 2025): Might be problematic wrt replace directive (which would be required for local crypto/client overrides), similar to #3964.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nspcc-dev/neo-go#1360
No description provided.