-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: replace store_update_{time,height} by metadata update
store_update_time and store_update_height methods are always called together. In fact, they are also usually called together with store_consensus_state. Sadly, since they are separate calls, the implementations need to treat them as separate pieces of data. For example, if an implementation stores update times and heights in a map, it must perform two separate lookups to update each value. Change the interface such that store_consensus_state in addition takes host timestamp and height. This makes it possible for implementations to perform optimisations where timestamp and height are stored in a single location. This reduces number of lookups and possibly also improves memory footprint of the implementation. In fact, they may be stared together with the consensus state making the optimisation potential even stronger. Alas, updating of the timestamp and height is at times called without updating the consensus state. To accommodate that use case, introduce store_consensus_metadata call which only takes the timestamp and height arguments.
- Loading branch information
Showing
10 changed files
with
102 additions
and
163 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
.changelog/unreleased/breaking-changes/973-consensus-metadata.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
- Replace store_update_time and store_update_height with new | ||
functionality of store_consensus_state and a new | ||
store_consensus_metadata method. Furthermore, get rid of | ||
delete_update_time and delete_update_height; deletion is now done in | ||
delete_consensus_state. | ||
([#973](https://github.com/cosmos/ibc-rs/issues)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.