Evgeniy Stratonikov
b5afe24090
compiler: properly process defer
in conditional statements
...
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-02-04 11:04:03 +03:00
Evgeniy Stratonikov
10d006195a
vm: properly clear try stack in CALL
...
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-02-04 11:04:03 +03:00
Roman Khimov
01022c78e4
Merge pull request #2346 from nspcc-dev/fix-codecov
...
codecov: fix coverage reporting
2022-02-03 16:26:22 +03:00
Anna Shaleva
6332d3604f
codecov: adjust codecov config and remove CircleCI coverage job
...
Let's keep the only coverage job, so that CircleCI and GithubAction
coverage do not conflict with each other.
Also, let's do not require all other tests to pass to report the
coverage.
2022-02-03 16:21:15 +03:00
Roman Khimov
693eb595d8
Merge pull request #2345 from nspcc-dev/compiler-defer-duplication
...
compiler: do not traverse `defer` function literals twice
2022-02-03 10:55:42 +03:00
Evgeniy Stratonikov
ed43b75631
compiler: do not traverse defer
function literals twice
...
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-02-02 16:52:15 +03:00
Roman Khimov
8dcfb19a1c
Merge pull request #2341 from nspcc-dev/cli/tests
...
cli: improve coverage
2022-02-02 14:41:03 +03:00
Anna Shaleva
ba49209d8a
cli: use ioutil instead of os to read/write files
...
Go 1.15 doesn't have os.ReadFile and os.WiteFile.
2022-02-02 13:48:17 +03:00
Anna Shaleva
4ea0aef9d5
github: update coverage job
...
See https://github.com/codecov/codecov-action#%EF%B8%8F--deprecration-of-v1
2022-02-02 13:48:17 +03:00
Anna Shaleva
47465b8db9
codecov: add configuration file
...
And allow the Codecov to post results even if some of our jobs or
workflows are failing.
2022-02-02 13:48:17 +03:00
Anna Shaleva
152cebe4e2
cli: add tests for wallet-related commands
...
Fixes:
* Return proper exit code on error.
* Improve error handling.
2022-02-02 13:48:12 +03:00
Anna Shaleva
590f86aa2c
cli: add tests for smartcontract-related commands
...
Fixes:
* Improve error handling.
2022-02-02 11:28:29 +03:00
Anna Shaleva
b88f2b389f
cli: check execution state while saving invoked tx
2022-02-02 11:28:29 +03:00
Anna Shaleva
9de9bcb17c
cli: add tests for server commands
...
Fixes:
* Proper exit code should be returned on exit for server-related
commands
2022-02-02 11:28:26 +03:00
Roman Khimov
9719191770
Merge pull request #2342 from nspcc-dev/fix-management-contract-callflags
...
Fix management contract callflags
2022-02-01 12:30:53 +03:00
Roman Khimov
7945097543
native: fix ContractManagement's call flags for update/deploy
...
See neo-project/neo#2653 .
2022-02-01 12:21:00 +03:00
Roman Khimov
1df447cd68
Merge pull request #2334 from nspcc-dev/extendable-validators
...
Extendable validators
2022-02-01 12:09:56 +03:00
Roman Khimov
cda1c75db3
core: drop GetStandBy* methods
...
They're misleading now that we have variable number of committee
members/validators. The standby list can be seen in the configuration and the
appropriate numbers can be received from it also.
2022-01-31 23:14:38 +03:00
Roman Khimov
e621f746a7
config/core: allow to change the number of validators
...
Fixes #2320 .
2022-01-31 23:14:38 +03:00
Roman Khimov
37ca96c20b
interop: use All flags for management deploy and update calls
...
Unfortunately, tests will fail after this commit, but it needs to be done in
order to update interop dependency afterwards. Fixes #1990 .
2022-01-31 22:21:08 +03:00
Roman Khimov
6042b3dc26
CHANGELOG: fix typo
2022-01-31 19:16:29 +03:00
Roman Khimov
cbb4e51308
CHANGELOG: release 0.98.1
2022-01-31 18:47:58 +03:00
Roman Khimov
75fbb914da
Merge pull request #2338 from nspcc-dev/fix-gomod
...
Examples go.mod fixes
2022-01-31 18:25:16 +03:00
Roman Khimov
64fb9218dd
Merge pull request #2339 from nspcc-dev/compare-states
...
scripts: add compare-states, related to #2337
2022-01-31 11:51:43 +03:00
Roman Khimov
d1a9aa1d0d
scripts: add compare-states, related to #2337
...
Allows to quickly find the bad block and compare application
logs. Theoretically could also walk through the MPT to find the difference
there, but it's not needed now.
2022-01-26 10:11:19 +03:00
Roman Khimov
b011af4723
scripts: move compare-dumps into a package of its own
...
We can't have multiple *.go scripts in one directory anyway without tests
going wild.
2022-01-26 10:11:19 +03:00
Evgeniy Stratonikov
6b152daf7e
.github: check dependencies versions
...
Rebasing or altering commits in other way is a common thing,
so it makes sense to ensure dependencies are also updated.
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-01-25 12:55:39 +03:00
Evgeniy Stratonikov
ec663e5bc6
examples/nft-nd-nns: update go.mod dependencies
...
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-01-25 12:42:47 +03:00
Evgeniy Stratonikov
e890c32dcc
rpc/client: remove dependency on examples
...
Duplicate necessary structures in a dedicated micropackage.
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-01-25 12:41:06 +03:00
Evgeniy Stratonikov
1154eae3cd
examples: use proper interop version in go.mod
...
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-01-25 12:37:26 +03:00
Roman Khimov
60d6fa1125
network: keep a copy of the config inside of Server
...
Avoid copying the configuration again and again, make things a bit more
efficient.
2022-01-24 18:43:01 +03:00
Roman Khimov
6e9d725a29
config: consolidate ProtocolConfiguration consistency checks
2022-01-24 18:42:57 +03:00
Roman Khimov
f9e8dcbed8
Merge pull request #2333 from nspcc-dev/examples/nep11-d
...
examples: add NEP11 Divisible token example
2022-01-24 13:17:54 +03:00
Anna Shaleva
5561b94698
examples: add an example of NEP11 Divisible token
2022-01-24 13:10:10 +03:00
Anna Shaleva
9c2e92d7d9
compiler: check overloaded methods for safeness one more time
...
It's possible that overloaded method is marked as `safe` in manifest, so
that it must have `save` field set to true after its name was
overwritten.
2022-01-21 18:03:04 +03:00
Anna Shaleva
fa1174ec7e
smartcontract: adjust NEP11-D standard
...
Method `ownerOf` returns iterator which should be of the type
InteropInterface.
2022-01-21 18:03:04 +03:00
Roman Khimov
613a23cc3f
Merge pull request #2292 from nspcc-dev/compiler-packages
...
compiler: update x/tools package
2022-01-21 18:01:06 +03:00
Evgeniy Stratonikov
ad65d1fa1f
compiler: implement custom logic for go1.15
...
For some reason `foo.go` is interpreted as an http URL, and even if we
replace it with `./foo.go` there is an errors with file missing on disk.
Because `CompileWithOptions` should be able to compile file under any
circumstances, we allocate temporary directory base on version used to
compile a binary.
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-01-21 17:43:28 +03:00
Evgeniy Stratonikov
cae5b8541d
docs/compiler.md: update initialization info
...
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-01-21 10:25:21 +03:00
Evgeniy Stratonikov
ac06da048c
go.mod: add examples/nft-nd-nns dependency
...
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-01-21 10:25:20 +03:00
Evgeniy Stratonikov
d19c0492d4
examples: use a separate go.mod
for each contract
...
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-01-21 10:22:29 +03:00
Evgeniy Stratonikov
970769e5b2
compiler: allow to use _
in constants
...
When `_` is unused it can be omitted from constant values mapping.
Catched when compiling `netmap` contract from nspcc-dev/neofs-contract.
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-01-20 13:52:58 +03:00
Evgeniy Stratonikov
945b56e350
cli/smartcontract: set correct version for pkg/interop
...
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-01-20 13:52:58 +03:00
Evgeniy Stratonikov
492db89576
pkg/interop: update actual version
...
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-01-20 13:52:57 +03:00
Evgeniy Stratonikov
25583f9aeb
compiler: make pkg/interop a separate module
...
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-01-20 13:21:26 +03:00
Evgeniy Stratonikov
548a6a06f1
compiler: speed up boolean expression short-circuit test
...
The amount of tests done is comparable to all other tests in compiler
package (~2k). After we moved to a new x/tools package this became a
bottleneck. In this commit we reduce the amount of compiled files by
combining multiple tests in a single file.
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-01-20 13:21:26 +03:00
Evgeniy Stratonikov
9871dc8f5a
compiler: update x/tools package
...
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-01-20 13:21:26 +03:00
Evgeniy Stratonikov
e7a0ecb349
compiler: provide .go
filename to Compile
...
First argument contains filename, thus we use '.go' suffix to
distinguish between directories and files.
Contract name should be provided in options.
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-01-20 13:21:24 +03:00
Evgeniy Stratonikov
8af9c870b1
compiler: remove CompileWithDebugInfo
...
It is a simple wrapper over `CompileWithOptions` which we don't really
need. Custom options can be specified explicitly instead of using some
random default. This default was introduced in 1578904da
, however tests
written there use `CompileWithOptions` and all other tests
pass on that commit even without this default.
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-01-20 13:15:48 +03:00
Evgeniy Stratonikov
46f623a48f
compiler/test: use public functions in tests
...
`CompileWithOptions` does exactly the thing we need.
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-01-20 13:15:48 +03:00