-
Notifications
You must be signed in to change notification settings - Fork 351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom proof specs in config #1574
Conversation
2ab53cf
to
3873c11
Compare
@@ -1,6 +1,7 @@ | |||
use crate::prelude::*; | |||
use ibc_proto::ics23::ProofSpec as ProtoProofSpec; | |||
use ics23::ProofSpec; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just FYI, with regard to #853 - this file (i.e. modules/src/core/ics23_commitment/specs.rs
) is the only place where we use the ics23
crate. We only use it to get the definitions for the proof-specs for cosmos and to provide convert::From
impls for our domain type (i.e. ProofSpecs
). For all other cases, we use the ibc_proto::ics23
defs because we need to derive serde and other traits for these types.
@@ -223,6 +223,60 @@ memo_prefix = '' | |||
# ['transfer', 'channel-0'], | |||
# ] | |||
|
|||
# Specify custom ICS23 proof-specs for the chain (serialized as JSON). | |||
# Default: [`ProofSpecs::cosmos()`](modules/src/core/ics23_commitment/specs.rs) | |||
proof-specs = ''' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a more operator-friendly manner to specify this? I tried to give an alternative suggestion in #1630 .
* Impl serde for ics23 proto types * Add proof specs to client state * Get proof specs from chain config * Fix test compilation * Define ProofSpecs domain type using ibc_proto::ics23 types * Minor refactoring * Add attrs for ics23 protos in proto-compiler * Fix clippy errors * Refactor Tendermint to use domain type * Parse config proofspecs as JSON serialized string * Add Default impl for ProofSpecs * Use serde(with) instead of newtype * Get rid of unwraps * Fix failing test * Document proof-specs opt in config * Minor refactoring to match style * Create .changelog entry * Serialilze ProofSpecs as a pretty formatted JSON string * Set serde dep version to '1' * Manually implement conversions b/w ProofSpec protos * Disallow empty proof-specs * Move custom serde serializer to its own module Co-authored-by: Romain Ruetschi <romain@informal.systems>
Closes: cosmos/ibc-rs#67
Description
Proof specs are currently read as JSON serialized TOML strings from the config.
Serialize/Deserialize
are derived on theibc_proto::ics23
types.For contributor use:
unclog
.docs/
) and code comments.Files changed
in the Github PR explorer.