Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eco balance in auto-deploy procedure #2417

Open
cthulhu-rider opened this issue Jul 5, 2023 · 3 comments
Open

Eco balance in auto-deploy procedure #2417

cthulhu-rider opened this issue Jul 5, 2023 · 3 comments
Labels
enhancement Improving existing functionality I4 No visible changes neofs-ir Inner Ring node application issues S3 Minimally significant U4 Nothing urgent

Comments

@cthulhu-rider
Copy link
Contributor

TBD ✍️

@AnnaShaleva
Copy link
Member

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:

  • All N alphabet nodes wake up and start to try to update contracts (let it be a single NNS contract for certainty)
  • Each node sends her own notary request with unique main transaction (main transactions differ in the first signer which is singlesignature account of the alphabet node), overall N unique main transactions
  • Each node receives notary request from its neighbours and answers with yet another notary request, overall amount of notary requests in this procedure is N*N
  • Notary service collects signatures for all N unique main transactions and sends all N main transactions (each of them updates single NNS contract) to the network
  • All N transactions are accepted into block. First of them is HALTed, the rest of them will FAULT, because NNS contract (as far as the rest of the contracts) requires version upgrade on each update.

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. #2416.

@AnnaShaleva
Copy link
Member

Ref. #2408.

@roman-khimov
Copy link
Member

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

Yep.

@roman-khimov roman-khimov added enhancement Improving existing functionality U4 Nothing urgent S3 Minimally significant I4 No visible changes neofs-ir Inner Ring node application issues and removed triage labels Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improving existing functionality I4 No visible changes neofs-ir Inner Ring node application issues S3 Minimally significant U4 Nothing urgent
Projects
None yet
Development

No branches or pull requests

3 participants