Commit graph

58 commits

Author SHA1 Message Date
Evgenii Stratonikov
da7f7eb88f [#164] *: provide version as the last argument
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-11-19 13:38:15 +03:00
Leonard Lyubich
68eac87e64 [#154] netmap: allow only alphabet calls in updateState
This reverts commit a9503b5c
2021-11-16 17:26:26 +03:00
Evgenii Stratonikov
a9503b5cf8 Revert "[#152] netmap: allow only alphabet calls in updateState"
This reverts commit e1ee1c203c.
2021-10-19 17:46:26 +03:00
Evgenii Stratonikov
81c12b3f24 Revert "[#152] netmap: allow only alphabet calls in addPeer"
This reverts commit c008910157.
2021-10-19 17:46:26 +03:00
Evgenii Stratonikov
2472678b9f [#151] netmap: fix error message in _deploy
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-10-19 13:11:53 +03:00
Evgenii Stratonikov
c5e026c6e7 [#151] netmap: allow to update config values in _deploy
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-10-19 13:11:53 +03:00
Evgenii Stratonikov
e1ee1c203c [#152] netmap: allow only alphabet calls in updateState
If notary is enabled only alphabet calls are expected.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-10-19 12:46:19 +03:00
Evgenii Stratonikov
c008910157 [#152] netmap: allow only alphabet calls in addPeer
If notary is enabled only alphabet calls are expected.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-10-19 12:46:19 +03:00
Evgenii Stratonikov
a72392f672 [#146] netmap: allow to update peer info
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-10-19 12:02:19 +03:00
Alex Vanin
6d0c5d110c [#107] Remove contract owner argument at contract deploy
Contract owner entity does exist anymore. Contract migration
now managed by side chain committee which are Alphabet nodes of
the Inner Ring.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-09-22 11:06:48 +03:00
Alex Vanin
edd4864e39 [#130] Panic at contract update failures
There is no practical cases not to panic at contract
update routine.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-09-22 09:54:52 +03:00
Alex Vanin
b555e200f4 [#128] Rename migrate methods to update
Neo Legacy used migration mechanism to update contracts.
N3 provides update method in native management contract.
Therefore, it makes sense to rename `Migrate` to `Update`.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-09-21 12:28:35 +03:00
Evgenii Stratonikov
f840afb4cc netmap: provide default configuration in _deploy
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-07-29 15:14:57 +03:00
Alex Vanin
8bd25230fa [#118] *: Encode semver in version number
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-07-29 15:01:50 +03:00
Alex Vanin
c7ed05cc2e [#112] Remove to v0.9.2 migration code
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-07-22 15:03:40 +03:00
Alex Vanin
9840f29372 [#105] netmap: Add docs
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-07-22 14:59:05 +03:00
Alex Vanin
b6b3f17cd1 [#105] *: Add doc.go files for each contract
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-07-22 14:59:05 +03:00
Alex Vanin
8b7d08cb08 [#105] *: Remove contract from package names
`contract` postfix is redundant and makes autogenerated
docs looks ugly.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-07-22 14:59:05 +03:00
Alex Vanin
787bd3b63c [#110] netmap: Store block number of last epoch
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-07-22 11:08:19 +03:00
Alex Vanin
c368eac796 [#100] netmap: Migrate netmap candidates storage
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-07-01 14:13:36 +03:00
Alex Vanin
0b04200815 [#100] netmap: Make AddPeer stable for simultaneous invocations in one block
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-07-01 14:13:36 +03:00
Alex Vanin
af21f33657 [#100] *: Use full scope in migration
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>
2021-07-01 14:13:36 +03:00
Alex Vanin
01b12bcd56 [#96] *: Specify permissions in contract manifests
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-06-24 16:16:02 +03:00
Alex Vanin
14382d701c [#94] *: Fix parameter types in notification manifest
neo-go v0.95.2+ has strict notification type checker
enabled by default.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-06-17 16:44:00 +03:00
Alex Vanin
2e2eb15729 [#88] *: Provide data in migrate method of the contracts
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-06-03 14:09:40 +03:00
Alex Vanin
8b1c8eb689 [#86] netmap: Add netmap candidate list getter
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>
2021-06-02 13:46:42 +03:00
Evgenii Stratonikov
db2b1be746 [#79] Panic instead of returning bool value
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>
2021-06-01 12:10:28 +03:00
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
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
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
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
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
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
8d8482a88e [#26] Add safemethods fields
Fill in `safemethods` fields in contract config files
with methods that do not change contract storages.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-03-09 19:25:47 +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
28a9e2842f [#51] netmap: Support notary contract
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-03-04 11:26:14 +03:00
Alex Vanin
e4ba9c6840 [#51] netmap: Add Multiaddress method
`Multiaddress` returns multisig address of
5\7 inner ring nodes.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-03-04 11:26:14 +03:00
Alex Vanin
88c738b736 [#49] Support contract migration
At initialization contract saves master script hash
that allows to re-initialize or migrate contract.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-02-12 18:33:55 +03:00
Alex Vanin
a4a9a49a76 [#49] Remove trigger check from contracts
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>
2021-02-12 18:33:55 +03:00
Alex Vanin
9cdfcd438e [#48] Add contract names
It is required field in contract config for deployment.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-02-11 15:50:01 +03:00
Alex Vanin
cff7688486 [#47] Remove legacy config records
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-02-11 15:31:57 +03:00
Alex Vanin
fd803ef639 [#47] Update iterator interface
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-02-11 15:31:57 +03:00
Leonard Lyubich
3395a886fc [#42] Share InnerRingInvoker function between contracts
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>
2021-02-04 10:31:24 +03:00