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

Keccak ordered root #1926

Merged
merged 13 commits into from
Jan 15, 2024
Merged

Keccak ordered root #1926

merged 13 commits into from
Jan 15, 2024

Conversation

Harrm
Copy link
Contributor

@Harrm Harrm commented Jan 12, 2024

Referenced issues

closes #1920

Description of the Change

Make ordered trie root hash function accept a hash function as a parameter. Thusly reuse the code that hashed the trie using blake2b to hash it with keccak.

Benefits

This Host method is required.

Possible Drawbacks

None expected.

core/storage/trie/serialization/ordered_trie_hash.hpp Outdated Show resolved Hide resolved
@@ -30,4 +32,9 @@ namespace kagome::common {
void raise(const T &t) {
boost::throw_exception(std::system_error(t.value(), t.category()));
}

template<typename T, typename E>
void raise_on_err(const outcome::result<T, E>& res) {
Copy link
Contributor

Choose a reason for hiding this comment

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

outcome.value() throws and returns value.

@Harrm Harrm marked this pull request as ready for review January 15, 2024 14:08
@Harrm Harrm self-assigned this Jan 15, 2024
@Harrm Harrm enabled auto-merge (squash) January 15, 2024 18:31
@Harrm Harrm merged commit 0d9d43e into master Jan 15, 2024
9 of 10 checks passed
@Harrm Harrm deleted the feature/keccak-ordered-root branch January 15, 2024 18:33
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.

Implement ext_trie_keccak_256_ordered_root_version_2
3 participants