Commit Graph

313 Commits (2ee2344e5f97b7261c0e4855720b7eb2b70d5c84)

Author SHA1 Message Date
alexvanin 2efabc95c2 Check tx hash in notification assert
To compile contract in test environment there are
two more mocks for GetScriptContainer and GetHash
interops.
2020-06-15 13:32:13 +03:00
alexvanin 19db32b654 Add tx hash for "Deposit" and "Withdraw" notifications
As the user can invoke several deposit or withdraw calls
inner ring nodes should be able to differ them even if they
have the same arguments. To do that neofs-contract notifies
about tx hash, which can be used as unique identifier of
withdraw or deposit operation.
2020-06-15 13:32:13 +03:00
alexvanin 2f3cfee6ae Update neo-go library to v0.75.0
This commit updates neo-go library and adds notification
check for "Deposit", "Withdraw" and "Cheque" methods.
2020-06-15 13:32:13 +03:00
alexvanin 893de17372 Update tests for new withdraw mechanism 2020-06-15 13:32:13 +03:00
alexvanin cb00b6133e Update withdraw mechanism
Withdraw operation works a bit different with neo:morph.
User calls "Deposit" and "Withdraw" methods that produce
notifications for the inner ring nodes.

"Deposit" method does not produce feedback, but "Withdraw"
does. Inner ring nodes check if user eligible to withdraw
assets. If so, nodes invoke "Cheque" method. This method
collects invocations from inner ring nods. When there are
2/3n + 1 invocations, smart-contract transfers assets back
to the user and produces notifications.
2020-06-15 13:32:13 +03:00
alexvanin 88e73a04d7 Remove inner ring update test
This test runs in neofs-node repository because it uses internal
neofs-node structures. It will be reworked later.
2020-06-15 13:32:13 +03:00
alexvanin 4fbfa1bc98 Collect "InnerRingUpdate" calls from inner ring nodes
Inner ring nodes do not collect signatures for the cheque now.
Instead they invoke "InnerRingUpdate" method and smart-contract
checks if method was called from inner ring node. Then it
accepts cheque if there were 2/3n+1 invokes.
2020-06-15 13:32:13 +03:00
alexvanin 78b8af8f83 Do not store multiaddress of inner ring nodes
With neo:morph environment, there will be no direct communication
between inner ring nodes and storage nodes. neo:morph smart-contracts
will identify inner ring nodes by their signatures.
2020-06-15 13:32:13 +03:00
alexvanin 9f33939dee Add "IsInnerRing" method
Inner ring nodes check their presence in inner ring list during
startup. "IsInnerRing" method allows to check presence efficiently
by calling this method.
2020-06-15 13:32:13 +03:00
anastasia prasolova d97a4a9955 added yaml config for contract deployment 2020-06-09 13:52:32 +03:00
Alex Vanin 35656b0661
Merge pull request #1 from nspcc-dev/use-loop-labels
Use loop label in InnerRingUpdate call handler
2020-05-20 13:04:45 +03:00
Leonard Lyubich 9a51b508e8 Use loop label in InnerRingUpdate call handler 2020-05-20 12:38:11 +03:00
alexvanin 859c29c8df init commit 2020-04-01 19:27:29 +03:00