Files
pezkuwi-subxt/substrate/primitives/io/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

94 lines
3.5 KiB
TOML

[package]
name = "sp-io"
version = "7.0.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"
license = "Apache-2.0"
homepage = "https://substrate.io"
repository = "https://github.com/paritytech/substrate/"
description = "I/O for Substrate runtimes"
documentation = "https://docs.rs/sp-io"
readme = "README.md"
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
bytes = { version = "1.1.0", default-features = false }
codec = { package = "parity-scale-codec", version = "3.1.3", default-features = false, features = ["bytes"] }
hash-db = { version = "0.15.2", default-features = false }
sp-core = { version = "7.0.0", default-features = false, path = "../core" }
sp-keystore = { version = "0.13.0", default-features = false, optional = true, path = "../keystore" }
sp-std = { version = "5.0.0", default-features = false, path = "../std" }
libsecp256k1 = { version = "0.7", optional = true }
sp-state-machine = { version = "0.13.0", default-features = false, optional = true, path = "../state-machine" }
sp-wasm-interface = { version = "7.0.0", path = "../wasm-interface", default-features = false }
sp-runtime-interface = { version = "7.0.0", default-features = false, path = "../runtime-interface" }
sp-trie = { version = "7.0.0", default-features = false, optional = true, path = "../trie" }
sp-externalities = { version = "0.13.0", default-features = false, path = "../externalities" }
sp-tracing = { version = "6.0.0", default-features = false, path = "../tracing" }
log = { version = "0.4.17", optional = true }
futures = { version = "0.3.21", features = ["thread-pool"], optional = true }
parking_lot = { version = "0.12.1", optional = true }
secp256k1 = { version = "0.24.0", features = ["recovery", "global-context"], optional = true }
tracing = { version = "0.1.29", default-features = false }
tracing-core = { version = "0.1.28", default-features = false}
ed25519-dalek = { version = "1.0.1", default-features = false, optional = true }
[features]
default = ["std"]
std = [
"bytes/std",
"sp-externalities/std",
"sp-core/std",
"sp-keystore",
"codec/std",
"sp-std/std",
"hash-db/std",
"sp-trie/std",
"sp-state-machine/std",
"libsecp256k1",
"secp256k1",
"sp-runtime-interface/std",
"sp-wasm-interface/std",
"sp-tracing/std",
"tracing/std",
"tracing-core/std",
"log",
"futures",
"parking_lot",
"ed25519-dalek",
]
with-tracing = [
"sp-tracing/with-tracing"
]
# These two features are used for `no_std` builds for the environments which already provides
# `#[panic_handler]`, `#[alloc_error_handler]` and `#[global_allocator]`.
#
# For the regular wasm runtime builds those are not used.
disable_panic_handler = []
disable_oom = []
disable_allocator = []
# This feature flag controls the runtime's behavior when encountering
# a panic or when it runs out of memory, improving the diagnostics.
#
# When enabled the runtime will marshal the relevant error message
# to the host through the `PanicHandler::abort_on_panic` runtime interface.
# This gives the caller direct programmatic access to the error message.
#
# When disabled the error message will only be printed out in the
# logs, with the caller receving a generic "wasm `unreachable` instruction executed"
# error message.
#
# This has no effect if both `disable_panic_handler` and `disable_oom`
# are enabled.
#
# WARNING: Enabling this feature flag requires the `PanicHandler::abort_on_panic`
# host function to be supported by the host. Do *not* enable it for your
# runtime without first upgrading your host client!
improved_panic_error_reporting = []