Skip to content
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

Use a new sparse::MerkleTree::from_set function to calculate state root #484

Merged
merged 54 commits into from
Jun 12, 2023

Conversation

xgreenx
Copy link
Collaborator

@xgreenx xgreenx commented Jun 10, 2023

Use a new sparse::MerkleTree::from_set function to calculate state root of the Contract.

Related issue FuelLabs/fuel-core#1143

@xgreenx xgreenx requested a review from a team June 10, 2023 14:46
@xgreenx xgreenx self-assigned this Jun 10, 2023
@xgreenx xgreenx mentioned this pull request Jun 11, 2023
tree.root()
}

pub fn nodes_from_set<I, D>(set: I) -> (Bytes32, Vec<(Bytes32, Primitive)>)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than in the benchmarks, what is this used for?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The init_contract_state method uses it in the PR

Base automatically changed from bvrooman/feat/smt-update-set to master June 12, 2023 21:04
bvrooman
bvrooman previously approved these changes Jun 12, 2023
Copy link
Collaborator Author

@xgreenx xgreenx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Big thank you @bvrooman for comments, they as usual are precise =D

bvrooman
bvrooman previously approved these changes Jun 12, 2023
@xgreenx xgreenx added this pull request to the merge queue Jun 12, 2023
Merged via the queue into master with commit 063d0d5 Jun 12, 2023
@xgreenx xgreenx deleted the feature/calculate-state-root-fast branch June 12, 2023 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants