Commit graph

17 commits

Author SHA1 Message Date
d7cb550a5e [#53] common: Use interop.Hash160 in address producing functions
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-12-06 19:47:43 +03:00
d8530284fd [#7] Remove notary disabled code
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
2023-03-14 12:09:22 +03:00
Elizaveta Chichindaeva
335b04d9a6 [#240] English Check
Signed-off-by: Elizaveta Chichindaeva <elizaveta@nspcc.ru>
2022-04-26 23:22:06 +03:00
Evgenii Stratonikov
03afb80a14 [#222] *: Replace IRNode with raw public keys
Only leave `IRNode` in neofs contract because it is public.
The newly added conversion in `AlphabetList` shouldn't be a problem
because this is a read method.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-03-23 11:33:27 +03:00
Pavel Karpy
9d0a82bc89 [#190] common: Check NeoFS role for the next block
Current height makes it impossible to change
role and make some operations in one block.
Also, it may lead to accepting some operations
that are approved by already not valid alphabet.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-12-07 11:25:58 +03:00
Alex Vanin
378e69c015 [#107] common: Check committee witness for contract update
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-09-22 11:06:48 +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
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
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
c3a7c6ad23 [#58] common: Remove unused functions
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
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
508369be75 [#25] Use go aliases
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>
2021-03-05 17:13:49 +03:00
Alex Vanin
7fbf6d73b0 [#51] proxy: Add proxy contract
Proxy contract used by notary contract as a main tx
payment provider. `Verify` function verifies if
main tx contains multisig of 5\7 inner ring
nodes. If so, then contract pays for transaction.
This is easier than support multisig wallet with
GAS assets, because inner ring can change, therefore
multisig wallet can change periodically.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-03-04 11:26:14 +03:00
Alex Vanin
27ca675869 [#47] Update contract.Call invocations
Now contract calls require call flags.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-02-11 15:31:57 +03:00
Leonard Lyubich
5d8c07b6e5 [#42] common: Replace IRNode type and InnerRingInvoker func to ir.go file
Remove empty invoke.go source file.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-02-04 10:31:24 +03:00
Leonard Lyubich
8ceba2a7c2 [#42] Share InnerRingList function between contracts
Define InnerRingList function that calls "innerRingList" method of
particular smart contract. Define InnerRingListViaStorage function
that reads address of smart contract from the storage by key, and
calls InnerRingList with the result. Reuse these functions in all
contracts.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-02-04 10:31:24 +03:00