* 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>
* Add MMR custom RPC.
* Change RuntimeApi to avoid hardcoding leaf type.
* Properly implement the new RuntimeAPI and wire up RPC.
* Extract Offchain DB as separate execution extension.
* Enable offchain DB access for offchain calls.
* Fix offchain_election tests.
* Skip block initialisation for proof generation.
* Fix integration test setup.
* Fix offchain tests. Not sure how I missed them earlier 🤷.
* Fix long line.
* One more test missing.
* Update mock for multi-phase.
* Address review grumbbles.
* Address review grumbles.
* Fix line width of a comment
* Initial draft
* Add an iterator that helps us get most items
* Revert changes to grandpa
* Change fields to just be the grandpa authority set and babe epoch changes
* Only use the fields we need from the shared authority set
* Switch to RPC call
* Revert "Only use the fields we need from the shared authority set"
This reverts commit 6ede87b0c5fe53f251d7cb45951006a7dc8f9b83.
* Add babe_finalized_block_weight from `ashley-improve-sync-state-WIP-loading`
* Fix rpc test
* Move sync state rpc stuff into sc-sync-state-rpc
* Remove as_json_value and remove unwraps from sc-sync-state-rpc
* Add clone_inner to SharedAuthoritySet
* Asyncify sign_with
* Asyncify generate/get keys
* Complete BareCryptoStore asyncification
* Cleanup
* Rebase
* Add Proxy
* Inject keystore proxy into extensions
* Implement some methods
* Await on send
* Cleanup
* Send result over the oneshot channel sender
* Process one future at a time
* Fix cargo stuff
* Asyncify sr25519_vrf_sign
* Cherry-pick and fix changes
* Introduce SyncCryptoStore
* SQUASH ME WITH THE first commit
* Implement into SyncCryptoStore
* Implement BareCryptoStore for KeystoreProxyAdapter
* authority-discovery
* AURA
* BABE
* finality-grandpa
* offchain-workers
* benchmarking-cli
* sp_io
* test-utils
* application-crypto
* Extensions and RPC
* Client Service
* bin
* Update cargo.lock
* Implement BareCryptoStore on proxy directly
* Simplify proxy setup
* Fix authority-discover
* Pass async keystore to authority-discovery
* Fix tests
* Use async keystore in authority-discovery
* Rename BareCryptoStore to CryptoStore
* WIP
* Remote mutable borrow in CryptoStore trait
* Implement Keystore with backends
* Remove Proxy implementation
* Fix service builder and keystore user-crates
* Fix tests
* Rework authority-discovery after refactoring
* futures::select!
* Fix multiple mut borrows in authority-discovery
* Merge fixes
* Require sync
* Restore Cargo.lock
* PR feedback - round 1
* Remove Keystore and use LocalKeystore directly
Also renamed KeystoreParams to KeystoreContainer
* Join
* Remove sync requirement
* Fix keystore tests
* Fix tests
* client/authority-discovery: Remove event stream dynamic dispatching
With authority-discovery moving from a poll based future to an `async`
future Rust has difficulties propagating the `Sync` trade through the
generated state machine.
Instead of using dynamic dispatching, use a trait parameter to specify
the DHT event stream.
* Make it compile
* Fix submit_transaction
* Fix block_on issue
* Use await in async context
* Fix manual seal keystore
* Fix authoring_blocks test
* fix aura authoring_blocks
* Try to fix tests for auth-discovery
* client/authority-discovery: Fix lookup_throttling test
* client/authority-discovery: Fix triggers_dht_get_query test
* Fix epoch_authorship_works
* client/authority-discovery: Remove timing assumption in unit test
* client/authority-discovery: Revert changes to termination test
* PR feedback
* Remove deadcode and mark test code
* Fix test_sync
* Use the correct keyring type
* Return when from_service stream is closed
* Convert SyncCryptoStore to a trait
* Fix line width
* Fix line width - take 2
* Remove unused import
* Fix keystore instantiation
* PR feedback
* Remove KeystoreContainer
* Revert "Remove KeystoreContainer"
This reverts commit ea4a37c7d74f9772b93d974e05e4498af6192730.
* Take a ref of keystore
* Move keystore to dev-dependencies
* Address some PR feedback
* Missed one
* Pass keystore reference - take 2
* client/finality-grandpa: Use `Arc<dyn CryptoStore>` instead of SyncXXX
Instead of using `SyncCryptoStorePtr` within `client/finality-grandpa`,
which is a type alias for `Arc<dyn SyncCryptoStore>`, use `Arc<dyn
CryptoStore>`. Benefits are:
1. No additional mental overhead of a `SyncCryptoStorePtr`.
2. Ability for new code to use the asynchronous methods of `CryptoStore`
instead of the synchronous `SyncCryptoStore` methods within
`client/finality-granpa` without the need for larger refactorings.
Note: This commit uses `Arc<dyn CryptoStore>` instead of
`CryptoStorePtr`, as I find the type signature more descriptive. This is
subjective and in no way required.
* Remove SyncCryptoStorePtr
* Remove KeystoreContainer & SyncCryptoStorePtr
* PR feedback
* *: Use CryptoStorePtr whereever possible
* *: Define SyncCryptoStore as a pure extension trait of CryptoStore
* Follow up to SyncCryptoStore extension trait
* Adjust docs for SyncCryptoStore as Ben suggested
* Cleanup unnecessary requirements
* sp-keystore
* Use async_std::task::block_on in keystore
* Fix block_on std requirement
* Update primitives/keystore/src/lib.rs
Co-authored-by: Max Inden <mail@max-inden.de>
* Fix wasm build
* Remove unused var
* Fix wasm compilation - take 2
* Revert async-std in keystore
* Fix indent
* Fix version and copyright
* Cleanup feature = "std"
* Auth Discovery: Ignore if from_service is cloed
* Max's suggestion
* Revert async-std usage for block_on
* Address PR feedback
* Fix example offchain worker build
* Address PR feedback
* Update Cargo.lock
* Move unused methods to test helper functions
* Restore accidentally deleted cargo.lock files
* Fix unused imports
Co-authored-by: Max Inden <mail@max-inden.de>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
* grandpa-rpc: use FinalityProofProvider to check finality for rpc
* grandpa-rpc: minor tidy
* grandpa-rpc: remove dyn FinalityProofProvider
* grandpa-rpc: remove unused dependencies
* node: move finality_proof_provider setup
* grandpa-rpc: print error reported by finality_proof_provider
* grandpa-rpc: add note about unnecessary encode/decode
* grandpa-rpc: dont encode/decode and use correct hash
* grandpa-rpc: set_id is optional
* grandpa-rpc: create test for prove_finality
* grandpa-rpc: set visibility back to how it was
* grandpa-rpc: remove unused dependency
* grandpa-rpc: minor tidy
* grandpa: doc strings
* grandpa-rpc: rename to prove_finality
* grandpa-rpc: use current set id if none is provided
* grandpa-rpc: remove unnecessary check in test
* node: group finality_proof_provider in rpc_setup
* grandpa: make prove_finality concrete in FinalityProofProvider
* grandpa-rpc: wrap finality output in struct and store as Bytes
* grandpa-rpc: exhaustive error codes and wrap
* grandpa-rpc: let prove_finality take a range instead of a starting point
* grandpa-rpc: fix test for changed API
* grandpa-rpc: fix line length
* grandpa: fix reviewer nits
* node/rpc: fix reviewer comments
* service builder: fix todo about jsonrpc Option workaround
* grandpa-rpc: only share executor instead of sub manager
* grandpa-rpc: fix compilation
* grandpa-rpc: rename to subscription_executor
* node/cli: remove another unused jsonrpc dependency
* grandpa: apply style fixes from code review
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Rough skeleton for what I think the RPC should look like
* Create channel for sending justifications
Sends finalized header and justification from Grandpa to the
client. This lays the groundwork for hooking into the RPC module.
* WIP: Add subscribers for justifications to Grandpa
Adds the Sender end of a channel into Grandpa, through which notifications
about block finality events can be sent.
* WIP: Add a struct for managing subscriptions
Slightly different approach from the last commit, but same
basic idea. Still a rough sketch, very much doesn't compile yet.
* Make naming more clear and lock data in Arc
* Rough idea of what RPC would look like
* Remove code from previous approach
* Missed some things
* Update client/rpc-api/src/chain/mod.rs
Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
* Update client/rpc-api/src/chain/mod.rs
Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
* Split justification subscription into sender and receiver halves
* Replace RwLock with a Mutex
* Add sample usage from the Service's point of view
* Remove code that referred to "chain_" RPC
* Use the Justification sender/receivers from Grandpa LinkHalf
* Add some PubSub boilerplate
* Add guiding comments
* TMP: comment out to fix compilation
* Return MetaIoHandler from PubSubHandler in create_full
* Uncomment pubsub methods in rpc handler (fails to build)
* node/rpc: make Metadata concrete in create_full to fix compilation
* node: pass in SubscriptionManger to grandpa rpc handler
* grandpa-rpc: use SubscriptionManger to add subscriber
* grandpa-rpc: attempt at setting up the justification stream (fails to build)
* grandpa-rpc: fix compilation of connecting stream to sink
* grandpa-rpc: implement unsubscribe
* grandpa-rpc: update older tests
* grandpa-rpc: add full prefix to avoid confusing rust-analyzer
* grandpa-rpc: add test for pubsub not available
* grandpa-rpc: tidy up leftover code
* grandpa-rpc: add test for sub and unsub of justifications
* grandpa-rpc: minor stylistic changes
* grandpa-rpc: split unit test
* grandpa-rpc: minor stylistic changes in test
* grandpa-rpc: skip returning future when cancelling
* grandpa-rpc: reuse testing executor from sc-rpc
* grandpa-rpc: don't need to use PubSubHandler in tests
* node-rpc: use MetaIoHandler rather than PubSubHandler
* grandpa: log if getting header failed
* grandpa: move justification channel creation into factory function
* grandpa: make the justification sender optional
* grandpa: fix compilation warnings
* grandpa: move justification notification types to new file
* grandpa-rpc: move JustificationNotification to grandpa-rpc
* grandpa-rpc: move JustificationNotification to its own file
* grandpa: rename justification channel pairs
* grandpa: rename notifier types
* grandpa: pass justification as GrandpaJustification to the rpc module
* Move Metadata to sc-rpc-api
* grandpa-rpc: remove unsed error code
* grandpa: fix bug for checking if channel is closed before sendind
* grandpa-rpc: unit test for sending justifications
* grandpa-rpc: update comments for the pubsub test
* grandpa-rpc: update pubsub tests with more steps
* grandpa-rpc: fix pubsub test
* grandpa-rpc: minor indendation
* grandpa-rpc: decode instead of encode in test
* grandpa: fix review comments
* grandpa: remove unused serde dependency
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
Co-authored-by: Jon Häggblad <jon.haggblad@gmail.com>
Co-authored-by: Tomasz Drwięga <tomasz@parity.io>
The transaction payment runtime api used its own extrinsic generic
parameter. This is wrong, because this resulted in using always the
native extrinsic. If there was a runtime upgrade that changed the
extrinsic in some way, it would result in the api breaking. The correct
way is to use the `Extrinsic` from the `Block` parameter. This is on the
node side the opaque extrinsic and on the runtime side the real extrinsic.
* Remove service components and add build_network, build_offchain_workers etc
* Improve transaction pool api
* Remove commented out line
* Add PartialComponents
* Add BuildNetworkParams, documentation
* Remove unused imports in tests
* Apply suggestions from code review
Co-authored-by: Nikolay Volf <nikvolf@gmail.com>
* Remove unused imports in node-bench
Co-authored-by: Nikolay Volf <nikvolf@gmail.com>
* grandpa: wire up basic RPC call
* grandpa: make it compile against GRANDPA with expose round state
* grandpa: use shared voter state to expose RPC endpoint
* grandpa: restructure into nested structs
* grandpa: return background rounds too
* grandpa: return error when endpoint not ready
* grandpa: collect grandpa rpc deps
* grandpa: decide to use concrete AuthorityId in finality-grandpa-rpc
* grandpa: remove unncessary type annotation
* grandpa: move error code to const
* grandpa: remove unnecessary WIP comment
* grandpa: remove Id type parameter for SharedVoterState
* grandpa: update tests to add shared_voter_state in parameters
* grandpa: remove old deprecated test
* grandpa: fix getting the correct set_id
* grandpa: make SharedVoterState a struct
* grandpa: wrap shared_voter_state in rpc_setup
* grandpa: replace spaces with tabs
* grandpa: limit RwLock write attempt to 1 sec
* grandpa: add missing doc comments and remove some pub
* Apply suggestions from code review
Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
Co-Authored-By: Hernando Castano <HCastano@users.noreply.github.com>
* grandpa: update function name call after change in finality-grandpa
* grandpa: group pub use and only export voter::report
* grandpa: add missing docs
* grandpa: extract out structs used for json serialization
* grandpa: stick to u32 for fields intended for js
* grandpa: move Error type to its own file
* grandpa: group pub use better
* Apply code review suggestion
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* grandpa: use correct version of finality-granpda in rpc crate
* grandpa: add back basic rpc unit test
* grandpa: replace SharedVoterState::new() with empty()
* node: cleanup grandpa::SharedVoterState usage in macro
* grandpa: remove VoterState error variant
* grandpa: enable missing futures compat feature
* grandpa: fix typo in error variant
* grandpa: remove test_utils
* grandpa: allow mocking rpc handler components
* grandpa: rename serialized to report in rpc module
* grandpa: add proper test for RPC
* grandpa: update to finality-grandpa v0.12.1
Co-authored-by: André Silva <andre.beat@gmail.com>
Co-authored-by: Demi Obenour <demi@parity.io>
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* Drop client from sc-network and sc-client-db, move LongestChain to sc-client-api
* move leaves, cht, in_mem to sc-client-api, drop client from sc-finality-grandpa
* drop sc-service from sc-rpc
* drop sc-service from sc-consensus-aura
* drop sc-client from manual-seal and babe
* drop sc-client from utils/frame/rpc/system and utils/frame/benchmarking-cli
* drop sc-client from bin/node and bin/node-template
* drop sc-client
* fix tests
* remove check -p sc-client from gitlab.yml
* fix warnings
* fixes ui test
* fix light client tests
* adds associated Client type to AbstractService
* adds UsageProvider to Client
* fixed ui test, again
* tried and failed to get node-cli to compile for wasm
* thanks to tomaka for helping me get node-cli to compile for wasmm
* ui test pls pas 🙏🏾
* all tests passing 🪄
* no_run documentation code
* rm -f documentation code
* ClientProvider
* fix mega trait
* move LongestChain to sc-consensus, use adds minimal bounds to AbstractService::Client
* adds license to sc-consensus
Co-authored-by: Benjamin Kampmann <ben@parity.io>
* babe_epochAuthorship
remove test-helpers from sp-keyring, bump spec_version, impl_version
* bump Cargo.lock
* add BabeRPC to node-rpc
* rename to BabeApi, remove err_derive
* pass &ServiceBuilder to with_rpc_extensions callback
* sc-consensus-babe-rpc
* Update client/consensus/babe/src/lib.rs
Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
* Better docs, code style chanegs
Co-Authored-By: André Silva <andre.beat@gmail.com>
* new line at the end of Cargo.toml
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
Co-authored-by: André Silva <andre.beat@gmail.com>
* Extend `Proposer` to optionally generate a proof of the proposal
* Something
* Refactor sr-api to not depend on client anymore
* Fix benches
* Apply suggestions from code review
Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
* Apply suggestions from code review
* Introduce new `into_storage_changes` function
* Switch to runtime api for `execute_block` and don't require `H256`
anywhere in the code
* Put the `StorageChanges` into the `Proposal`
* Move the runtime api error to its own trait
* Adds `StorageTransactionCache` to the runtime api
This requires that we add `type NodeBlock = ` to the
`impl_runtime_apis!` macro to work around some bugs in rustc :(
* Remove `type NodeBlock` and switch to a "better" hack
* Start using the transaction cache from the runtime api
* Make it compile
* Move `InMemory` to its own file
* Make all tests work again
* Return block, storage_changes and proof from Blockbuilder::bake()
* Make sure that we use/set `storage_changes` when possible
* Add test
* Fix deadlock
* Remove accidentally added folders
* Introduce `RecordProof` as argument type to be more explicit
* Update client/src/client.rs
Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
* Update primitives/state-machine/src/ext.rs
Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
* Integrates review feedback
* Remove `unsafe` usage
* Update client/block-builder/src/lib.rs
Co-Authored-By: Benjamin Kampmann <ben@gnunicorn.org>
* Update client/src/call_executor.rs
* Bump versions
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
Co-authored-by: Benjamin Kampmann <ben.kampmann@googlemail.com>
* Adding script for rename, could be applicable for nodes on top of it, too
* add stderr and gitlab ci features
* apply script
* fix now minor details in expected stderr
* Update the Cargo.lock
* fix name: sc-transaction -> sc-tracing
* fix rename in script, too
* Move transaction pool to primitives
* move backend, errors into primitives
* remove unused client depencies
* Move rpc-api into primitives
* Move peerset back to client
* Move rpc/api back to client, move palette/support/rpc into utils
* move support-rpc into subfolder
* move system-rpc into utils
* move transaction-pool and -graph back into client
* fix broken imports
* Clean up test primitives
* Make support test utils independent of frame
* remove unnecessary node dependencies from service
* Reactivate dependency script:
- only enforce the now achieved status quo will remain
- allow for primitives to depend on /client for now without failing
- more discriptive error message so people understand, what it wants
- minor fix to differentiative between ../client and /client (which may be a subfolder)
- don't allow this to fail anylonger.
* fix doc comment
* 'Should not' rather than 'must not'.
* Revert unwanted dependency changes
* fix faulty import
* fixup derive_more version
* fix wrong import path
* /paint to /palette
* rename paint to palette
* rename the modules in palette to be pallets
* update Structure.adoc
* bump impl
* fix CI directory
* Update docs/Structure.adoc
Co-Authored-By: Benjamin Kampmann <ben@gnunicorn.org>
* Adding first rough ouline of the repository structure
* Remove old CI stuff
* add title
* formatting fixes
* move node-exits job's script to scripts dir
* Move docs into subdir
* move to bin
* move maintainence scripts, configs and helpers into its own dir
* add .local to ignore
* move core->client
* start up 'test' area
* move test client
* move test runtime
* make test move compile
* Add dependencies rule enforcement.
* Fix indexing.
* Update docs to reflect latest changes
* Moving /srml->/paint
* update docs
* move client/sr-* -> primitives/
* clean old readme
* remove old broken code in rhd
* update lock
* Step 1.
* starting to untangle client
* Fix after merge.
* start splitting out client interfaces
* move children and blockchain interfaces
* Move trie and state-machine to primitives.
* Fix WASM builds.
* fixing broken imports
* more interface moves
* move backend and light to interfaces
* move CallExecutor
* move cli off client
* moving around more interfaces
* re-add consensus crates into the mix
* fix subkey path
* relieve client from executor
* starting to pull out client from grandpa
* move is_decendent_of out of client
* grandpa still depends on client directly
* lemme tests pass
* rename srml->paint
* Make it compile.
* rename interfaces->client-api
* Move keyring to primitives.
* fixup libp2p dep
* fix broken use
* allow dependency enforcement to fail
* move fork-tree
* Moving wasm-builder
* make env
* move build-script-utils
* fixup broken crate depdencies and names
* fix imports for authority discovery
* fix typo
* update cargo.lock
* fixing imports
* Fix paths and add missing crates
* re-add missing crates