Commit graph

235 commits

Author SHA1 Message Date
Anna Shaleva
34eef47a18 native: extend CryptoLib's verifyWithECDsa with hasher parameter
Replace native CryptoLib's verifyWithECDsa `curve` parameter by
`curveHash` parameter which is a enum over supported pairs of named
curves and hash functions.

Even though this change is a compatible extension of the protocol, it
changes the genesis state due to parameter renaming. But we're going to
resync chain in 3.7 release anyway, so it's not a big deal.

Also, we need to check mainnet and testnet compatibility in case if
anyone has ever called verifyWithECDsa with 24 or 25 `curve` value.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2024-05-13 09:33:41 +03:00
Ekaterina Pavlova
1840c057bd interop: add keccak256 implementation
Port neo-project/neo#2925.

Close #3295

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-03-22 17:15:43 +03:00
Ekaterina Pavlova
e0328cc1f8 native: add getCommitteeAddress method
Port neo-project/neo#3154.

Close #3334

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
2024-03-22 16:46:59 +03:00
Anna Shaleva
13ff95a3d3 go.mod: upgrade minimum required Go version to 1.20
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2024-03-05 13:54:10 +03:00
Anna Shaleva
b35f351f0b interop: add contract storage limits
Users of NeoGo interop package may have a demand to use these limits
for custom purposes, it would be nice to have them as constants.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-27 19:56:13 +03:00
Anna Shaleva
474225d425 core, rpcsrv: apply generic attributes fee logic to NotaryServiceFeePerKey
Remove related methods from native Notary and add relevant code to native
Policy.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-21 13:42:56 +03:00
Anna Shaleva
82cb2e718d native: introduce attribute pricing
Port the https://github.com/neo-project/neo/pull/2916.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-21 13:42:56 +03:00
Anna Shaleva
406c9f8b92 core, interop: add strLen method for native StdLib contract
Close #3195.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-20 19:23:33 +03:00
Anna Shaleva
2fba04490a core: add System.Runtime.CurrentSigners syscall
Port the https://github.com/neo-project/neo/pull/2827.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-11-20 14:46:27 +03:00
Anna Shaleva
995d774ff8 *: bump minimum required go version to 1.19
For all components.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-10-12 13:28:59 +03:00
Anna Shaleva
11bb733f1a interop: support ABORTMSG, ASSERT, ASSERTMSG opcodes
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-08-10 12:41:30 +03:00
Leonard Lyubich
d90626d556 interop/util: Drop unused import
Remove no longer used import left after corresponding code removal in
4671fbb3be.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
2023-04-22 16:36:49 +04:00
ZhangTao1596
fb7fce0775 native: optimize vote reward data (fix #2844)
Signed-off-by: ZhangTao1596 <zhangtao@ngd.neo.org>
2023-04-20 17:41:14 +08:00
Anna Shaleva
d5bea0ad4c core: add Backwards option for storage iterators
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2023-04-12 16:45:38 +03:00
Roman Khimov
5322a3535b
Merge pull request #2940 from nspcc-dev/groth16
core: add BLS12_381 interops
2023-04-10 10:20:17 +03:00
Roman Khimov
e2cf5b868a
Merge pull request #2941 from nspcc-dev/drop-deprecated-0.102.0
Drop some deprecated things in 0.102.0
2023-04-06 10:42:26 +03:00
Anna Shaleva
69102a6aa3 interop: add groth16 interop API 2023-04-05 15:37:50 +03:00
Anna Shaleva
6b21ad9922 *: replace interface{} with any keyword
Everywhere including examples, external interop APIs, bindings generators
code and in other valuable places. A couple of `interface{}` usages are
intentionally left in the CHANGELOG.md, documentation and tests.
2023-04-04 13:22:42 +03:00
Anna Shaleva
856edcca39 *: bump min supported go version from 1.17 to 1.18 2023-03-31 09:59:24 +03:00
Roman Khimov
4671fbb3be interop: drop deprecated util.FromAddress
It still was used in a number of places, surprisingly.
2023-03-18 10:44:12 +03:00
Roman Khimov
cb5c18dc73 interop: add getContractByID and getContractHashes to management 2022-12-02 10:54:45 +03:00
Roman Khimov
de2de986a7 interop: add runtime.LoadScript 2022-11-25 15:11:49 +03:00
Anna Shaleva
24c107e3a2 interop: refactor address.FromHash160 code
Make it more simple.
2022-09-27 15:32:57 +03:00
Anna Shaleva
ea08a81726 interop: add CallWithVersion helper 2022-09-21 17:38:42 +03:00
Anna Shaleva
8d5f97a699 interop: adjust Iterator documentation
The only way to get Iterator is as a result of storage.Find.
2022-09-20 17:09:48 +03:00
Anna Shaleva
7e13140b04 interop: add Hash160 encoder\decoder helper
Close #2690.
2022-09-20 09:37:04 +03:00
Anna Shaleva
916f2293b8 *: apply go 1.19 formatter heuristics
And make manual corrections where needed. See the "Common mistakes
and pitfalls" section of https://tip.golang.org/doc/comment.
2022-08-09 15:37:52 +03:00
Anna Shaleva
bb751535d3 *: bump minimum supported go version
Close #2497.
2022-08-08 13:59:32 +03:00
Roman Khimov
55f910777e Revert "native/interop: revert management.hasMethod()"
This reverts commit 6c7a401f77, introducing
changes from #2598 again.
2022-07-28 17:00:34 +03:00
Roman Khimov
6c7a401f77 native/interop: revert management.hasMethod()
This reverts commits
 * f50bcf617a
 * 4f184498bc
 * ab3330564a

because they're 3.4.0-compatible while we need 3.3.1.
2022-07-27 23:26:24 +03:00
Roman Khimov
4f184498bc interop: add management.HasMethod() 2022-07-13 17:54:17 +03:00
Anna Shaleva
78e5f16573 interop: add equality helpers 2022-07-11 15:59:24 +03:00
Roman Khimov
251c9bd89b block: push PrevStateRoot data into stack item, fix #2551
And add compiler/interop support for this.
2022-07-07 15:10:29 +03:00
AnnaShaleva
d7afb7bb2f core: adjust value of P2PNotary node role 2022-06-01 15:03:29 +03:00
Anna Shaleva
d8f7d5d5b6 core: adjust Signer to stackitem conversion
Follow the https://github.com/neo-project/neo/pull/2708.
2022-05-23 14:01:42 +03:00
Anna Shaleva
e31f4ca331 interop: add interop API for MODMUL, MODPOW opcodes 2022-05-12 14:31:24 +03:00
Anna Shaleva
5123b88c36 core: extend native Neo interop API
Add GetAllCandidates and GetCandidateVote methods.
2022-05-06 13:43:12 +03:00
Anna Shaleva
5e2a81ad03 interop: fix the signature of Neo's GetCandidates interop API 2022-05-06 13:43:12 +03:00
Elizaveta Chichindaeva
28908aa3cf [#2442] English Check
Signed-off-by: Elizaveta Chichindaeva <elizaveta@nspcc.ru>
2022-05-04 19:48:27 +03:00
Anna Shaleva
441a3eb34c interop: add API for getTransactionSigners Ledger's method 2022-04-29 11:22:21 +03:00
Anna Shaleva
d942940a82 core: support System.Runtime.GetAddressVersion syscall 2022-04-21 19:26:16 +03:00
Roman Khimov
017326dca4
Merge pull request #2417 from nspcc-dev/interop-update
*: natives update
2022-04-05 19:02:59 +03:00
Anna Shaleva
16f952270c core: add murmur32 to CryptoLib native contract
Close #2415.
2022-04-05 10:46:52 +03:00
Anna Shaleva
b431e47d2a core: add GetTransactionVMState to native Ledger contract
Close #2343.
2022-04-05 10:37:02 +03:00
Roman Khimov
7b3cc27b5f LICENSE.md: add NSPCC copyright 2022-04-04 12:34:18 +03:00
Roman Khimov
3f57ff76ab interop: add a physical copy of LICENSE.md
Seems like pkg.go.dev can't pick it up from the symlink.
2022-04-04 12:32:17 +03:00
Roman Khimov
479eda6786 interop: add LICENSE.md into the package
Otherwise pkg.go.dev refuses to display the documentation.
2022-03-23 18:26:02 +03:00
Roman Khimov
d5a9af5860 Revert "Revert "interop: use All flags for management deploy and update calls""
This reverts commit 526c423a61, heading to 3.2.0.
2022-03-21 17:41:37 +03:00
Roman Khimov
526c423a61 Revert "interop: use All flags for management deploy and update calls"
This reverts commit 37ca96c20b and a part of
7945097543, we need 0.98.2 release to be
3.1.0-compatible and this one breaks the testnet.
2022-03-21 14:32:11 +03:00
AnnaShaleva
3996b3abb7 interop: extend native Notary interop API 2022-03-01 19:08:22 +03:00