nspcc-dev / neofs-contract

NeoFS smart-contract
Other
9 stars 17 forks source link

Serve binary contracts as a Go package from this repository #384

Closed roman-khimov closed 2 weeks ago

roman-khimov commented 6 months ago

Is your feature request related to a problem? Please describe.

I'm always frustrated when I'm updating contracts in the node repository, you need to grab some NEFs, unpack them in a proper way, see how deploy sequence/parameters/witnesses have changed. Then you need to update bindings (regular go dependency). Then check to see if it works at all.

Sometimes we change things related to deployment and while it's trivial to do here, this then requires adjustments on the node side. These adjustments are not always immediately obvious and usually people don't think about them when changing contracts. There is often a time gap between contract changes and node update, big enough for people to forget some details. We also want to solve #381 ideally.

Describe the solution you'd like

Move NEFs here, make a Go package with them. Ideally, also move the minimal proper deployment code into this package for #381. Then contract update would just be a matter of Go dependency upgrade for the node. If there any new contracts -- OK, they're handled here. If there is an updated sequence -- OK, it's handled here. If there are some additional parameters needed -- OK, we track them here and modify corresponding code along with contract modifications.

Describe alternatives you've considered

I know we have discussed it, the alternative is basically to leave things as is. This keeps the repository clean and allows to concentrate on contracts, but at the same time adds somewhat more overhead for node integration.