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

Commit

Permalink
Recover transaction pool on light client (#3833)
Browse files Browse the repository at this point in the history
* recover tx pool on light client

* revert local tests fix

* removed import renamings

* futures03::Future -> std::future::Future

* Update core/transaction-pool/graph/src/error.rs

Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* replace remove_from_ready with remove_invalid

* avoid excess hashing

* debug -> warn

* TransactionPool + BasicTransactionPool

* pause future tx reject when resubmitting

* bump impl_version to make CI happy

* and revert back local test fixes

* alter doc to restart CI

* Transaction::clone() -> Transaction::duplicate()

* transactions -> updated_tranasctions

* remove explicit consensus-common ref

* ::std:: -> std::

* manual set/unset flag -> calling clusore with given flag value

* removed comments

* removed force argument

* BestIterator -> Box<Iterator>

* separate crate for TxPool + Maintainer trait

* long line fix

* pos-merge fix

* fix benches compilation

* Rename txpoolapi to txpool_api

* Clean up.

* Finalize merge.

* post-merge fix

* Move transaction pool api to primitives directly.

* Consistent naming for txpool-runtime-api

* Warn about missing docs.

* Move  abstraction for offchain calls to tx-pool-api.

* Merge RPC instantiation.

* Update cargo.lock

* Post merge fixes.

* Avoid depending on client.

* Fix build
  • Loading branch information
svyatonik authored and gavofyork committed Nov 28, 2019
1 parent b9e7f09 commit 2ffaf05
Show file tree
Hide file tree
Showing 64 changed files with 2,371 additions and 668 deletions.
5 changes: 1 addition & 4 deletions .gitignore
Expand Up @@ -2,14 +2,11 @@
**/*.rs.bk
*.swp
.wasm-binaries
polkadot/runtime/wasm/target/
core/executor/wasm/target/
core/test-runtime/wasm/target/
pwasm-alloc/target/
pwasm-libc/target/
pwasm-alloc/Cargo.lock
pwasm-libc/Cargo.lock
node/runtime/wasm/target/
bin/node/runtime/wasm/target/
**/._*
**/.criterion/
.vscode
Expand Down
21 changes: 0 additions & 21 deletions .maintain/common.sh

This file was deleted.

29 changes: 0 additions & 29 deletions .maintain/update.sh

This file was deleted.

75 changes: 58 additions & 17 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Expand Up @@ -126,6 +126,7 @@ members = [
"primitives/sr-version",
"primitives/state-machine",
"primitives/timestamp",
"primitives/transaction-pool",
"primitives/transaction-pool/runtime-api",
"primitives/trie",
"primitives/wasm-interface",
Expand Down
3 changes: 2 additions & 1 deletion bin/node-template/Cargo.toml
Expand Up @@ -24,7 +24,8 @@ primitives = { package = "substrate-primitives", path = "../../primitives/core"
substrate-executor = { path = "../../client/executor" }
substrate-service = { path = "../../client/service" }
inherents = { package = "substrate-inherents", path = "../../primitives/inherents" }
transaction-pool = { package = "sc-transaction-pool", path = "../../client/transaction-pool" }
txpool = { package = "sc-transaction-pool", path = "../../client/transaction-pool" }
txpool-api = { package = "sp-transaction-pool-api", path = "../../primitives/transaction-pool" }
network = { package = "substrate-network", path = "../../client/network" }
aura = { package = "substrate-consensus-aura", path = "../../client/consensus/aura" }
aura-primitives = { package = "substrate-consensus-aura-primitives", path = "../../primitives/consensus/aura" }
Expand Down
4 changes: 2 additions & 2 deletions bin/node-template/runtime/Cargo.toml
Expand Up @@ -29,7 +29,7 @@ support = { package = "frame-support", path = "../../../frame/support", default-
system = { package = "frame-system", path = "../../../frame/system", default-features = false }
timestamp = { package = "pallet-timestamp", path = "../../../frame/timestamp", default-features = false }
transaction-payment = { package = "pallet-transaction-payment", path = "../../../frame/transaction-payment", default-features = false }
tx-pool-api = { package = "substrate-transaction-pool-runtime-api", path = "../../../primitives/transaction-pool/runtime-api", default-features = false }
txpool-runtime-api = { package = "sp-transaction-pool-runtime-api", path = "../../../primitives/transaction-pool/runtime-api", default-features = false }
version = { package = "sr-version", path = "../../../primitives/sr-version", default-features = false }

[build-dependencies]
Expand Down Expand Up @@ -62,6 +62,6 @@ std = [
"system/std",
"timestamp/std",
"transaction-payment/std",
"tx-pool-api/std",
"txpool-runtime-api/std",
"version/std",
]
2 changes: 1 addition & 1 deletion bin/node-template/runtime/src/lib.rs
Expand Up @@ -328,7 +328,7 @@ impl_runtime_apis! {
}
}

impl tx_pool_api::TaggedTransactionQueue<Block> for Runtime {
impl txpool_runtime_api::TaggedTransactionQueue<Block> for Runtime {
fn validate_transaction(tx: <Block as BlockT>::Extrinsic) -> TransactionValidity {
Executive::validate_transaction(tx)
}
Expand Down

0 comments on commit 2ffaf05

Please sign in to comment.