-
Notifications
You must be signed in to change notification settings - Fork 82
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
Update to tendermint 0.26 #208
Conversation
impl From<ClientTypeAttribute> for abci::EventAttribute { | ||
fn from(attr: ClientTypeAttribute) -> Self { | ||
Tag { | ||
key: CLIENT_TYPE_ATTRIBUTE_KEY.parse().unwrap(), | ||
value: attr.client_type.to_string().parse().unwrap(), | ||
} | ||
(CLIENT_TYPE_ATTRIBUTE_KEY, attr.client_type.as_str()).into() | ||
} | ||
} |
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.
Note that the EventAttribute
domain type also has an index
field, which is set to false by the From
conversion used here.
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.
Hmm, it may have been too early to switch to tendermint::abci::Event
before informalsystems/tendermint-rs#1204 is released. There is still tendermint_rpc::abci::Event
confusingly, but it's what hermes is using.
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.
Upon further examination, the ABCI event infrastructure in Hermes now duplicates this code and is not dependent on ibc
. So we can go on with this change.
Option::map_or requires the alternative value to be non-lazily constructed, so we save some allocations.
Ramify the name as to_event_attribute_value for clarity.
tendermint-rs is now committed to fully following Rust semver conventions.
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.
Love the changes in this PR! 👌 Added some minor suggestions and a question about tendermint-rs dep versions.
* Update to tendermint 0.26 * Fix no-std-check with a temporary patch * Post-merge updates for tendermint 0.26 * ics04_channel::events: Use Option::map_or_else Option::map_or requires the alternative value to be non-lazily constructed, so we save some allocations. * Update ibc-proto to 0.22.0 * Rename TimeoutHeight::to_attribute_value Ramify the name as to_event_attribute_value for clarity. * Unpin tendermint version tendermint-rs is now committed to fully following Rust semver conventions. * Convert ClientIdAttribute like the rest of them * Changelog entry for #208 * connection events: remove an outdated comment * Derive derive_more::Into for ClientId
Description
Updates for tendermint-rs 0.26
Requres changes from cosmos/ibc-proto-rs#31
PR author checklist:
unclog
.docs/
).Reviewer checklist:
Files changed
in the GitHub PR explorer.