Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Add documentation to SubmitSignedTransaction and actually make it work (
Browse files Browse the repository at this point in the history
#4200)

* Add documentation to signed transactions and actually make them work.

* Fix naming and bounds.

* Forgotten import.

* Remove warning.

* Make accounts optional, fix logic.

* Split the method to avoid confusing type error message.

* Move executor tests to integration.

* Add submit transactions tests.

* Make `submit_transaction` tests compile

* Remove a file that was accidently committed

* Add can_sign helper function.

* Fix compilation.

* Add a key to keystore.

* Fix the tests.

* Remove env_logger.

* Fix sending multiple transactions.

* Remove commented code.

* Bring back criterion.

* Remove stray debug log.

* Apply suggestions from code review

Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>

* Make sure to initialize block correctly.

* Initialize block for offchain workers.

* Add test for transaction validity.

* Fix tests.

* Review suggestions.

* Remove redundant comment.

* Make sure to use correct block number of authoring.

* Change the runtime API.

* Support both versions.

* Bump spec version, fix RPC test.

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
Co-authored-by: Gavin Wood <github@gavwood.com>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
  • Loading branch information
4 people committed Jan 10, 2020
1 parent f1cc671 commit 8974349
Show file tree
Hide file tree
Showing 29 changed files with 2,088 additions and 1,405 deletions.
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions bin/node-template/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use sp_runtime::{
impl_opaque_keys, MultiSignature
};
use sp_runtime::traits::{
NumberFor, BlakeTwo256, Block as BlockT, StaticLookup, Verify, ConvertInto, IdentifyAccount
BlakeTwo256, Block as BlockT, StaticLookup, Verify, ConvertInto, IdentifyAccount
};
use sp_api::impl_runtime_apis;
use sp_consensus_aura::sr25519::AuthorityId as AuraId;
Expand Down Expand Up @@ -341,8 +341,8 @@ impl_runtime_apis! {
}

impl sp_offchain::OffchainWorkerApi<Block> for Runtime {
fn offchain_worker(number: NumberFor<Block>) {
Executive::offchain_worker(number)
fn offchain_worker(header: &<Block as BlockT>::Header) {
Executive::offchain_worker(header)
}
}

Expand Down
30 changes: 16 additions & 14 deletions bin/node/executor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,34 @@ description = "Substrate node implementation in Rust."
edition = "2018"

[dependencies]
trie-root = "0.15.2"
codec = { package = "parity-scale-codec", version = "1.0.0" }
sp-io = { version = "2.0.0", path = "../../../primitives/io" }
sp-state-machine = { version = "2.0.0", path = "../../../primitives/state-machine" }
node-primitives = { version = "2.0.0", path = "../primitives" }
node-runtime = { version = "2.0.0", path = "../runtime" }
sc-executor = { version = "2.0.0", path = "../../../client/executor" }
sp-core = { version = "2.0.0", path = "../../../primitives/core" }
sp-io = { version = "2.0.0", path = "../../../primitives/io" }
sp-state-machine = { version = "2.0.0", path = "../../../primitives/state-machine" }
sp-trie = { version = "2.0.0", path = "../../../primitives/trie" }
node-primitives = { version = "2.0.0", path = "../primitives" }
node-runtime = { version = "2.0.0", path = "../runtime" }
trie-root = "0.15.2"

[dev-dependencies]
node-testing = { version = "2.0.0", path = "../testing" }
substrate-test-client = { version = "2.0.0", path = "../../../test-utils/client" }
sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" }
criterion = "0.3.0"
frame-support = { version = "2.0.0", path = "../../../frame/support" }
pallet-balances = { version = "2.0.0", path = "../../../frame/balances" }
pallet-transaction-payment = { version = "2.0.0", path = "../../../frame/transaction-payment" }
pallet-session = { version = "2.0.0", path = "../../../frame/session" }
frame-system = { version = "2.0.0", path = "../../../frame/system" }
pallet-timestamp = { version = "2.0.0", path = "../../../frame/timestamp" }
pallet-treasury = { version = "2.0.0", path = "../../../frame/treasury" }
node-testing = { version = "2.0.0", path = "../testing" }
pallet-balances = { version = "2.0.0", path = "../../../frame/balances" }
pallet-contracts = { version = "2.0.0", path = "../../../frame/contracts" }
pallet-grandpa = { version = "2.0.0", path = "../../../frame/grandpa" }
pallet-im-online = { version = "2.0.0", path = "../../../frame/im-online" }
pallet-indices = { version = "2.0.0", path = "../../../frame/indices" }
pallet-session = { version = "2.0.0", path = "../../../frame/session" }
pallet-timestamp = { version = "2.0.0", path = "../../../frame/timestamp" }
pallet-transaction-payment = { version = "2.0.0", path = "../../../frame/transaction-payment" }
pallet-treasury = { version = "2.0.0", path = "../../../frame/treasury" }
sp-application-crypto = { version = "2.0.0", path = "../../../primitives/application-crypto" }
sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" }
substrate-test-client = { version = "2.0.0", path = "../../../test-utils/client" }
wabt = "0.9.2"
criterion = "0.3.0"

[features]
wasmtime = [
Expand Down
Loading

0 comments on commit 8974349

Please sign in to comment.