mirror of
https://github.com/nspcc-dev/neofs-contract.git
synced 2026-03-01 04:28:59 +00:00
Use RPC Client's Waiter functionality for auto-deploy procedure #152
Labels
No labels
I1
I2
I3
I4
S1
S2
S3
S4
U1
U2
U3
U4
alphabet
audit
balance
blocked
bug
config
container
discussion
documentation
enhancement
feature
go
good first issue
help wanted
neofs
neofsid
netmap
nns
nns
performance
proxy
question
reputation
security
task
test
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nspcc-dev/neofs-contract#152
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @AnnaShaleva on GitHub (Jul 10, 2023).
Is your feature request related to a problem? Please describe.
Current auto-deploy scheme sends notary requests with contracts deploy/update code and doesn't wait until main/fallback are accepted to chain. There are
for ; ; prm.monitor.waitForNextBlock(ctx)loops that are used to track the consequenses of the contract deploy/update.Describe the solution you'd like
I consider that we can safely get rid of
for ; ; prm.monitor.waitForNextBlock(ctx)loops, create cancellable context, subscribe for Management's Deploy/Update notifications and use waiter.Wait to wait for either main or fallback. Cancellable context may be used to cancel waiter in case if contract update happens earlier on behalf of some other notary request. I think that with Waiter this code will be clearer. There's a prototype, but it can be improved as described above: 34b1944f7bdfb4f8c8fe8831499d57483ee9ff52.The same approach can be applied to the simple GAS transfer transactions that increase notary balance for auto-deploy procedure participants.