Roman Khimov
8e70cd3596
rpc: move rpc.Config to pkg/config, remove pkg/rpc
...
Makes no sense keeping it as is and TLS can be reused in the future.
2022-07-25 11:58:13 +03:00
Roman Khimov
1e0750e3cd
rpc: merge response and request under pkg/neorpc
...
Move result there also.
2022-07-25 11:57:53 +03:00
Roman Khimov
2e27c3d829
metrics: move package to services
...
Where it belongs.
2022-07-21 23:38:23 +03:00
Roman Khimov
8c668765d2
rpc/client: move to pkg/rpcclient
...
Better package name, closer to user.
2022-07-21 22:39:53 +03:00
Roman Khimov
43a59adbd0
rpc/server: move to services/rpcsrv
...
`server` is not a good package name and it's an internal service, so it can be
just about anywhere.
2022-07-21 22:14:12 +03:00
Roman Khimov
30de3d60cd
Merge pull request #2608 from nspcc-dev/workflow-related-corrections
...
Workflow-related corrections
2022-07-21 19:37:32 +03:00
Roman Khimov
1c20bb0161
Dockerfile: honor VERSION and REPO during make build
...
buildx doesn't have complete .git at hand to detect them, so they're passed
from the outside and should be used inside the Dockerfile.
2022-07-21 18:20:46 +03:00
Roman Khimov
e11503ff5b
Makefile: correct Docker image repository name
...
Fix 403 Forbidden errors on push.
2022-07-21 17:35:48 +03:00
Roman Khimov
b8fe915797
workflows: use path context for docker builds
...
We have to checkout anyway for setvars step, so we can reuse the data instead
of making yet another checkout.
2022-07-21 16:27:34 +03:00
Roman Khimov
5773bc9da6
README: drop CodeQL badge
...
It's just one of the tests.
2022-07-21 15:33:48 +03:00
Roman Khimov
913dea84af
workflows: don't login to Docker Hub when not pushing images
...
Minor safety improvement, images are not pushed anyway in this case, but it
makes little sense logging in as well.
2022-07-21 15:32:00 +03:00
Roman Khimov
7118b4f4ea
Merge pull request #2602 from nspcc-dev/add-darwin-builds
...
Add darwin builds
2022-07-21 15:08:59 +03:00
Roman Khimov
e0822dd070
Merge pull request #2607 from nspcc-dev/json-tx-array-in-block
...
block: JSONize tx-less block as `[]` instead of `null`
2022-07-21 14:28:23 +03:00
Roman Khimov
03b559bd44
block: JSONize tx-less block as []
instead of null
...
Improve C# compatibility.
2022-07-21 13:15:31 +03:00
Roman Khimov
ec77e8a4fa
workflows: use checkout@v3
...
No functional changes, but let's be up to date.
2022-07-20 19:21:40 +03:00
Roman Khimov
cbf6a2940f
workflows: update setup-go to v3
...
Use built-in cache, simplify steps.
2022-07-20 19:19:51 +03:00
Roman Khimov
7dd21bc7e4
tests: merge CodeQL workflow into Tests, run tests on push
...
1. CodeQL is just one of the tests, it doesn't need a separate workflow.
2. It doesn't make a lot of sense running it daily, every push to the master
branch deserves a scan.
3. And every push deserves a test run as well.
2022-07-20 17:39:31 +03:00
Roman Khimov
7b6f23ee7e
workflows: move docker push logic to the Build workflow
...
publish_to_dockerhub.yml duplicated build.yml and run_tests.yml in many
ways. We always want to build docker images, it's just that we don't push them
on every occasion and there is some additional logic around the latest
tag. We also want to publish multiarch images now, so all of this logic better
be consolidated in one workflow. It doesn't depend on tests, since we only
publish on release or on manual run, so it's known to be good.
2022-07-20 17:39:31 +03:00
Roman Khimov
bc6787f17c
workflows: don't build privnet image
...
It only differs from non-privnet by tag, it doesn't make sense rebuilding the
same things over and over again.
2022-07-20 17:39:31 +03:00
Roman Khimov
b8b85ce911
workflows/Makefile: build Docker image for MacOS
...
We build multiarch linux/amd64 and linux/arm64, because MacOS runner can't
build docker images and even if it could that'd be linux/amd64 while we want
linux/arm64 for Apple CPUs.
Unfortunately, given the way GitHub workflows work we can't avoid using a
Makefile helper, there is no easy way to set variables conditionally and/or
use some logic to affect their contents.
We reintroduce build_image_wsc as well here because Windows images can't be
built with buildx using GitHub runners.
2022-07-20 17:38:41 +03:00
Roman Khimov
4822728f5d
Makefile: drop obsolete targets
...
They're not used at least since 2019.
2022-07-20 17:32:54 +03:00
Roman Khimov
16083459b8
workflows: add MacOS CLI build and test configurations
...
Unfortunately, the default MacOS runner produces amd64 binaries, therefore we
need to set GOARCH appropriately. At the same time, docker image will be
linux/arm64, so we can build it as well.
2022-07-20 17:32:54 +03:00
Roman Khimov
740cf500fd
workflows: simplify build configuration, use OS matrix
2022-07-18 11:31:32 +03:00
Roman Khimov
567b4935c3
Merge pull request #2603 from alexvanin/fix/version-typo
...
rpc: fix deprecated magic field description
2022-07-15 15:07:13 +03:00
Alex Vanin
d3f0b12ca2
rpc: fix deprecated magic field description
2022-07-15 15:01:59 +03:00
Roman Khimov
ed53fd3221
Merge pull request #2600 from nspcc-dev/handle-mptdata
...
network: allow to handle GetMPTData with KeepOnlyLatestState on
2022-07-15 13:13:31 +03:00
Roman Khimov
e46ec978d3
docs: improve some phasing, fix spelling
2022-07-15 12:52:21 +03:00
Anna Shaleva
1ae601787d
network: allow to handle GetMPTData with KeepOnlyLatestState on
...
And adjust documentation along the way.
2022-07-14 14:33:20 +03:00
Roman Khimov
54849ef3e5
Merge pull request #2599 from nspcc-dev/nns-cleanup
...
nft-nd-nns: clean up old entries on re-registration, fix #2570
2022-07-14 11:45:16 +03:00
Roman Khimov
3bc53b3aa1
nft-nd-nns: clean up old entries on re-registration, fix #2570
2022-07-13 18:54:19 +03:00
Roman Khimov
a00b80d5a1
Merge pull request #2598 from nspcc-dev/hasmethod
...
management.hasMethod
2022-07-13 18:50:57 +03:00
Roman Khimov
f50bcf617a
compiler: add test for hasMethod, update all go.mods
2022-07-13 18:22:05 +03:00
Roman Khimov
4f184498bc
interop: add management.HasMethod()
2022-07-13 17:54:17 +03:00
Roman Khimov
ab3330564a
native: add hasMethod, fix #2588
...
Yet another state change.
2022-07-13 17:29:46 +03:00
Roman Khimov
71b721c72a
Merge pull request #2594 from nspcc-dev/compiler-inline-return
...
compiler: allow to use multiple returns in inlined functions
2022-07-12 21:52:06 +03:00
Evgeniy Stratonikov
17329eea64
compiler: remove jumps to the next instruction
...
In case there are no returns in the inlined function, jumps point to the
next instruction and can be omitted. This optimization can be extended
to handle other cases, here we just make sure that already existing code
stays the same.
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-07-12 16:17:31 +03:00
Evgeniy Stratonikov
05efc57485
compiler: reduce instructions in 2 stages
...
First replace parts to be removed with NOPs, then actually remove.
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-07-12 13:16:33 +03:00
Evgeniy Stratonikov
ce24451fde
compiler: allow to use conditional returns in inlined functions
...
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-07-12 12:43:31 +03:00
Roman Khimov
9414538309
Merge pull request #2593 from nspcc-dev/fix-compiler
...
compiler: allow to call methods on return values
2022-07-12 11:55:41 +03:00
Evgeniy Stratonikov
e1a581be0e
compiler: allow to call methods on return values
...
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2022-07-11 19:28:15 +03:00
Roman Khimov
31a559e784
Merge pull request #2591 from nspcc-dev/interop/equality
...
interop: add equality helpers
2022-07-11 18:43:08 +03:00
Anna Shaleva
9f836148ca
examples: remove unnecessary file
2022-07-11 18:23:50 +03:00
Anna Shaleva
079f68a8c3
examples: use interop equality helpers where possible
2022-07-11 18:23:46 +03:00
Roman Khimov
953f291836
Merge pull request #2586 from nspcc-dev/move-res-rpc-code
...
Move response-related RPC code
2022-07-11 18:23:01 +03:00
Roman Khimov
125c2805d3
storage: reduce lock time in (*MemoryStore).Seek
...
It makes a copy of the resulting set, so the lock can be released
earlier. This helps a lot with iterators that keep Seek() unfinished for a
long time,
2022-07-11 16:15:14 +03:00
Roman Khimov
07f58abe3d
result: provide (*Iterator).UnmarshalJSON
...
It makes Iterator more symmetric and simplifies (*Invoke).UnmarshalJSON
code. No functional changes.
2022-07-11 16:15:14 +03:00
Roman Khimov
0c45ff8f51
rpc: simplify result.Invoke creation, remove needless deps
...
Change stack items before marshaling them which makes code in result package
much simpler and not requiring interop, iterator and storage dependencies that
clients shouldn't care about.
This also changes SessionBackedByMPT behavior, now instead of waiting for
traverseiterator call it'll rerun the script immediately if a new session is
created.
2022-07-11 16:15:14 +03:00
Anna Shaleva
c0186f8224
examples: update nns deps
2022-07-11 16:03:14 +03:00
Anna Shaleva
3594c4f760
examples: update interop deps
2022-07-11 16:01:19 +03:00
Anna Shaleva
78e5f16573
interop: add equality helpers
2022-07-11 15:59:24 +03:00