nspcc-dev / neofs-contract

NeoFS smart-contract
GNU General Public License v3.0
10 stars 17 forks source link

Eco balance in auto-deploy procedure #443

Open cthulhu-rider opened 1 year ago

cthulhu-rider commented 1 year ago

TBD :writing_hand:

AnnaShaleva commented 1 year ago

Contracts update during auto-deploy procedure is based on the following scenario in the worst case of simultaneouse alphabet nodes restart with fresh contract binaries:

The problem here is that each alphabet node pays for its main transaction (even if the transaction is FAULTed). As a result all N nodes will pay for all update transactions emitted for all contracts. It costs a lot and we have to wait until committee nodes will earn enough gas to start this update procedure. This scheme is very unoptimal. It would be nice if only single node could pay for a single updating transaction. It can be achieved via Proxy contract usage as signer and definite height-dependant round-robin algorithm of choosing the node that should start the update notary process.

Ref. https://github.com/nspcc-dev/neofs-node/issues/2416.

AnnaShaleva commented 1 year ago

Ref. https://github.com/nspcc-dev/neofs-node/pull/2408.

roman-khimov commented 1 year ago

Proxy contract usage as signer and definite height-dependant round-robin algorithm of choosing the node that should start the update notary process.

Yep.