-
Notifications
You must be signed in to change notification settings - Fork 11
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
Merk hash scheme migration #338
base: main
Are you sure you want to change the base?
Conversation
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #338 +/- ##
==========================================
- Coverage 82.95% 81.00% -1.96%
==========================================
Files 130 131 +1
Lines 15139 15664 +525
==========================================
+ Hits 12558 12688 +130
- Misses 2581 2976 +395
... and 3 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
… from path field of ledger storage
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.
Let's discuss the PathBuf additional fields. I'm not convinced we absolutely need them.
Also, I don't know how your IDE is configured but it's the first time I see an IDE rewrite the use
at the top to this. It might just be a setting.
use merk::tree::Tree; | ||
use std::collections::BTreeMap; | ||
use std::path::PathBuf; | ||
use { |
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.
Not sure how you got this refactor... We don't use a use { /* all imports */ }
pattern anywhere else, so if you could revert this that would be great.
use merk::rocksdb::{IteratorMode, ReadOptions}; | ||
use merk::tree::Tree; | ||
use std::path::PathBuf; | ||
use { |
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.
Same as above, I'd like to keep it to one use
per import module.
use tendermint_abci::Application; | ||
use tendermint_proto::abci::*; | ||
use tracing::{debug, error}; | ||
use { |
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.
Same.
use linkme::distributed_slice; | ||
use many_error::ManyError; | ||
use many_migration::{InnerMigration, MigrationSet}; | ||
use { |
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.
Here too.
&mut self, | ||
storage: &mut T, | ||
block_height: u64, | ||
path: P, |
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.
We should discuss this, I'd like to know what other ways we have. It adds a lot of complexity at the call sites. Best case, we don't need to change this method's signature, but in case we have to, this should probably be Option<P>
considering how it's used with hardcoded ""
sometimes.
edition = "2021" | ||
readme = "README.md" |
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.
Bad merge. Revert this change to the [package]
(here and other Cargo.toml).
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.
I just glanced at the code; I didn't do an in-depth review.
Thanks!
Ok((retain_height, hash.into())) | ||
})() | ||
.unwrap_or_else(|error| { | ||
println!("AbciCommitInfo erorr: {error:?}"); |
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.
Remove?
@@ -91,4 +99,4 @@ vergen = { version = "8.1.0", features = ["git", "git2"] } | |||
balance_testing=[] # Enable balance initialization from the CLI | |||
migration_testing=[] # Enable Dummy migration | |||
webauthn_testing=[] # Disable WebAuthn token validation from the CLI | |||
disable_token_sender_check=[] # Disable token endpoint sender validation | |||
disable_token_sender_check=[] # Disable token endpoint sender validation |
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.
EOF EOL
minicbor = { version = "0.19.1", features = ["derive", "std"] } | ||
once_cell = "1.12" | ||
proptest = "1" | ||
serde_json = "1.0.72" | ||
tempfile = "3.3.0" | ||
tracing = "0.1.28" | ||
tracing = "0.1.28" |
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.
EOF EOL
check_consistency --pem=1 --balance=999000 --id="$(identity 1)" 8000 8001 8002 | ||
check_consistency --pem=2 --balance=1000 --id="$(identity 2)" 8000 8001 8002 | ||
|
||
} |
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.
EOF EOL
The ultimate goal of this PR will be to rectify #308