-
Notifications
You must be signed in to change notification settings - Fork 110
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
depsbuild(deps): Bump zcash_client_backend
for zebra-scan
#8567
Closed
Conversation
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
oxarbitrage
added
A-dependencies
Area: Dependency file updates
do-not-merge
Tells Mergify not to merge this PR
A-blockchain-scanner
Area: Blockchain scanner of shielded transactions
P-Medium ⚡
labels
May 24, 2024
oxarbitrage
commented
May 24, 2024
oxarbitrage
commented
May 24, 2024
Comment on lines
+221
to
+237
/// Convert keys from the Zebra parsed format to the scanning format using a dummy account and the diversifiable full viewing key. | ||
pub fn new_parsed_keys( | ||
parsed_keys: HashMap<String, (Vec<DiversifiableFullViewingKey>, Vec<SaplingIvk>)>, | ||
) -> HashMap<String, ScanningKeys<AccountId, (AccountId, Scope)>> { | ||
let mut new_parsed_keys = HashMap::new(); | ||
for keys in parsed_keys.iter() { | ||
for dfvk in keys.1 .0.iter() { | ||
let ufvk = UnifiedFullViewingKey::new(Some(dfvk.clone())); | ||
let scanning_keys = | ||
ScanningKeys::from_account_ufvks([(AccountId::ZERO, ufvk.unwrap())]); | ||
|
||
new_parsed_keys.insert(keys.0.clone(), scanning_keys); | ||
} | ||
} | ||
new_parsed_keys | ||
} | ||
|
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.
This is dirty code, need cleanup.
oxarbitrage
commented
May 24, 2024
oxarbitrage
commented
May 24, 2024
oxarbitrage
commented
May 24, 2024
ufvk.unwrap(), | ||
)]); | ||
|
||
let res = scan_block(&Network::Mainnet, &block, sapling_tree_size, &scanning_keys).unwrap(); | ||
|
||
// The response should have one transaction relevant to the key we provided. | ||
assert_eq!(res.transactions().len(), 1); |
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.
This is passing, means that the modified scan_block
is working.
oxarbitrage
changed the title
deps(zcash_client_backend): Upgrade for
depsbuild(deps): Bump May 24, 2024
zebra-scan
zcash_client_backend
for zebra-scan
9 tasks
Closing in favor of #8568 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-blockchain-scanner
Area: Blockchain scanner of shielded transactions
A-dependencies
Area: Dependency file updates
do-not-merge
Tells Mergify not to merge this PR
P-Medium ⚡
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
We want to upgrade
zcash_client_backend
for thezebra-scan
crate.I believe the combination of #8522 and this PR (which is based in #8560) will make all the builds and tests to pass. That is what i am going to be trying next.
However, there are some open questions on this PR that might need discussion. I will add review comments in the places i am most concerned.