Files
pezkuwi-subxt/substrate/client/service/test/Cargo.toml
T
Bastian Köcher 0c934a9352 ed25519_verify: Support using dalek for historical blocks (#12661)
* ed25519_verify: Support using dalek for historical blocks

The switch from `ed25519-dalek` to `ed25519-zebra` was actually a breaking change. `ed25519-zebra`
is more permissive. To support historical blocks when syncing a chain this pull request introduces
an externalities extension `UseDalekExt`. This extension is just used as a signaling mechanism to
`ed25519_verify` to use `ed25519-dalek` when it is present. Together with `ExtensionBeforeBlock` it
can be used to setup a node in way to sync historical blocks that require `ed25519-dalek`, because
they included a transaction that verified differently as when using `ed25519-zebra`.

This feature can be enabled in the following way. In the chain service file, directly after the
client is created, the following code should be added:

```
use sc_client_api::ExecutorProvider;
client.execution_extensions().set_extensions_factory(
	sc_client_api::execution_extensions::ExtensionBeforeBlock::<Block, sp_io::UseDalekExt>::new(BLOCK_NUMBER_UNTIL_DALEK_SHOULD_BE_USED)
);
```

* Fix doc

* More fixes

* Update client/api/src/execution_extensions.rs

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>

* Fix merge and warning

* Fix docs

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
2022-11-27 15:34:07 +00:00

46 lines
2.3 KiB
TOML

[package]
name = "sc-service-test"
version = "2.0.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
publish = false
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
array-bytes = "4.1"
fdlimit = "0.2.1"
futures = "0.3.21"
log = "0.4.17"
parity-scale-codec = "3.0.0"
parking_lot = "0.12.1"
tempfile = "3.1.0"
tokio = { version = "1.17.0", features = ["time"] }
sc-block-builder = { version = "0.10.0-dev", path = "../../block-builder" }
sc-client-api = { version = "4.0.0-dev", path = "../../api" }
sc-client-db = { version = "0.10.0-dev", default-features = false, path = "../../db" }
sc-consensus = { version = "0.10.0-dev", path = "../../../client/consensus/common" }
sc-executor = { version = "0.10.0-dev", path = "../../executor" }
sc-network = { version = "0.10.0-dev", path = "../../network" }
sc-network-common = { version = "0.10.0-dev", path = "../../network/common" }
sc-service = { version = "0.10.0-dev", features = ["test-helpers"], path = "../../service" }
sc-transaction-pool-api = { version = "4.0.0-dev", path = "../../../client/transaction-pool/api" }
sp-api = { version = "4.0.0-dev", path = "../../../primitives/api" }
sp-blockchain = { version = "4.0.0-dev", path = "../../../primitives/blockchain" }
sp-consensus = { version = "0.10.0-dev", path = "../../../primitives/consensus/common" }
sp-core = { version = "7.0.0", path = "../../../primitives/core" }
sp-externalities = { version = "0.13.0", path = "../../../primitives/externalities" }
sp-panic-handler = { version = "5.0.0", path = "../../../primitives/panic-handler" }
sp-runtime = { version = "7.0.0", path = "../../../primitives/runtime" }
sp-state-machine = { version = "0.13.0", path = "../../../primitives/state-machine" }
sp-storage = { version = "7.0.0", path = "../../../primitives/storage" }
sp-tracing = { version = "6.0.0", path = "../../../primitives/tracing" }
sp-trie = { version = "7.0.0", path = "../../../primitives/trie" }
sp-io = { version = "7.0.0", path = "../../../primitives/io" }
substrate-test-runtime = { version = "2.0.0", path = "../../../test-utils/runtime" }
substrate-test-runtime-client = { version = "2.0.0", path = "../../../test-utils/runtime/client" }