Skip to content

feat(fuel): enhance merkle proof logging with digest, encoded_data, and offset #2913

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion target_chains/fuel/contracts/pyth-contract/src/main.sw
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,13 @@ impl PythCore for Contract {
);
let mut i_2 = 0;
while i_2 < number_of_updates {
log("before extracting from merkle proof");
log("digest:");
log(digest);
log("encoded_data length:");
log(encoded.len());
log("offset:");
log(offset);
let (new_offset, price_feed) = PriceFeed::extract_from_merkle_proof(digest, encoded, offset);

offset = new_offset;
Expand Down Expand Up @@ -934,4 +941,4 @@ fn verify_governance_vm(encoded_vm: Bytes) -> WormholeVM {

set_last_executed_governance_sequence(vm.sequence);
vm
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,13 @@ impl AccumulatorUpdate {
let mut updated_ids = Vec::new();
let mut i = 0;
while i < number_of_updates {
log("before extracting from merkle proof");
log("digest:");
log(digest);
log("encoded_data length:");
log(encoded_data.len());
log("offset:");
log(offset);
let (new_offset, price_feed) = PriceFeed::extract_from_merkle_proof(digest, encoded_data, offset);
offset = new_offset;
let latest_publish_time = match latest_price_feed.get(price_feed.id).try_read() {
Expand Down
Loading