Commit graph

5536 commits

Author SHA1 Message Date
Roman Khimov
f6094c8c4e neotest: use public constants for default configuration
And be more consistent about MaxTraceableBlocks use.
2022-03-23 23:11:27 +03:00
Roman Khimov
208e38803c neotest: add some high-level documentation 2022-03-23 22:48:41 +03:00
Roman Khimov
ab6fe44cab examples: add a note on tests for nft-nd-nns 2022-03-23 22:23:58 +03:00
Roman Khimov
2c70f41e51 examples: move nft-nd-nns test into the same package
Which is the way Go tests are normally stored.
2022-03-23 22:21:07 +03:00
Roman Khimov
3070c2e7fc examples: polish iterator
Use read only context where appropriate, shorten notifications, fix comment.
2022-03-23 22:05:40 +03:00
Roman Khimov
1d1b4d4c18 examples: extend iterator with more storage options 2022-03-23 22:04:17 +03:00
Roman Khimov
4c4e9c0371 examples: add something to the storage for iterator example 2022-03-23 22:02:19 +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
68c76a3307 docs: #2293 was fixed some time ago 2022-03-23 18:22:23 +03:00
Roman Khimov
26c3a6c161 examples: drop token-sale contract
It makes zero sense, it's not what it says it
is. AmountPerNEO/MaxExchangeLimitRound are not used at all to affect minting
and allowance/transferFrom features are largely obsolete. We have proper
minting implemented in NFT contracts and there is a nice NEP-17 available
also.
2022-03-23 18:22:16 +03:00
Roman Khimov
a5979f6d64 examples: add defer/recover to OnNEP17Payment handlers
Transaction must be ABORTed, exceptions are not sufficient.
2022-03-23 11:58:07 +03:00
Roman Khimov
e557da70a4
Merge pull request #2404 from nspcc-dev/fix-log-entries-with-user-input
Fix log entries with user input
2022-03-22 17:35:12 +03:00
Roman Khimov
9d5b8d606a server: quote method in logs, fix CodeQL warnings
CWE-117:
  Log entries created from user input

  If unsanitized user input is written to a log entry, a malicious user may be able to forge new log entries.
