Commit graph

6526 commits

Author SHA1 Message Date
Anna Shaleva
08427f23b6 compiler: do not check Any event parameter for compliance
It's possible that declared manifest event has parameter of AnyT for
those cases when parameter type differs from method to method. If so,
then we don't need to enforce type check after compilation.
2022-09-30 08:40:55 +03:00
Roman Khimov
b7be4edf7f
Merge pull request #2718 from nspcc-dev/ok-conversion
compiler: prohibit to compile type assertion with two return values
2022-09-29 02:54:03 +07:00
Anna Shaleva
b98848bf49 compiler: prohibit to compile type assertion with two return values
Close #2692.
2022-09-28 11:27:13 +03:00
Roman Khimov
b2b5303d06
Merge pull request #2716 from nspcc-dev/test
compiler: take into account inlined types info on `append` builtin handling
2022-09-28 13:56:02 +07:00
Anna Shaleva
1828e79412 compiler: add test for foreign function inlining 2022-09-27 15:36:06 +03:00
Anna Shaleva
9ee05d3241 examples: update neo-go dependency 2022-09-27 15:35:15 +03:00
Anna Shaleva
08e2511676 *: update interop dependency 2022-09-27 15:34:20 +03:00
Anna Shaleva
24c107e3a2 interop: refactor address.FromHash160 code
Make it more simple.
2022-09-27 15:32:57 +03:00
Anna Shaleva
5d578fdd95 compiler: consider inlined types info on "append" handling
We need to search for "append" argument type info not only inside local
package type info map, but also inside the inlined type info map.
Close #2696.
2022-09-27 15:32:51 +03:00
Roman Khimov
3dbd36ef70
Merge pull request #2712 from nspcc-dev/upd
*: update dependencies and adjust updator script
2022-09-23 14:08:04 +07:00
Anna Shaleva
c7ece79cb4 scripts: ignore go 1.16 compat for dependency updator script
Otherwise the following error occurs while updating dependency:
```
github.com/nspcc-dev/neo-go/examples/nft-nd-nns tested by
	github.com/nspcc-dev/neo-go/examples/nft-nd-nns.test imports
	github.com/nspcc-dev/neo-go/pkg/compiler imports
	gopkg.in/yaml.v3 tested by
	gopkg.in/yaml.v3.test imports
	gopkg.in/check.v1 imports
	github.com/kr/pretty loaded from github.com/kr/pretty@v0.1.0,
	but go 1.16 would select v0.3.0
github.com/nspcc-dev/neo-go/examples/nft-nd-nns tested by
	github.com/nspcc-dev/neo-go/examples/nft-nd-nns.test imports
	github.com/nspcc-dev/neo-go/pkg/compiler imports
	gopkg.in/yaml.v3 tested by
	gopkg.in/yaml.v3.test imports
	gopkg.in/check.v1 imports
	github.com/kr/pretty imports
	github.com/kr/text loaded from github.com/kr/text@v0.1.0,
	but go 1.16 would select v0.2.0

To upgrade to the versions selected by go 1.16:
	go mod tidy -go=1.16 && go mod tidy -go=1.17
If reproducibility with go 1.16 is not needed:
	go mod tidy -compat=1.17
For other options, see:
	https://golang.org/doc/modules/pruning
```
2022-09-23 09:05:08 +03:00
Anna Shaleva
4ca89d23ec examples: update neo-go dependency 2022-09-23 09:00:26 +03:00
Anna Shaleva
ae511447f9 *: update interop dependency 2022-09-23 08:58:55 +03:00
Roman Khimov
29564bdda2
Merge pull request #2695 from nspcc-dev/call-version
interop: implement System.Contract.CallWithVersion
2022-09-21 21:53:01 +07:00
Anna Shaleva
bfc65d35ce examples: update neo-go dependency 2022-09-21 17:43:15 +03:00
Anna Shaleva
25667914fa *: update interop dependency 2022-09-21 17:40:34 +03:00
Anna Shaleva
ea08a81726 interop: add CallWithVersion helper 2022-09-21 17:38:42 +03:00
Anna Shaleva
df802b6fc6 vm: adjust emit.AppCall comment
There's no APPCALL anymore.
2022-09-21 17:25:45 +03:00
Roman Khimov
5eb4ba772f
Merge pull request #2708 from nspcc-dev/fix-it-doc
interop: adjust Iterator documentation
2022-09-21 14:36:07 +07: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
Roman Khimov
5a7ab2054d
Merge pull request #2698 from nspcc-dev/address-helpers
interop: add a couple of `interop.Hash160` encoding helpers
2022-09-20 17:07:00 +07:00
Anna Shaleva
293dbf3d1b compiler: adjust test's checkInstrCount
Remove unnecessary code.
2022-09-20 09:45:07 +03:00
Anna Shaleva
2b8271055f examples: update neo-go version 2022-09-20 09:45:07 +03:00
Anna Shaleva
0477f83ea8 *: update interop version 2022-09-20 09:43:37 +03:00
Anna Shaleva
7e13140b04 interop: add Hash160 encoder\decoder helper
Close #2690.
2022-09-20 09:37:04 +03:00
Roman Khimov
113c0ce781
Merge pull request #2699 from nspcc-dev/add-atoi-tests
native: add some tests for stdlib's atoi
2022-09-19 21:39:38 +07:00
Roman Khimov
1b753cd4bc native: add some tests for stdlib's atoi
See neo-project/neo#2804 and neo-project/neo#2813. We're already compatible.
2022-09-19 16:18:53 +03:00
Roman Khimov
b8410a107d
Merge pull request #2697 from nspcc-dev/upd-deps-script
scripts: update dependency-updator script
2022-09-16 21:02:20 +03:00
Anna Shaleva
f1fbd6ad4b scripts: update dependency-updator script
Include Oracle contract to the list of contracts to be updated.
2022-09-16 20:33:48 +03:00
Roman Khimov
1f94ebe03d
Merge pull request #2679 from nspcc-dev/nns-upd
examples: NNS update, part 1
2022-09-16 17:06:38 +03:00
Anna Shaleva
94852ab7f4 nns: add admin to properties
See 14f43ba8cf/src/NameService/NameService.cs (L69).
2022-09-16 12:51:07 +03:00
Anna Shaleva
c03e420355 nns: allow to resolve FQDN
Port 4041924a75.
2022-09-16 12:51:07 +03:00
Anna Shaleva
e97467726c nns: allow hyphen in domain names
Port https://github.com/nspcc-dev/neofs-contract/pull/183.
2022-09-16 12:51:07 +03:00
Anna Shaleva
ce66610369 nns: adjust maxDomainNameFragmentLength
Port https://github.com/nspcc-dev/neofs-contract/pull/238.
2022-09-16 12:51:04 +03:00
Roman Khimov
8ecafaaadf
Merge pull request #2691 from nspcc-dev/sc-builder-len
smartcontract: add Len to Builder
2022-09-14 10:36:01 +03:00
Roman Khimov
18ed26194f smartcontract: add Len to Builder
Which is useful in some cases.
2022-09-14 10:25:10 +03:00
Roman Khimov
bd8d46e11a
Merge pull request #2689 from nspcc-dev/stateroot-shutdown-panic
stateroot: fix panic on shutdown
2022-09-13 13:29:57 +03:00
Roman Khimov
5979138306 stateroot: fix panic on shutdown
Stateroot service is always active, but it might have no wallet.

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0xc57d41]

