* Global registration of type segmenters for event decoding
* Perform type sizes check when building client
* Introduce EventTypeRegistry for global runtime type sizes
* Fmt
* Register runtime type sizes on creation of EventTypeRegistry
* Register more default dispatch types
* Add missing type sizes
* fmt
* Fix up register_type_size builder method
* Update doc comments
* Make register_default_type_sizes public
* Don't allow duplicate registered types
* Remove call to supertraits type registration, done manually in Runtime
* Fix tests and warnings
* Fix duplicate type registration
* Fmt
* review: use is_empty()
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
* Add panic docs
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
* Upgrade to substrate 2.0.0
* WIP implement Subcommand manually (see https://github.com/paritytech/substrate/pull/6894#issuecomment-676060197)
* Add pallet-staking/std to the std feature
* Sort out the subcommand impl
* Sort out the module index (ty @ascjones)
Sort out the RefCount type (ty @dvc94ch)
Random tweaks to make test-node more similar to the vanilla node-template
* obey the fmt
* Add changelog and bump versions
* Merge #165 and update CHANGELOG
* Update test-node/runtime/src/lib.rs
Co-authored-by: Demi Marie Obenour <demiobenour@gmail.com>
* Update CHANGELOG.md
Co-authored-by: Demi Marie Obenour <demiobenour@gmail.com>
Co-authored-by: Demi Marie Obenour <demiobenour@gmail.com>
* Upgrade to substrate 2.0.0
* WIP implement Subcommand manually (see https://github.com/paritytech/substrate/pull/6894#issuecomment-676060197)
* Add pallet-staking/std to the std feature
* Sort out the subcommand impl
* Sort out the module index (ty @ascjones)
Sort out the RefCount type (ty @dvc94ch)
Random tweaks to make test-node more similar to the vanilla node-template
* obey the fmt
* cleanup
* more cleanup
* Initial Staking API
* Add more staking types
* Reformat
* Remove dead code
* Fix missing documentation
* Reformat
* Staking: use proc macros
* Add partial session support
* Reformat
* Try to implement nomination
This currently fails with compilation errors I do not understand.
* Use the #[module] macro
This fixes a compile error
* Explain undefined method diagnostics
* Use ‘#[module]’ and implement session for Kusama
* Don’t impl ‘Staking’ for all ‘T: System’
* Add staking payout support
* Fix compilation errors and remove useless lifetimes
* Respond to code review
This fixes most of the issues found during review, with the exception of
tests.
* Make signing fallable and asynchronous
This is needed for hardware wallets, which require human confirmation to
sign transactions. Blocking on a human to sign transactions is not a
good idea, and the signing might fail for many reasons (device
unplugged, authorization not granted, etc).
* Reformat
* Refactor as suggested by Andrew Jones (@ascjones).
* Reformat
* Refactor as suggested by Andrew Jones (@ascjones).
* Trait cleanups
* Make the `Signer` impl require Send + Sync
This is what Ledgeracio needs.
* Use the correct key for staking maps
They use the key type, not ‘PhantomData’.
* Implement set_payee call
* Switch to associated types for Staking
* Implement `set_keys`
This is needed for Ledgeracio.
* Remove impl of Signer for Box<dyn Signer + Send + Sync>
It isn’t needed, since Box implements Deref.
* Fix Polkadot and Kusama ‘SessionKey’ structs
I had failed to include the ‘Parachains’ component, which the default
Substrate runtime doesn’t have.
* Include a copy of `ValidatorId`
This avoids needing to depend on Polkadot.
* Fix syntax error in Cargo.toml
* Fix compile errors
* Add Debug impls
* Fix return type of `BondedStore`
* Use some upstream type definitions
Also add `Default` impls.
* Bump deps and fix build
* Remove last reference to Kusama feature
* Fix compilation errors
* Implement the `concat` in `twox_64_concat`
* Expose properties and per-era preferences
* Era rewards point support
I also did some refactoring.
* Expose clipped exposure
* Era reward points support
* Make `PayoutStakersCall` public
* Add in all default features for debugging
* Chill support and update to latest Substrate
* If property fetch fails, use dummy values
* Fix tests
* Fix header
* Remove some code Ledgeracio does not need
* More deletions
* Remove more code not needed for Ledgeracio
* Remove a pointless change in Cargo.toml
w.r.t. upstream.
* Remove more junk
* Revert contracts put_code test to pure code (not using the macro)
* Test contract instantiate
* Fmt
* WIP
* Add some more submission tests
* Reformat
* More tests
* Cleanup
* Hopefully fix CI
* Remove dead code
* Test chill
* Add missing docs
* Remove unnecessary use
* Revert "Remove unnecessary use"
This reverts commit bc8bc36bde581f1892ea88a778dfe0fe5bff24d7.
* Retry on temporary failures
* Ignore the staking tests on CI
* Obey the fmt
* Run CI with at most one test thread
* Implement tests for staking
* More tests
* Remove unhelpful println!
* Revert changes in contract tests
* Reformat
* Remove spurious diff
* More tests
Co-authored-by: Demi M. Obenour <demiobenour@gmail.com>
Co-authored-by: David Palm <dvdplm@gmail.com>
Co-authored-by: Andrew Jones <ascjones@gmail.com>
* Extract extrinsic
* Extract extrinsic types to own module
* Fix compiler errors
* Fix warnings
* Fmt
* Pin wabt-sys to 0.7.1, it fails (on my machine) with 0.7.2
* Fix up tests
* Fmt
* Reexport RuntimeVersion
* Make signing fallable and asynchronous
This is needed for hardware wallets, which require human confirmation to
sign transactions. Blocking on a human to sign transactions is not a
good idea, and the signing might fail for many reasons (device
unplugged, authorization not granted, etc).
* Reformat
* Refactor as suggested by Andrew Jones (@ascjones).
* Use future::ok
Co-authored-by: Andrew Jones <ascjones@gmail.com>
* Update to substrate alpha.7
* Remove gas limit from contracts put code
* Rename SystemEvent::ReapedAccount to KilledAccount
* Log debug event received before attempting to decode
* Temporary registration of Balance type before #102 merged
* Show contract test errors, increase instantiate gas_limit
* Support custom clients.
* Simplify trait bounds.
* Plain and double map storage support.
* Simplify more trait bounds.
* Add proc macro.
* Add Call, Event and Store traits.
* Update proc-macros.
* Add with_system for proc-macro.
* proc-macro: test: support signature and extra fields.
* proc-macro: test: support sharing state accross steps.
* proc-macro: test: fetch state sequentially.
* Elide lifetimes.
* Add test for plain storage.
* Run rustfmt.
* Use substrate dependencies from crates.io
* Remove test that depends on node_runtime.
Because node_runtime is not on crates.io and was downloading duplicate substrate dependencies. The integration tests will test whether the serialization of keys and calls works.
* Fix updated jsonrpsee compilation errors
* Add missing frame-metadata dependency
* WIP
* Begin converting rpc layer to use std futures and jsonrpsee
* Convert metadata to async/await
* Convert block_hash to async/await
* Convert more methods to async/await
* Remove sp_rpc
* Fix more compilation errors
* Remove connect
* Starting to convert subscription functions
* Use jsonrpsee branch from PR for public client types
* Implement subscribe events with jsonrpsee subscription
* Converting subscriptions and wait_for_block_events
* WIP converting lib methods to async
* Use shared client reference directly for rpc call
`rpc_api!` macro currently only supports RawClient (which cannot be shared).
Also supports named params only which is not currently compatible with substrate rpd which accepts only positional params.
* Use &self instead of &mut self for shared Client
* Convert submit_and_watch to async/await
* Convert more Client fns to async
* Pin some trait futures
* Add serde error
* Fix client creation
* Fix client request compiler errors
* Unify metadata errors
* Add WS handshake error variant
* Fix some more compiler errors
* Fix more compiler errors
* Convert submit_extrinsic to async
* Convert submit and submit_and_watch
* Add Send + Sync constraints
* Clone clients
* Fix EventArg conversion error
* Fix remaining warnings/errors
* Replace deny warnings with specific lints
* Infallable subscription loops
* Use jsonrpsee wss branch
* Fix example
* Start to fix up tests
* Make contracts tests compile
* Make some more tests pass
* Fix up remaining tests
* Fmt
* Use correct event storage key type
* Fix finding events
* Use master jsonrpsee
* Move contracts tests to contracts module
* Add test for instantiating a contract
* Fix InstantiateArgs encoding
* Ignore PhantomData primitives, they are 0
* Increase endowment and log code hash
* Update SystemEvent
* Fix codec import
* Oops
* Write buffer directly to output to avoid encoding vec
* Debug with StorageChanges encoded as hex
* Logging and format code
* Fix the module index used to create a encoded func
Same as Events, modules with no calls should be ignored when calculating
the module index.
* Update substrate