As soon as migration required changes in memory, we
need bigger scope. Otherwise in requires two step migration
which is unpleasant and annoying.
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
With `NetmapCandidate` storage nodes can monitor
if they are expected to be in the netmap at next
epoch or not. This is also important for monitoring
when some nodes does not bootstrap immediately.
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
There is a number of contracts which return only `true` value.
Also handling `FAULT` on the client is easier then also checking return
value.
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
For committee operations in side chain we can't use 5\7 multi
address, instead we should use 4\7 for this case.
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
Delete initializing of R/W context in `init()`
and start using readonly storage context in
methods where it is possible.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Change []byte type to interop.*aliasName*
types in contracts where it is suitable to
improve the readability of the contracts.
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This check was useful when there was a single
entry point in contract. But right now there is
no point in this.
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
Define IRNode structure in common package. Replace innerRingInvoker function
in common package and export it. Reuse this function in all contracts.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Replace vote/remoteVotes functions from all contracts (except alphabet) to
common package. Additionally replace setSerialized and bytesEqual. Create
InitVote function and use it in NeoFS and Netmap contracts.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Create common package. Define Ballot struct in common package. Use new type
in all contracts with ballots.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Remove old ballots first so there won't be any
interference with votes of the same tx in the
future after `blockDiff` blocks.
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
There are cases when NeoFS applications need to fetch netmap
snapshot of exact epoch. This method provides convenient atomic
way to do that.
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
Sidechain contracts include alphabet contracts for governance
and audit, balance, container, neofsid, netmap, reputation
contracts.
Signed-off-by: Alex Vanin <alexey@nspcc.ru>