Close#2992
Breaking changes:
- rpc server grafana metric `substrate_rpc_requests_started` is removed
(not possible to implement anymore)
- rpc server grafana metric `substrate_rpc_requests_finished` is removed
(not possible to implement anymore)
- rpc server ws ping/pong not ACK:ed within 30 seconds more than three
times then the connection will be closed
Added
- rpc server grafana metric `substrate_rpc_sessions_time` is added to
get the duration for each websocket session
This is a rather big change in jsonrpsee, the major things in this bump
are:
- Server backpressure (the subscription impls are modified to deal with
that)
- Allow custom error types / return types (remove jsonrpsee::core::Error
and jsonrpee::core::CallError)
- Bug fixes (graceful shutdown in particular not used by substrate
anyway)
- Less dependencies for the clients in particular
- Return type requires Clone in method call responses
- Moved to tokio channels
- Async subscription API (not used in this PR)
Major changes in this PR:
- The subscriptions are now bounded and if subscription can't keep up
with the server it is dropped
- CLI: add parameter to configure the jsonrpc server bounded message
buffer (default is 64)
- Add our own subscription helper to deal with the unbounded streams in
substrate
The most important things in this PR to review is the added helpers
functions in `substrate/client/rpc/src/utils.rs` and the rest is pretty
much chore.
Regarding the "bounded buffer limit" it may cause the server to handle
the JSON-RPC calls
slower than before.
The message size limit is bounded by "--rpc-response-size" thus "by
default 10MB * 64 = 640MB"
but the subscription message size is not covered by this limit and could
be capped as well.
Hopefully the last release prior to 1.0, sorry in advance for a big PR
Previous attempt: https://github.com/paritytech/substrate/pull/13992
Resolves https://github.com/paritytech/polkadot-sdk/issues/748, resolves
https://github.com/paritytech/polkadot-sdk/issues/627
We currently use a bit of a hack in `.cargo/config` to make sure that
clippy isn't too annoying by specifying the list of lints.
There is now a stable way to define lints for a workspace. The only down
side is that every crate seems to have to opt into this so there's a
*few* files modified in this PR.
Dependencies:
- [x] PR that upgrades CI to use rust 1.74 is merged.
---------
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
Co-authored-by: Branislav Kontur <bkontur@gmail.com>
Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>
See #1345, <https://github.com/paritytech/substrate/pull/14207>.
This adds all the necessary mixnet components, and puts them together in
the "kitchen-sink" node/runtime. The components added are:
- A pallet (`frame/mixnet`). This is responsible for determining the
current mixnet session and phase, and the mixnodes to use in each
session. It provides a function that validators can call to register a
mixnode for the next session. The logic of this pallet is very similar
to that of the `im-online` pallet.
- A service (`client/mixnet`). This implements the core mixnet logic,
building on the `mixnet` crate. The service communicates with other
nodes using notifications sent over the "mixnet" protocol.
- An RPC interface. This currently only supports sending transactions
over the mixnet.
---------
Co-authored-by: David Emett <dave@sp4m.net>
Co-authored-by: Javier Viola <javier@parity.io>
* replace Index by Nonce
* replace Index by Nonce
* replace Index by Nonce
* replace Index by Nonce
* replace Index by Nonce
* wip
* remove index in lieu of nonce
* wip
* remove accountnonce in lieu of nonce
* add minor improvement
* rebase and merge conflicts
* Start
* More work!
* Moar
* More changes
* More fixes
* More worrk
* More fixes
* More fixes to make it compile
* Adds `NoOffchainStorage`
* Pass the extensions
* Small basti making small progress
* Fix merge errors and remove `ExecutionContext`
* Move registration of `ReadRuntimeVersionExt` to `ExecutionExtension`
Instead of registering `ReadRuntimeVersionExt` in `sp-state-machine` it is moved to
`ExecutionExtension` which provides the default extensions.
* Fix compilation
* Register the global extensions inside runtime api instance
* Fixes
* Fix `generate_initial_session_keys` by passing the keystore extension
* Fix the grandpa tests
* Fix more tests
* Fix more tests
* Don't set any heap pages if there isn't an override
* Fix small fallout
* FMT
* Fix tests
* More tests
* Offchain worker custom extensions
* More fixes
* Make offchain tx pool creation reusable
Introduces an `OffchainTransactionPoolFactory` for creating offchain transactions pools that can be
registered in the runtime externalities context. This factory will be required for a later pr to
make the creation of offchain transaction pools easier.
* Fixes
* Fixes
* Set offchain transaction pool in BABE before using it in the runtime
* Add the `offchain_tx_pool` to Grandpa as well
* Fix the nodes
* Print some error when using the old warnings
* Fix merge issues
* Fix compilation
* Rename `babe_link`
* Rename to `offchain_tx_pool_factory`
* Cleanup
* FMT
* Fix benchmark name
* Fix `try-runtime`
* Remove `--execution` CLI args
* Make clippy happy
* Forward bls functions
* Fix docs
* Update UI tests
* Update client/api/src/execution_extensions.rs
Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: Koute <koute@users.noreply.github.com>
* Update client/cli/src/params/import_params.rs
Co-authored-by: Koute <koute@users.noreply.github.com>
* Update client/api/src/execution_extensions.rs
Co-authored-by: Koute <koute@users.noreply.github.com>
* Pass the offchain storage to the MMR RPC
* Update client/api/src/execution_extensions.rs
Co-authored-by: Sebastian Kunert <skunert49@gmail.com>
* Review comments
* Fixes
---------
Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>
Co-authored-by: Koute <koute@users.noreply.github.com>
Co-authored-by: Sebastian Kunert <skunert49@gmail.com>
* Change copyright year to 2023 from 2022
* Fix incorrect update of copyright year
* Remove years from copy right header
* Fix remaining files
* Fix typo in a header and remove update-copyright.sh
* jsonrpsee v0.16
add backwards compatibility
run old http server on http only
* cargo fmt
* update jsonrpsee 0.16.1
* less verbose cors log
* fix nit in log: WS -> HTTP
* revert needless changes in Cargo.lock
* remove unused features in tower
* fix nits; add client-core feature
* jsonrpsee v0.16.2
* implement crate publishing from CI
* fix indentation
* use resource_group for job exclusivity
ensure that at most one instance of the publish-crates job is running at any given time to prevent race conditions
* correct publish = false
* Remove YAML anchors as GitLab's `extends:` doesn't need it
* Temporarily force cache upload for the new jobs
* Revert `RUSTY_CACHIER_FORCE_UPLOAD`
* pin libp2p-tcp=0.37.0 for sc-telemetry
* Revert "pin libp2p-tcp=0.37.0 for sc-telemetry"
This reverts commit 29146bfad6c31e8cf0e2f17ad92a71bb81a373af.
* always collect generated crates
* increase timeout for publish-crates-template
* Force upload the new job cache again
* Revert "Force upload the new job cache again"
This reverts commit 5a5feee1b2c51fdef768b25a76be4c3949ec1c99.
* reformat
* improve timeout explanation
* s/usual/average
Co-authored-by: Vladimir Istyufeev <vladimir@parity.io>
* Remove contracts RPCs
* Remove serde as RPC serialization is no longer needed
* Rename folder to match crate name
* Compile fix
* Remove Byte wrapper
* Fetch babe config data from runtime state
* Some renaming
* More renaming
* Final nits
* Fix tests and benches
* Rename to in BabeConfiguration
* Remove duplicate babe parameter description
Already specified over the 'PRIMARY_PROBABILITY' constant value
* trigger pipeline
* trigger pipeline
* bump jsonrpsee to fix#11480
In addition it adds WebSocket server-side pings which is configured to
send out pings periodically every 30 seconds.
* use released crates.io version
* Update Cargo.toml
* Add tokio
* No need to map CallError to CallError
* jsonrpsee proc macros (#9673)
* port error types to `JsonRpseeError`
* migrate chain module to proc macro api
* make it compile with proc macros
* update branch
* update branch
* update to jsonrpsee master
* port system rpc
* port state rpc
* port childstate & offchain
* frame system rpc
* frame transaction payment
* bring back CORS hack to work with polkadot UI
* port babe rpc
* port manual seal rpc
* port frame mmr rpc
* port frame contracts rpc
* port finality grandpa rpc
* port sync state rpc
* resolve a few TODO + no jsonrpc deps
* Update bin/node/rpc-client/src/main.rs
* Update bin/node/rpc-client/src/main.rs
* Update bin/node/rpc-client/src/main.rs
* Update bin/node/rpc-client/src/main.rs
* Port over system_ rpc tests
* Make it compile
* Use prost 0.8
* Use prost 0.8
* Make it compile
* Ignore more failing tests
* Comment out WIP tests
* fix nit in frame system api
* Update lockfile
* No more juggling tokio versions
* No more wait_for_stop ?
* Remove browser-testing
* Arguments must be arrays
* Use same argument names
* Resolve todo: no wait_for_stop for WS server
Add todo: is parse_rpc_result used?
Cleanup imports
* fmt
* log
* One test passes
* update jsonrpsee
* update jsonrpsee
* cleanup rpc-servers crate
* jsonrpsee: add host and origin filtering (#9787)
* add access control in the jsonrpsee servers
* use master
* fix nits
* rpc runtime_version safe
* fix nits
* fix grumbles
* remove unused files
* resolve some todos
* jsonrpsee more cleanup (#9803)
* more cleanup
* resolve TODOs
* fix some unwraps
* remove type hints
* update jsonrpsee
* downgrade zeroize
* pin jsonrpsee rev
* remove unwrap nit
* Comment out more tests that aren't ported
* Comment out more tests
* Fix tests after merge
* Subscription test
* Invalid nonce test
* Pending exts
* WIP removeExtrinsic test
* Test remove_extrinsic
* Make state test: should_return_storage work
* Uncomment/fix the other non-subscription related state tests
* test: author_insertKey
* test: author_rotateKeys
* Get rest of state tests passing
* asyncify a little more
* Add todo to note #msg change
* Crashing test for has_session_keys
* Fix error conversion to avoid stack overflows
Port author_hasSessionKeys test
fmt
* test author_hasKey
* Add two missing tests
Add a check on the return type
Add todos for James's concerns
* RPC tests for state, author and system (#9859)
* Fix test runner
* Impl Default for SubscriptionTaskExecutor
* Keep the minimul amount of code needed to compile tests
* Re-instate `RpcSession` (for now)
* cleanup
* Port over RPC tests
* Add tokio
* No need to map CallError to CallError
* Port over system_ rpc tests
* Make it compile
* Use prost 0.8
* Use prost 0.8
* Make it compile
* Ignore more failing tests
* Comment out WIP tests
* Update lockfile
* No more juggling tokio versions
* No more wait_for_stop ?
* Remove browser-testing
* Arguments must be arrays
* Use same argument names
* Resolve todo: no wait_for_stop for WS server
Add todo: is parse_rpc_result used?
Cleanup imports
* fmt
* log
* One test passes
* Comment out more tests that aren't ported
* Comment out more tests
* Fix tests after merge
* Subscription test
* Invalid nonce test
* Pending exts
* WIP removeExtrinsic test
* Test remove_extrinsic
* Make state test: should_return_storage work
* Uncomment/fix the other non-subscription related state tests
* test: author_insertKey
* test: author_rotateKeys
* Get rest of state tests passing
* asyncify a little more
* Add todo to note #msg change
* Crashing test for has_session_keys
* Fix error conversion to avoid stack overflows
Port author_hasSessionKeys test
fmt
* test author_hasKey
* Add two missing tests
Add a check on the return type
Add todos for James's concerns
* offchain rpc tests
* Address todos
* fmt
Co-authored-by: James Wilson <james@jsdw.me>
* fix drop in state test
* update jsonrpsee
* fix ignored system test
* fix chain tests
* remove some boiler plate
* Port BEEFY RPC (#9883)
* Merge master
* Port beefy RPC (ty @niklas!)
* trivial changes left over from merge
* Remove unused code
* Update jsonrpsee
* fix build
* make tests compile again
* beefy update jsonrpsee
* fix: respect rpc methods policy
* update cargo.lock
* update jsonrpsee
* update jsonrpsee
* downgrade error logs
* update jsonrpsee
* Fix typo
* remove unused file
* Better name
* Port Babe RPC tests
* Put docs back
* Resolve todo
* Port tests for System RPCs
* Resolve todo
* fix build
* Updated jsonrpsee to current master
* fix: port finality grandpa rpc tests
* Move .into() outside of the match
* more review grumbles
* jsonrpsee: add `rpc handlers` back (#10245)
* add back RpcHandlers
* cargo fmt
* fix docs
* fix grumble: remove needless alloc
* resolve TODO
* fmt
* Fix typo
* grumble: Use constants based on BASE_ERROR
* grumble: DRY whitelisted listening addresses
grumble: s/JSONRPC/JSON-RPC/
* cleanup
* grumbles: Making readers aware of the possibility of gaps
* review grumbles
* grumbles
* remove notes from niklasad1
* Update `jsonrpsee`
* fix: jsonrpsee features
* jsonrpsee: fallback to random port in case the specified port failed (#10304)
* jsonrpsee: fallback to random port
* better comment
* Update client/rpc-servers/src/lib.rs
Co-authored-by: Maciej Hirsz <1096222+maciejhirsz@users.noreply.github.com>
* Update client/rpc-servers/src/lib.rs
Co-authored-by: Maciej Hirsz <1096222+maciejhirsz@users.noreply.github.com>
* address grumbles
* cargo fmt
* addrs already slice
Co-authored-by: Maciej Hirsz <1096222+maciejhirsz@users.noreply.github.com>
* Update jsonrpsee to 092081a0a2b8904c6ebd2cd99e16c7bc13ffc3ae
* lockfile
* update jsonrpsee
* fix warning
* Don't fetch jsonrpsee from crates
* make tests compile again
* fix rpc tests
* remove unused deps
* update tokio
* fix rpc tests again
* fix: test runner
`HttpServerBuilder::builder` fails unless it's called within tokio runtime
* cargo fmt
* grumbles: fix subscription aliases
* make clippy happy
* update remaining subscriptions alias
* cleanup
* cleanup
* fix chain subscription: less boiler plate (#10285)
* fix chain subscription: less boiler plate
* fix bad merge
* cargo fmt
* Switch to jsonrpsee 0.5
* fix build
* add missing features
* fix nit: remove needless Box::pin
* Integrate jsonrpsee metrics (#10395)
* draft metrics impl
* Use latest api
* Add missing file
* Http server metrics
* cleanup
* bump jsonrpsee
* Remove `ServerMetrics` and use a single middleware for both connection counting (aka sessions) and call metrics.
* fix build
* remove needless Arc::clone
* Update to jsonrpsee 0.6
* lolz
* fix metrics
* Revert "lolz"
This reverts commit eed6c6a56e78d8e307b4950f4c52a1c3a2322ba1.
* fix: in-memory rpc support subscriptions
* commit Cargo.lock
* Update tests to 0.7
* fix TODOs
* ws server: generate subscriptionIDs as Strings
Some libraries seems to expect the subscription IDs to be Strings, let's not break
this in this PR.
* Increase timeout
* Port over tests
* cleanup
* Using error codes from the spec
* fix clippy
* cargo fmt
* update jsonrpsee
* fix nits
* fix: rpc_query
* enable custom subid gen through spawn_tasks
* remove unsed deps
* unify tokio deps
* Revert "enable custom subid gen through spawn_tasks"
This reverts commit 5c5eb70328fe39d154fdb55c56e637b4548cf470.
* fix bad merge of `test-utils`
* fix more nits
* downgrade wasm-instrument to 0.1.0
* [jsonrpsee]: enable custom RPC subscription ID generatation (#10731)
* enable custom subid gen through spawn_tasks
* fix nits
* Update client/service/src/builder.rs
Co-authored-by: David <dvdplm@gmail.com>
* add Poc; needs jsonrpsee pr
* update jsonrpsee
* add re-exports
* add docs
Co-authored-by: David <dvdplm@gmail.com>
* cargo fmt
* fmt
* port RPC-API dev
* Remove unused file
* fix nit: remove async trait
* fix doc links
* fix merge nit: remove jsonrpc deps
* kill namespace on rpc apis
* companion for jsonrpsee v0.10 (#11158)
* companion for jsonrpsee v0.10
* update versions v0.10.0
* add some fixes
* spelling
* fix spaces
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
* send error before subs are closed
* fix unsubscribe method names: chain
* fix tests
* jsonrpc server: print binded local address
* grumbles: kill SubscriptionTaskExecutor
* Update client/sync-state-rpc/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* Update client/rpc/src/chain/chain_full.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* Update client/rpc/src/chain/chain_full.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* sync-state-rpc: kill anyhow
* no more anyhow
* remove todo
* jsonrpsee: fix bad params in subscriptions. (#11251)
* update jsonrpsee
* fix error responses
* revert error codes
* dont do weird stuff in drop impl
* rpc servers: remove needless clone
* Remove silly constants
* chore: update jsonrpsee v0.12
* commit Cargo.lock
* deps: downgrade git2
* feat: CLI flag max subscriptions per connection
* metrics: use old logging format
* fix: read WS address from substrate output (#11379)
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
Co-authored-by: James Wilson <james@jsdw.me>
Co-authored-by: Maciej Hirsz <hello@maciej.codes>
Co-authored-by: Maciej Hirsz <1096222+maciejhirsz@users.noreply.github.com>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* setting flag
* flag in storage struct
* fix flagging to access and insert.
* added todo to fix
* also missing serialize meta to storage proof
* extract meta.
* Isolate old trie layout.
* failing test that requires storing in meta when old hash scheme is used.
* old hash compatibility
* Db migrate.
* runing tests with both states when interesting.
* fix chain spec test with serde default.
* export state (missing trie function).
* Pending using new branch, lacking genericity on layout resolution.
* extract and set global meta
* Update to branch 4
* fix iterator with root flag (no longer insert node).
* fix trie root hashing of root
* complete basic backend.
* Remove old_hash meta from proof that do not use inner_hashing.
* fix trie test for empty (force layout on empty deltas).
* Root update fix.
* debug on meta
* Use trie key iteration that do not include value in proofs.
* switch default test ext to use inner hash.
* small integration test, and fix tx cache mgmt in ext.
test failing
* Proof scenario at state-machine level.
* trace for db upgrade
* try different param
* act more like iter_from.
* Bigger batches.
* Update trie dependency.
* drafting codec changes and refact
* before removing unused branch no value alt hashing.
more work todo rename all flag var to alt_hash, and remove extrinsic
replace by storage query at every storage_root call.
* alt hashing only for branch with value.
* fix trie tests
* Hash of value include the encoded size.
* removing fields(broken)
* fix trie_stream to also include value length in inner hash.
* triedbmut only using alt type if inner hashing.
* trie_stream to also only use alt hashing type when actually alt hashing.
* Refactor meta state, logic should work with change of trie treshold.
* Remove NoMeta variant.
* Remove state_hashed trigger specific functions.
* pending switching to using threshold, new storage root api does not
make much sense.
* refactoring to use state from backend (not possible payload changes).
* Applying from previous state
* Remove default from storage, genesis need a special build.
* rem empty space
* Catch problem: when using triedb with default: we should not revert
nodes: otherwhise thing as trie codec cannot decode-encode without
changing state.
* fix compilation
* Right logic to avoid switch on reencode when default layout.
* Clean up some todos
* remove trie meta from root upstream
* update upstream and fix benches.
* split some long lines.
* UPdate trie crate to work with new design.
* Finish update to refactored upstream.
* update to latest triedb changes.
* Clean up.
* fix executor test.
* rust fmt from master.
* rust format.
* rustfmt
* fix
* start host function driven versioning
* update state-machine part
* still need access to state version from runtime
* state hash in mem: wrong
* direction likely correct, but passing call to code exec for genesis
init seem awkward.
* state version serialize in runtime, wrong approach, just initialize it
with no threshold for core api < 4 seems more proper.
* stateversion from runtime version (core api >= 4).
* update trie, fix tests
* unused import
* clean some TODOs
* Require RuntimeVersionOf for executor
* use RuntimeVersionOf to resolve genesis state version.
* update runtime version test
* fix state-machine tests
* TODO
* Use runtime version from storage wasm with fast sync.
* rustfmt
* fmt
* fix test
* revert useless changes.
* clean some unused changes
* fmt
* removing useless trait function.
* remove remaining reference to state_hash
* fix some imports
* Follow chain state version management.
* trie update, fix and constant threshold for trie layouts.
* update deps
* Update to latest trie pr changes.
* fix benches
* Verify proof requires right layout.
* update trie_root
* Update trie deps to latest
* Update to latest trie versioning
* Removing patch
* update lock
* extrinsic for sc-service-test using layout v0.
* Adding RuntimeVersionOf to CallExecutor works.
* fmt
* error when resolving version and no wasm in storage.
* use existing utils to instantiate runtime code.
* migration pallet
* Patch to delay runtime switch.
* Revert "Patch to delay runtime switch."
This reverts commit 67e55fee468f1a0cda853f5362b22e0d775786da.
* fix test
* fix child migration calls.
* useless closure
* remove remaining state_hash variables.
* Fix and add more tests
* Remove outdated comment
* useless inner hash
* fmt
* remote tests
* finally ksm works
* batches are broken
* clean the benchmarks
* Apply suggestions from code review
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
* Apply suggestions from code review
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
* Update frame/state-trie-migration/src/lib.rs
Co-authored-by: Joshy Orndorff <JoshOrndorff@users.noreply.github.com>
* Update frame/state-trie-migration/src/lib.rs
* brand new version
* fix build
* Update frame/state-trie-migration/src/lib.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
* Update frame/state-trie-migration/src/lib.rs
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
* Update primitives/storage/src/lib.rs
Co-authored-by: cheme <emericchevalier.pro@gmail.com>
* Update frame/state-trie-migration/src/lib.rs
Co-authored-by: cheme <emericchevalier.pro@gmail.com>
* Update frame/state-trie-migration/src/lib.rs
Co-authored-by: cheme <emericchevalier.pro@gmail.com>
* fmt and opt-in feature to apply state change.
* feature gate core version, use new test feature for node and test node
* Use a 'State' api version instead of Core one.
* fix merge of test function
* use blake macro.
* Fix state api (require declaring the api in runtime).
* Opt out feature, fix macro for io to select a given version
instead of latest.
* run test nodes on new state.
* fix
* new test structure
* new testing stuff from emeric
* Add commit_all, still not working
* Fix all tests
* add comment
* we have PoV tracking baby
* document stuff, but proof size is still wrong
* FUCK YEAH
* a big batch of review comments
* add more tests
* tweak test
* update config
* some remote-ext stuff
* delete some of the old stuff
* sync more files with master to minimize the diff
* Fix all tests
* make signed migration a bit more relaxed
* add witness check to signed submissions
* allow custom migration to also go above limit
* Fix these pesky tests
* ==== removal of the unsigned stuff ====
* Make all tests work again
* separate the tests from the logic so it can be reused easier
* fix overall build
* Update frame/state-trie-migration/src/lib.rs
Co-authored-by: cheme <emericchevalier.pro@gmail.com>
* Update frame/state-trie-migration/src/lib.rs
Co-authored-by: cheme <emericchevalier.pro@gmail.com>
* Slightly better termination
* some final tweaks
* Fix tests
* Restrict access to signed migrations
* mig rpc
* fix
* better rpc name
* Make rpc unsafe
* address most of the review comments
* fix defensive
* New simplified code
* Fix weights
* fmt
* Update frame/state-trie-migration/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* make the tests correctly fail
* Fix build
* Fix build
* try and fix the benchmarks
* fix build
* Fix cargo file
* Fix runtime deposit
* make rustdoc happy
* cargo run --quiet --profile=production --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_state_trie_migration --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/state-trie-migration/src/weights.rs --template=./.maintain/frame-weight-template.hbs
* update rpc deps, try to process empty keys.
* move rpc crate
* move check backend out of state machine
* Add primitive crate.
* module code
* fix runtime test
* StateMigrationStatusProvider
* Pass backend to rpc.
* fmt
* review changes
* move rpc crate
* try remove primitive crate
* Update utils/frame/rpc/state-trie-migration-rpc/Cargo.toml
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* review changes.
Co-authored-by: kianenigma <kian@parity.io>
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
Co-authored-by: Joshy Orndorff <JoshOrndorff@users.noreply.github.com>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Parity Bot <admin@parity.io>
* Mark sync_state_genSyncSpec JSON-RPC as safe
* Note that parameter is unused
* Ideally I'd wait for compilation to be finished before pushing, but it's really taking a long time
* Remove deny_unsafe parameter
* Remove unused dependency
Remove unneeded dependencies and dev-dependencies.
Made self_destruct test not dependent on wasm bin size.
Updated code related to deprecated warning on tracing-subscriber `scope()`
( See https://github.com/tokio-rs/tracing/issues/1429 )
* Decouples light-sync state from chain spec
This decouples the light-sync state from chain spec. First, the
light-sync state currently only works with BABE+Grandpa, so not
all *Substrate* based chains can use this feature. The next problem was
also that this pulled the `sc-consensus-babe` and `sc-finality-grandpa`
crate into `sc-chain-spec`.
If a chain now wants to support the light-sync state, it needs to add
the `LightSyncStateExtension` to the chain spec as an extension. This is
documented in the crate level docs of `sc-sync-state-rpc`. If this
extension is not available, `SyncStateRpc` fails at initialization.
* Fix compilation for browser
* Fmt
* Run cargo fmt on the whole code base
* Second run
* Add CI check
* Fix compilation
* More unnecessary braces
* Handle weights
* Use --all
* Use correct attributes...
* Fix UI tests
* AHHHHHHHHH
* 🤦
* Docs
* Fix compilation
* 🤷
* Please stop
* 🤦 x 2
* More
* make rustfmt.toml consistent with polkadot
Co-authored-by: André Silva <andrerfosilva@gmail.com>
* mark template and utils as non-publish
* switch to development version for testing
* activate unleash check
* maybe if I disable all rules...
* Fix isolated compilation of `max-encoded-len-derive` with `syn`
error[E0369]: binary operation `==` cannot be applied to type `syn::Path`
--> src/lib.rs:88:29
|
88 | .filter(|attr| attr.path == parse_quote!(max_encoded_len_crate))
| --------- ^^ ----------------------------------- _
| |
| syn::Path
error: aborting due to previous error
For more information about this error, try `rustc --explain E0369`.
Error: could not compile `max-encoded-len-derive`
* WIP: bump changes crates since v3 tag to next breaking
cargo unleash version bump-breaking --changed-since v3.0.0
cargo unleash version set-pre dev --changed-since v3.0.0
FIXME: Don't modify crates that are not yet released, e.g.
`max-encoded-len-derive`
* Update lockfile
* WIP: Bump sp-transaction-pool as well
* WIP: Bump sp-offchain as well
* WIP: Bump frame-system-rpc-runtime-api as well
* WIP: Bump sp-authority-discovery as well
* Manually deactivate dev-deps before `cargo unleash check`
Otherwise we run into `Cycle detected` error.
* Bump sp-consensus-slots
* Add missing Cargo.lock change
* Bump sp-consensus-vrf as well
* Bump sp-keyring as well
* Bump sp-consensus-pow as well
* Try to speed up the `unleash-check` job
Previously, the job took 106 minutes - let's see if explicitly
specifying a `CARGO_TARGET_DIR` will help
* fixup: Ensure the temp target dir exists for unleash check
* Bump pallet-transaction-payment-rpc-runtime-api as well
Needed for Polkadot
* Bump pallet-transaction-payment-rpc as well
Needed for Polkadot
* Try updating crates after patching in the Polkadot CI job
* Use another approach to update patched Substrate crates
* Try to update all sp-core versions in Polkadot CI job
* Simplify sp-core version checking
* Apply another shellcheck lint
* Just do the simplest thing I guess
* Welp don't do --offline then
* Clean up `unleash-check` job triggers
Co-authored-by: Denis Pisarev <denis.pisarev@parity.io>
* Fix a note in unleash-check cache step
* Add a note about temporary optimization in cargo-unleash
* Pin a newer version of cargo-unleash
Co-authored-by: Igor Matuszewski <xanewok@gmail.com>
Co-authored-by: Denis Pisarev <denis.pisarev@parity.io>
* contracts: Add RPC that allows instantiating of a contract
* Encode `debug_message` as bytes because usage of `String` is forbidden
* Remove erroneous derive attribute
* Fix rpc tests for new `debug_message` encoding
* Fix typo
Co-authored-by: Andrew Jones <ascjones@gmail.com>
Co-authored-by: Andrew Jones <ascjones@gmail.com>