mirror of
https://github.com/nspcc-dev/neofs-contract.git
synced 2026-03-01 04:28:59 +00:00
Change Notary request senders and try to deduplicate main transactions in auto-deploy procedure #148
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#148
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 @cthulhu-rider on GitHub (Jul 5, 2023).
Overview
according to introduced changes, all committee members do all committee actions (such as updating the NNS contract) on their own and independently of each other. This approach was chosen to comply with the overall decentralization of the network (no one knows what state the other participant is in). In particular, this approach will be useful when committee nodes are run non-simultaneously.
if we consider (approximately) synchronous execution of a procedure on all nodes, N nodes will send N requests in total. Lets consider all transactions are semantically correct. Then only first "lucky" one will enter the blockchain while N-1 others will fail.
@AnnaShaleva mentioned pretty important disadvantage of this approach: all nodes will pay for their transaction regardless of success.
Possible solution
We can make Proxy contract to pay for such transactions. Since these will be similar main transactions, only one request will be proceeded by the Notary service.
Pros:
Cons:
P.S. we can share dynamic transaction's parts in NNS like is done for Notary role designation, but this seems pretty complex and fragile.
@AnnaShaleva commented on GitHub (Jul 5, 2023):
To clarify things a bit, this issue is mostly related to the currently implemented update procedure.
It's not exactly true. In simultaneous setup scenario current code works in the following way: N nodes will send N*N notary requests in total with N unique main transactions. This happens because we use single signature account (alphabet's one) as the first signer to construct main transaction.
I've firstly suggested to use Proxy contract instead of a single alphabet account as the first signer to reduce the number of unique main transactions (up to one unique main transaction per contract update), but as Leo mentioned, we have a problem with the rest hashable fields synchronisation between the nodes.
From the other side, if we choose some single node to start the update procedure and send initial notary request with
updatecall (the rest of the nodes will track the incoming notary requests and sign them), then the following problem occurs: we don't know how to definitely and reliably choose this single node who will send the first request so that we're 100% sure that exactly one node will init the update process for the subsequent contract.@AnnaShaleva commented on GitHub (Jul 5, 2023):
Another problem that occurs within the scope of this issue is that the usage of Proxy contract as the first signer isn't possible for deployment procedure, because there's no Proxy contract at this stage.
@roman-khimov commented on GitHub (Aug 10, 2023):
VUB = last_epoch_update_block + something (likely it'll fit into MVUBI)
nonce = epoch