goroutine 1 [running]:
github.com/nspcc-dev/neo-go/pkg/wallet.(*Wallet).Close(...)
        github.com/nspcc-dev/neo-go/pkg/wallet/wallet.go:175
github.com/nspcc-dev/neo-go/pkg/services/stateroot.(*service).Shutdown(0xc000105880?)
        github.com/nspcc-dev/neo-go/pkg/services/stateroot/validators.go:77 +0x81
github.com/nspcc-dev/neo-go/pkg/network.(*Server).Shutdown(0xc000105880)
        github.com/nspcc-dev/neo-go/pkg/network/server.go:271 +0x205
github.com/nspcc-dev/neo-go/cli/server.startServer(0xc0002702c0)
        github.com/nspcc-dev/neo-go/cli/server/server.go:641 +0x2675
github.com/urfave/cli.HandleAction({0xe456e0?, 0x1155f20?}, 0x4?)
        github.com/urfave/cli@v1.22.5/app.go:524 +0x50
github.com/urfave/cli.Command.Run({{0xfca38b, 0x4}, {0x0, 0x0}, {0x0, 0x0, 0x0}, {0xfd6a46, 0x10}, {0xffebe3, ...}, ...}, ...)
        github.com/urfave/cli@v1.22.5/command.go:173 +0x65b
