mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 04:09:23 +00:00
panic = "abort"
`panic = "unwind"` was originally a requirement of Substrate, notably due to its [native runtime](https://github.com/paritytech/substrate/issues/10874). This does not mean all of Serai should use this setting however. As the native runtime has been removed, we do no longer need this for the Substrate node. With a review of our derivative, a panic guard is only used when fetching the version from the runtime, causing an error on boot if a panic occurs. Accordingly, we shouldn't have a need for `panic = "unwind"` within the node, and the runtime itself should be fine. The rest of Serai's services already registered bespoke hooks to ensure any panic caused the process to exit. Those are left as-is, even though they're now unnecessary.
This commit is contained in:
17
Cargo.toml
17
Cargo.toml
@@ -116,6 +116,19 @@ members = [
|
||||
"tests/reproducible-runtime",
|
||||
]
|
||||
|
||||
[profile.dev]
|
||||
panic = "abort"
|
||||
overflow-checks = true
|
||||
[profile.release]
|
||||
panic = "abort"
|
||||
overflow-checks = true
|
||||
# These do not respect the `panic` configuration value, so we don't provide them
|
||||
[profile.test]
|
||||
# panic = "abort" # https://github.com/rust-lang/issues/67650
|
||||
overflow-checks = true
|
||||
[profile.bench]
|
||||
overflow-checks = true
|
||||
|
||||
[profile.dev.package]
|
||||
# Always compile Monero (and a variety of dependencies) with optimizations due
|
||||
# to the extensive operations required for Bulletproofs
|
||||
@@ -165,10 +178,6 @@ revm-precompile = { opt-level = 3 }
|
||||
revm-primitives = { opt-level = 3 }
|
||||
revm-state = { opt-level = 3 }
|
||||
|
||||
[profile.release]
|
||||
panic = "unwind"
|
||||
overflow-checks = true
|
||||
|
||||
[patch.crates-io]
|
||||
# Point to empty crates for crates unused within in our tree
|
||||
alloy-eip2124 = { path = "patches/ethereum/alloy-eip2124" }
|
||||
|
||||
Reference in New Issue
Block a user