Roman Khimov
5a7fa2d3df
cli: restart consensus service on USR2
...
Fix #1949 . Also drop wallet from the ServerConfig since it's not used in any
meaningful way after this change.
2022-08-02 13:05:07 +03:00
Roman Khimov
bf92966633
cli: reload state root service on USR1
...
It's a bit special since it's _always_ present to catch stateroots from the
network.
2022-08-02 13:02:36 +03:00
Roman Khimov
9341bb6628
cli: restart notary service on USR1
2022-07-28 19:05:56 +03:00
Roman Khimov
2adcf406d3
cli: reload Oracle service on USR1
...
Which allows to enable/disable the service, change nodes, keys and other
settings. Unfortunately, atomic.Value doesn't allow Store(nil), so we have to
store a pointer there that can point to nil interface.
2022-07-28 19:05:56 +03:00
Roman Khimov
98e2c5568c
rpcsrv: don't init Oracle in New, drop oracle dependency
...
The only thing rpcsrv needs is AddResponse callback.
2022-07-28 19:05:56 +03:00
Roman Khimov
df24c1268e
cli: restart pprof and prometheus on HUP
2022-07-27 12:30:08 +03:00
Roman Khimov
6593b94594
cli: use new configuration for the RPC server
...
Also fix addresses if needed and store this new configuration.
2022-07-27 12:30:08 +03:00
Roman Khimov
94099de3c3
cli: also check new ApplicationConfiguration for consistency
...
Most of the settings can't be changed, only services can.
2022-07-27 12:30:08 +03:00
Roman Khimov
3fca3352d8
cli: read new config on signal and check ProtocolConfiguration
...
ProtocolConfiguration must remain the same, any errors mean that the signal
will be ignored.
2022-07-27 12:30:08 +03:00
Roman Khimov
1ff588a11b
Merge pull request #2610 from nspcc-dev/sc-code-emit
...
Move code generation from rpcclient to smartcontract
2022-07-26 12:35:18 +03:00
Roman Khimov
c8ff489287
native: use CreateOracleResponseScript directly
...
It wasn't possible way back when this test was written
(CreateOracleResponseScript was a method), now we can simplify things.
2022-07-26 12:19:49 +03:00
Roman Khimov
f749aaff3c
*: reuse smartcontract package to create standard entry scripts
2022-07-26 12:19:49 +03:00
Roman Khimov
32ebb4a90d
smartcontract: add Builder, method invocation helpers and doc
...
Move the last remaining script-related things out of the rpcclient.
2022-07-25 22:49:47 +03:00
Roman Khimov
1b6f4051d8
smartcontract: move CreateCallAndUnwrapIteratorScript there
...
RPC client shouldn't build scripts and this function can be useful as a
reusable building block.
2022-07-25 15:46:20 +03:00
Roman Khimov
68b5260fb5
Merge pull request #2609 from nspcc-dev/nuke-rpc
...
Shuffle RPC packages
2022-07-25 12:49:18 +03:00
Roman Khimov
88542630ac
blockchainer: drop the package completely
...
It's not an ideal solution, but at least it solves the problem for
now. Caveats:
* consensus only needs one method, so it's mirrored to Blockchain
* rpcsrv uses core.* definition of the StateRoot (so technically it might as
well not have an internal Ledger), but it uses core already unfortunately
2022-07-25 11:58:13 +03:00
Roman Khimov
5ee7ea34b1
blockchainer: drop Blockchainer completely
...
It's only used by the RPC server now, so it can be internalized.
2022-07-25 11:58:13 +03:00
Roman Khimov
284335a4d2
blockchainer: strip unused methods
2022-07-25 11:58:13 +03:00
Roman Khimov
fcbda00f8a
blockchainer/services: drop this package
...
It doesn't add any value.
2022-07-25 11:58:13 +03:00
Roman Khimov
dc7950d050
testchain: don't use blockchainer.Blockchain
...
It's not needed.
2022-07-25 11:58:13 +03:00
Roman Khimov
3a6626f21f
blockchainer: drop unused services
dependency
2022-07-25 11:58:13 +03:00
Roman Khimov
5b49636ebe
neotest: use real *core.Blockchain
...
Hiding it behind blockchainer.Blockchain doesn't improve the testing system,
there is no other implementation of it that can fulfil all the needs of the
neotest and at the same time this limits the functions available to tests.
2022-07-25 11:58:13 +03:00
Roman Khimov
b3c25b5a1f
neorpc/result: move NotaryRequestEvent to this package
...
Not worth a package of its own.
2022-07-25 11:58:13 +03:00
Roman Khimov
4acd1688a1
subscriptions: move NotificationEvent to state
...
1. It's not good for pkg/core to import anything from pkg/neorpc.
2. The type is closely tied to the state package, even though it's not stored
in the DB
2022-07-25 11:58:13 +03:00
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