github.com/urfave/cli.(*App).Run(0xc000272000, {0xc00003e180, 0x3, 0x3})
        github.com/urfave/cli@v1.22.5/app.go:277 +0x8a7
main.main()
        ./main.go:21 +0x33
2022-09-13 13:18:13 +03:00
Roman Khimov
b27e6918bd Makefile: complicate version detection script
We've declared that we are using semantic versioning. We also want to use `git
describe` to make version strings for us because it's very convenient for
development builds (tagged versions are way simpler). The problem is that the
default `git describe` behavior is not semver compliant. If the most recent
tag is v0.99.2 then it'll generate something like '0.99.2-131-g8dc5b385',
which according to semver is a development version _before_ 0.99.2. While it's
obviously a version _after_ 0.99.2.

That's the one and only reason we have vX.Y.Z-pre tags in our repo. We set
them right after the release according to the release process and that gives
us some '0.99.3-pre-131-g8dc5b385' versions we're all used to. But these tags
are ugly as hell and they clutter up our repo over time.

So there is this idea that we can do patch version increment dynamically.
Making '0.99.2-131-g8dc5b385' be '0.99.3-pre-131-g8dc5b385' without any *-pre
tags. This patch implements this. It's ugly as hell as well, but at least
that's an ugliness somewhere inside our Makefile and not directly visible in
our tags. If we're to do this we can then greatly simplify our release process
(and even allow for CHANGELOG patches to be merged normally).

I know this can be done with awk in somewhat easier way, but no, I'm not into
awk, sorry.
2022-09-09 17:06:55 +03:00
Roman Khimov
87a4fa827a CHANGELOG: release 0.99.3 2022-09-09 15:33:43 +03:00
Roman Khimov
31792e3132
Merge pull request #2686 from nspcc-dev/drop-at-block-rpcs
rpcclient: simplify historic API
2022-09-09 15:18:27 +03:00
Roman Khimov
a1ca28446d
Merge pull request #2683 from nspcc-dev/historic-cli
Historic calls from CLI
2022-09-09 15:08:22 +03:00
Roman Khimov
6a5a8c5e89
Merge pull request #2684 from nspcc-dev/build-fix
Tiny build corrections
2022-09-09 15:07:51 +03:00
Roman Khimov
d40eb79975 rpcclient: simplify historic API
util.Uint256 is util.Uint256 and it's same RPC behind the scenes, so we can
make it a bit easier to digest. See #2545 also.
2022-09-09 13:41:45 +03:00
Roman Khimov
f78a065230 vm/cli: generate Go 1.17 go.mods 2022-09-08 21:18:51 +03:00
Roman Khimov
db36be96b3 README: drop stale Go 1.16 reference 2022-09-08 21:18:02 +03:00
Roman Khimov
29d8d204ef Makefile: always use 8 chars for git revision in version
That's what we usually have today already, but it's dynamic by default.
2022-09-08 21:17:08 +03:00
Roman Khimov
d2d190913b cli: add historic abilities for all invoking commands
Notice that we can't do this for balance commands (unless we change the
interface in some manner) because they use getnepXXbalances.

Fixes #2620.
2022-09-08 19:20:18 +03:00
Roman Khimov
4403a95ae6 cli: don't return sender from invokeWithArgs
It's not really needed, deployer knows the sender exactly already.
2022-09-08 15:57:27 +03:00
Roman Khimov
8dc5b38568
Merge pull request #2681 from nspcc-dev/rpcclient-comments
RPC client examples, comments and small fixes
2022-09-08 14:47:31 +03:00