* Build every wasm crate in its own project with wasm-builder
Building all wasm crates in one workspace was a nice idea, however it
just introduced problems:
1. We needed to prune old members, but this didn't worked for old git
deps.
2. We locked the whole wasm workspace while building one crate. This
could lead to infinitely locking the workspace on a crash.
Now we just build every crate in its own project, this means we will
build the dependencies multiple times. While building the dependencies
multiple times, we still decrease the build time by around 30 seconds
for Polkadot and Substrate because of the new parallelism ;)
* Remove the requirement on wasm-builder-runner
This removes the requirement on wasm-builder-runner by using the new
`build_dep` feature of cargo. We use nightly anyway and that enables us
to use this feature. This solves the problem of not mixing
build/proc-macro deps with normal deps. By doing this we get rid off
this complicated project structure and can depend directly on
`wasm-builder`. This also removes all the code from wasm-builder-runner
and mentions that it is deprecated.
* Copy the `Cargo.lock` to the correct folder
* Remove wasm-builder-runner
* Update docs
* Fix deterministic check
Modified-by: Bastian Köcher <git@kchr.de>
* Try to make the ui test happy
* Switch to `SKIP_WASM_BUILD`
* Rename `SKIP_WASM_BINARY` to the correct name...
* Update utils/wasm-builder/src/builder.rs
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Update utils/wasm-builder/src/builder.rs
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* More extensible multiaddress format
* update name
* Don't depend on indices to define multiaddress type
* Use MultiAddress in Node Template too!
* reduce traits, fix build
* support multiple `StaticLookup`
* bump tx version
* feedback
* babe: backoff authoring blocks when finality lags
* babe: move backoff authoring params to default constructor
* babe: deduplicate the test a bit
* babe: set backoff constants in service
* babe: use better names for backoff authoring block parameters
* babe: remove last unwrap
* babe: slight style tweak
* babe: fix comment
* slots: move backoff block authorship logic to SimpleSlotWorker
* aura: append SlotInfo in on_slot
* slots: use the correct types for parameters
* slots: fix review comments
* aura: add missing backoff authoring blocks parameters
* slots: add comments for default values
* slots: add additional checks in test
* slots: update implementation for new master
* slots: revert the change to SlotInfo
* Fix review comments
* slots: rework unit tests for backing off claiming slots
* slots: add test for asymptotic behaviour for slot claims
* slots: address review comments
* slots: add test for max_interval
* slots: add assertion for intervals between between claimed slots
* slots: remove rustfmt directive
* slots: another attempt at explaining authoring_rate
* slots: up unfinalized_slack to 50 by default
* slots: add tests for time to reach max_interval
* slots: fix typo in comments
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* slots: additional tweaks to comments and info calls
* slots: rename to BackoffAuthoringOnFinalizedHeadLagging
* slots: make the backing off strategy generic
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* slots: implement backoff trait for () for simplicity
* slots: move logging inside backing off function to make it more specific
* aura: add missing function parameter
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
The function takes a closure that resolved before to a `TaskManager`,
now it resolves to a `Future` which output is a `TaskManager`. This is
required for node setups that are async.
* Fixes bug in wasm-builder with cargo publish
There was a bug in wasm-builder which resulted in generating a
`Cargo.lock` in the project directory because of running `cargo
metadata`. This resulted in commands like `cargo publish` to fail (if
there was no `Cargo.lock` before building), because it checks that the
project directory isn't modified.
* Update utils/wasm-builder/src/wasm_project.rs
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Release new version of wasm-builder-runner
Besides the new version this merges `SKIP_WASM_BUILD` and
`BUILD_DUMMY_WASM_BINARY`, this means a file is generated with
`SKIP_WASM_BUILD` if no file existed before.
* Update utils/wasm-builder-runner/Cargo.toml
* Update utils/wasm-builder-runner/src/lib.rs
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Update versions
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* 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>
* Rename `ModuleToIndex` to `PalletRuntimeSetup`
Besides the renaming it also adds support getting the name of a pallet
as configured in the runtime.
* Rename it to `PalletInfo`
* Remove accidentally added files
* Re-generate READMEs to fix doc links; set readme field in package manifests
* Re-generate READMEs to fix doc links; set readme field in package manifests
* Re-generate READMEs to fix doc links; set readme field in package manifests
* Re-generate READMEs to fix doc links; set readme field in package manifests
* Revert stuff that shouldn't have been committed
* Revert stuff that shouldn't have been committed
* Fix parent relative link generation
* Manually remove this incorrect link for now.
* Bump version
* update test-utils crates to be ready for publishing
* adding changelog
* Adding automaticly generated READMEs
* fixing versions
* another version mishap
* draft
* revert
* WIP
* all that remains is tests
* update Cargo.lock
* tests WIP
* WIP refactor node-template-runtime and node-runtime
* implments sc_cli::RuntimeAdapter for node_template_runtime::Runtime
* final draft
* fix update_config for subcommands
* proper AccountId decoding
* test-runtime tests
* revert
* move RuntimeAdapter to cli-utils
* use &'static str for TryFrom::<&'a str>::Error for Ss58AddressFormat
* tests
* add frame-system to sc-cli dev-dependencies
* add frame-system to sc-cli dev-dependencies
* fix ui test
* wip
* fixed inspect test
* bump impl version
* bump impl version, fixx spaces remove todos
* pallet-balances-cli, rustc for some reason cannot resolve pallet_balances_cli in node-cli 😩
* wip
* Subcommand::run takes &self
* can't believe i missed that 🤦🏾♂️
* bump wasm-bindgen for some reason
* adds key subcommand, rename generate-node-key to generate-node-id
* cargo update and crossed fingers 🤞🏽
* update ui test
* update more ui tests
* should be all good now
* revert subkey change
* revert subkey change
* adds frame-utilities-cli
* Apply suggestions from code review
Co-authored-by: Benjamin Kampmann <ben@gnunicorn.org>
* removes frame from sc-cli, fix license
* my editor and ci disagrees on line width
* bump spec version
* turn off default features for parity-scale-codec
* enable full_crypto feature for sp-core in cli-utils
* merge frame-utilities-cli with pallet-balances-cli
* remove full_crypto feature from sp_core in cli-utils
* bump Cargo.lock
* cli-utils -> frame-utils
* rename BlockNumber to GenericNumber, fix spaces
* fix spaces
* construct additional_signed manually
* sign test
* remove unused vars
* implement subkey with frame-utilities-cli and sc_cli
* fix moduleid test
* CI and clion disagree on line widths
* adds associated Params type to SignedExtensionProvider
* Apply suggestions from code review
Co-authored-by: Benjamin Kampmann <ben@gnunicorn.org>
* move some code around
* removes unneccesary generic params
* moves module_id back to frame_utilities_cli
* Apply suggestions from code review
Co-authored-by: Benjamin Kampmann <ben@gnunicorn.org>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* remove print_ext
* remove MaybeDisplay from pallet_balances::Trait::Balance
* a lot of stuff tbh
* adds ExtrasParamsBuilder
* remove tests for ModuleIdCmd
* address comments from PR
* bump Cargo.lock
* manually insert key into keystore
* remove unnecessary SharedParams
* add validation to vanity pattern, remove unused arg
* remove SharedParams from Sign, Vanity, Verify
* remove SharedParams from ModuleIdCmd, remove expect from Verify, new line to Cargo.toml
* remove SharedParams from InsertCmd
* 🤦🏾♂️
* deleted prometheus.yml
* move a few things around
* fix vanity test
Co-authored-by: Benjamin Kampmann <ben@gnunicorn.org>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Benjamin Kampmann <ben@parity.io>
* pow: check can_author_with before calling check_inherents
* babe: check can_author_with before calling check_inherents
* aura: check can_author_with before calling check_inherents
* Fix node and node template compile
* Add missing comma
* Put each parameter on its own line
* Add debug print
* Fix line width too long
* Fix pow line width issue
* 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>
* Pulled RPC from node and populated the node-template's RPC builder with one example implementation
* surpress build errror
* dead_code
* Fixed module usage, removed copyright, removed rpc builder for light client + some comments
* added a comment for rpc extension
* Update bin/node-template/node/src/rpc.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
* Update rpc.rs
* fix spacing
* more space to tabs
* more space to tabs
* Documenation nitpick
* Documentation nitpick
* Documentation nitpick
* Documentation nitpick
* Documentation nitpick
* pre-format
* Updated transaction payment API implemented for node template
* fix space and commented code
* fix long line
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: Dan Forbes <dan@danforbes.dev>
* 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>
* Node template love
Better description in node/Cargo.toml
Example dispatchables should have non-zero weights
Changes to README to bring in line with current DevHub Node Template
* Update README.md
cleaned up, reworked text, ready for round 2
* Add DbWeight
* Update README.md
* Consistent Playground buttons
* "setup" -> "set up"
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
* Import `Get` trait to fix build
Co-authored-by: Addie Wagenknecht <addie@nortd.com>
Co-authored-by: Ricardo Rius <ricardo@parity.io>
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
* Simplify a few chain components creation APIs related to the service
* Fix basic-authorship doc tests
* Remove DefaultQueue
* Update client/service/src/builder.rs
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Move ExecutionExtensions comment around
* Remove unused BlakeTwo256
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>