2022-03-22 16:05:06 +03:00
Roman Khimov
0a338ea94b rpc/server: register ws calls in Prometheus
They were completely missing.
2022-03-21 23:18:00 +03:00
Roman Khimov
13999252c6
Merge pull request #2403 from nspcc-dev/extend-publish
github: add ability to manually trigger publishing workflow with `latest` tag
2022-03-21 18:41:43 +03:00
Roman Khimov
7b7c2a2fbd
Merge pull request #2402 from nspcc-dev/revert-revert
Revert callflags revert
2022-03-21 18:38:00 +03:00
AnnaShaleva
f2b160444e github: add ability to manually trigger publishing workflow with latest tag
In case if something goes wrong during release version publishing.
2022-03-21 18:31:38 +03:00
Roman Khimov
0da34967f6 examples: update go.sum/go.mod in nft-nd-nns 2022-03-21 18:22:48 +03:00
Roman Khimov
3b639f518e *: update go.* for the previous change 2022-03-21 17:44:33 +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
694152098f
Merge pull request #2401 from nspcc-dev/fix-workflows
github: adjust Docker image publishing workflows
2022-03-21 16:51:29 +03:00
AnnaShaleva
d416ae336f github: adjust Docker image publishing workflows 2022-03-21 16:39:27 +03:00
Roman Khimov
abb19014e1 CHANGELOG: mention Windows! 2022-03-21 16:20:19 +03:00
Roman Khimov
66f5ae8fd9 CHANGELOG: release 0.98.2 2022-03-21 16:07:28 +03:00
Roman Khimov
3e3402e3ea
Merge pull request #2400 from nspcc-dev/revert-callflags
Revert callflags change
2022-03-21 15:25:01 +03:00
Roman Khimov
e312e2640b examples: bump neo-go version for nft-nd-nns 2022-03-21 15:09:57 +03:00
Roman Khimov
25d72db8b0 *: update go.sum/go.mod wrt previous change 2022-03-21 14:39:05 +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
Roman Khimov
ad1dd3ebb7
Merge pull request #2399 from nspcc-dev/fuzz-tests
vm: add some Fuzz tests
2022-03-21 12:00:55 +03:00
Evgeniy Stratonikov
3f65473f64 vm: add some Fuzz tests
Both `IsScriptCorrect` and `VM.Run` should never panic.

Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-03-18 16:13:39 +03:00
Roman Khimov
906d99571b
Merge pull request #2369 from nspcc-dev/goshechka
*: go 1.18 support 🎉😍🎊🍰🥂
2022-03-18 15:07:20 +03:00
AnnaShaleva
f6ac8daae6 examples: update neo-go dependency of nft-nd-nns 2022-03-18 13:46:47 +03:00
AnnaShaleva
7a8dc11791 examples: update dependencies version 2022-03-18 13:44:33 +03:00
Roman Khimov
4869049965
Merge pull request #2398 from nspcc-dev/trim-micro
block/dao: simplify trimming, avoid allocations
2022-03-18 12:39:53 +03:00
AnnaShaleva
d2bc4473ce circleci: upgrade golangci linter version
The old one isn't able to properly work with go > 1.15. However, the updated
version doesn't work with go 1.18, see https://github.com/golangci/golangci-lint/issues/2649.
So let's keep go1_17 runner with the latest golangci by now.
2022-03-18 11:09:30 +03:00
Anna Shaleva
e8d15b1b7e workflows: upgrade supported go version 2022-03-18 11:09:30 +03:00
AnnaShaleva
f50815d9b9 circleci: migrate from unsupported base images to the recommended ones
See also https://github.com/CircleCI-Public/cimg-go/issues/158#issuecomment-1060586504 solution.
2022-03-18 11:09:30 +03:00
Anna Shaleva
a137552b16 gomod: upgrade minimum required go version up to 1.16 2022-03-18 11:09:23 +03:00
Roman Khimov
5616585697 block/dao: simplify trimming, avoid allocations
The only user of (*Block).Trim() is in DAO and it already has a nice buffer
usually, so creating another one makes no sense. It also simplifies error
handling a lot.
2022-03-18 10:49:25 +03:00
Roman Khimov
c2845852ae
Merge pull request #2397 from nspcc-dev/is-script-correct-panic
vm: avoid panic in `IsScriptCorrect`
2022-03-18 10:08:39 +03:00
Evgeniy Stratonikov
ef28308dbf vm: avoid panic in IsScriptCorrect
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-03-17 20:12:50 +03:00
AnnaShaleva
a4d402da86 compiler: revert a part of ad65d1fa1f
Close #2335.
2022-03-17 19:39:18 +03:00
Anna Shaleva
753d604784 network: use net.ErrClosed to check network connection was closed
Close #1765.
2022-03-17 19:39:18 +03:00
Anna Shaleva
2096ad6e81 *: remove io/ioutil uses
Close #1764.
2022-03-17 19:39:18 +03:00
Roman Khimov
df3eb76aa2
Merge pull request #2396 from nspcc-dev/fuzz-script-panic
Return error on negative instruction pointer in `Context.Next`
2022-03-17 19:13:20 +03:00
Evgeniy Stratonikov
492c91b4c5 vm: disallow negative offset in (*Context).Next()
Currently the only known reason this can happen is processing
ENDFINALLY opcode before the corresponding ENDTRY.

Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-03-17 18:52:48 +03:00
Roman Khimov
5cbf28a104
Merge pull request #2372 from nspcc-dev/jsonpath-oom
jsonpath: restrict amount of intermediate objects
2022-03-17 12:34:49 +03:00
Roman Khimov
f056c9aea8
Merge pull request #2394 from nspcc-dev/fix-modules
Fix `pkg/interop` commits in `go.mod`
2022-03-16 10:10:56 +03:00
Evgeniy Stratonikov
4960766019 go.mod: update pkg/interop dependency
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-03-15 17:15:40 +03:00
Evgeniy Stratonikov
44de29bcf0 scripts: add script for updating pkg/interop dependencies
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-03-15 17:15:40 +03:00