Commit graph

313 commits

Author SHA1 Message Date
Evgenii Stratonikov
dd98bee590 [#72] Replace Init() methods with _deploy
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-05-12 16:56:52 +03:00
Alex Vanin
e4ba936f50 [#74] Log notary disabled flag at init
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-05-05 12:27:24 +03:00
Alex Vanin
2cc9c4fc66 [#74] reputation: Support notary disabled work flow
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-05-05 12:27:24 +03:00
Alex Vanin
2672e663a0 [#74] netmap: Support notary disabled work flow
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-05-05 12:27:24 +03:00
Alex Vanin
c0073266de [#74] neofsid: Support notary disabled work flow
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-05-05 12:27:24 +03:00
Alex Vanin
9cc57dcdf8 [#74] neofs: Support notary disabled work flow
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-05-05 12:27:24 +03:00
Alex Vanin
400b9bebb4 [#74] container: Support notary disabled work flow
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-05-05 12:27:24 +03:00
Alex Vanin
6e8bef671a [#74] balance: Support notary disabled work flow
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-05-05 12:27:24 +03:00
Alex Vanin
07617dd083 [#74] audit: Support notary disabled work flow
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-05-05 12:27:24 +03:00
Alex Vanin
5e22426768 [#74] alphabet: Support notary disabled work flow
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-05-05 12:27:24 +03:00
Alex Vanin
76aca4c6f5 [#74] netmap: Store inner ring node list when notary disabled
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-05-05 12:27:24 +03:00
Alex Vanin
622a83e014 [#74] Add notary disabled option to contracts
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-05-05 12:27:24 +03:00
Alex Vanin
7317388b4d [#74] Return ballot collection functions
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-05-05 12:27:24 +03:00
Alex Vanin
0dd9072ca0 [#74] Update readme file
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-05-05 12:27:24 +03:00
Alex Vanin
b387171187 [#74] proxy: Fix typo
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-05-05 12:27:24 +03:00
Alex Vanin
5372329d49 [#74] neofs: Pay withdraw fee to processing contract
Processing contracts pays for cheque that transfer
assets back to the user, so user should transfer
some fee to this contract.

Withdraw fee defined in NeoFS global configuration.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-05-05 12:27:24 +03:00
Alex Vanin
4c932ae930 [#74] processing: Add processing contract
Processing contract deployed in main chain and processes
multi signature invocations of NeoFS contract by
verifying multi signature and paying for it.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-05-05 12:27:24 +03:00
Alex Vanin
e850d4fc78 [#74] neofs: Remove unused code
All ballots and voting methods are gone. Multi signature
checks are used in all contracts.

Default global config values are also removed. Configuration
must be provided by initialization script.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-05-05 12:27:24 +03:00
Alex Vanin
086b4c632c [#74] neofs: Check alphabet multi signature and don't use ballots
Ballots are inefficient to collect invocations of contract methods.
Instead contract can check multi signature collected outside of the
contract, e.g. with notary service.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-05-05 12:27:24 +03:00
Alex Vanin
be6c280032 [#74] neofs: Add AlphabetAddress method
This method returns multi signature address of alphabet
nodes in NeoFS contract.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-05-05 12:27:24 +03:00
Alex Vanin
ef0d6f02fd [#73] neofs: Do not store cheques
Cheques increase execution costs but provide which is
quite important for main chain execution.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-04-19 17:56:37 +03:00
Alex Vanin
f884e3d665 [#68] Use unified format for transferX details
Unified format uses transfer type as the first byte
and extra details next. List of transfer types used in
contracts defined in `transfer.go`. It includes:
- mint,
- burn,
- lock,
- unlock,
- container fee.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-04-08 17:04:31 +03:00
Alex Vanin
6ff45edbc9 [#65] Do not use integer as a search prefix
Even though it is allowed to do so, it can produce
invalid search results if key is less than 10 bytes.

More at https://github.com/nspcc-dev/neo-go/issues/1873

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-04-06 10:50:00 +03:00
Alex Vanin
88a82820b8 [#65] reputation: Update reputation contract
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-04-06 10:50:00 +03:00
Alex Vanin
23f5f1e0e7 [#63] Fix threshold number calculation
`x*2/3` is not equal to `x/3*2` with integers.
The only correct way to calculate threshold is
the first one.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-03-25 21:22:27 +03:00
Alex Vanin
80eadb4e5e [#58] neofs: Allow alphabet nodes to remove candidates
When alphabet nodes update inner ring list with new candidate,
then they remove it from neofs contract.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-03-25 18:19:47 +03:00
Alex Vanin
e74d8bf48d [#58] neofs: Store alphabet keys instead of inner ring
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-03-25 18:19:47 +03:00
Alex Vanin
c3a7c6ad23 [#58] common: Remove unused functions
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-03-25 18:19:47 +03:00
Alex Vanin
7cb7b0905b [#58] netmap: Use alphabet list from chain
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-03-25 18:19:47 +03:00
Alex Vanin
24fe1573c1 [#58] proxy: Use alphabet list from chain
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-03-25 18:19:47 +03:00
Alex Vanin
766596f496 [#58] neofsid: Use alphabet list from chain
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-03-25 18:19:47 +03:00
Alex Vanin
79cff420b4 [#58] container: Use alphabet list from chain
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-03-25 18:19:47 +03:00
Alex Vanin
aa77253d6f [#58] balance: Use alphabet list from chain
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-03-25 18:19:47 +03:00
Alex Vanin
2f55ae715d [#58] audit: Use IR list from chain
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-03-25 18:19:47 +03:00
Alex Vanin
5015372135 [#58] alphabet: Use alphabet and IR lists from chain
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-03-25 18:19:47 +03:00
Alex Vanin
4ace86e9b3 [#58] common: Add getters for alphabet and IR nodes from chain
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-03-25 18:19:47 +03:00
Alex Vanin
d5e230e031 [#58] neofs: Do not limit initial inner ring key amount
Environment with single inner ring node is legal.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-03-25 18:19:47 +03:00
Alex Vanin
5e28938286 [#62] Remove methods with notifications from safe list
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-03-22 18:10:42 +03:00
Alex Vanin
a1e571cafe Update neo-go to v0.94.0
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-03-22 09:19:46 +03:00
Alex Vanin
90f26e3ffd [#61] netmap: Invoke clean up methods on new epoch
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-03-19 15:04:47 +03:00
Alex Vanin
a1f0919f98 [#61] container: Unify naming for new epoch processing functions
The same name is in network map and balance contracts.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-03-19 15:04:47 +03:00
Alex Vanin
70a593eb77 [#51] neofsid: Remove unused code
This code is not used after notary support
in #52

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-03-19 15:04:47 +03:00
Alex Vanin
44cb7ccfd8 [#25] container: Use interop.Hash160 for contract addresses
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-03-19 15:04:47 +03:00
Alex Vanin
2ef8c55562 [#60] netmap: Use interop to create multi signature account
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-03-17 14:46:06 +03:00
Alex Vanin
9d36a33b9d [#59] netmap: Update multi address generation routine
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-03-17 11:23:11 +03:00
Alex Vanin
97a5e27403 [#59] Update to pre-released version of neo-go v0.94.0
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-03-17 11:23:11 +03:00
Alex Vanin
7ba5d50fd4 [#59] proxy: Check committee address in Verify function
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>
2021-03-17 11:23:11 +03:00
Pavel Karpy
8af80e67aa [#37] Use readonly context
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>
2021-03-12 10:36:15 +03:00
Pavel Karpy
6cd0808627 [#56] netmap: Fix unsafe methods
Delete unsafe 'addPeer' method from `safemethods`
in contract config.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-03-10 14:14:47 +03:00
Pavel Karpy
d8031f8f59 [#26] balance: Update safemethods field
Add "version" to `safemethods` balance contract field.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-03-09 19:25:47 +03:00