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

chore!: Remove deprecated_serialize_commitment from API #85

Merged
merged 3 commits into from
Feb 17, 2024
Merged
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
3 changes: 1 addition & 2 deletions ffi_interface/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ mod serialization;

// TODO: These are re-exported to not break the java code
// TODO: we ideally don't want to export these.
// - deprecated_serialize_commitment will be deprecated
// - deserialize_update_commitment_sparse should not be exported and is an abstraction leak
pub use serialization::{deprecated_serialize_commitment, deserialize_update_commitment_sparse};
pub use serialization::deserialize_update_commitment_sparse;

use banderwagon::Element;
use banderwagon::Fr;
Expand Down
6 changes: 0 additions & 6 deletions ffi_interface/src/serialization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,6 @@ pub fn deserialize_update_commitment_sparse(
Ok((commitment_bytes, indexes, old_scalars, new_scalars))
}

/// This is kept so that commitRoot in the java implementation can be swapped out
/// Note: I believe we should not need to expose this method.
pub fn deprecated_serialize_commitment(commitment: CommitmentBytes) -> [u8; 32] {
Element::from_bytes_unchecked_uncompressed(commitment).to_bytes()
}

#[must_use]
pub(crate) fn deserialize_proof_query(bytes: &[u8]) -> ProverQuery {
// Commitment
Expand Down
4 changes: 2 additions & 2 deletions verkle-trie/tests/golang_interop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ fn golang_rust_interop() {

trie.insert(key_vals);

let root = trie.root_commitment();
let root = trie.root_hash();

let expected = "10ed89d89047bb168baa4e69b8607e260049e928ddbcb2fdd23ea0f4182b1f8a";
let expected = "4caf7631af042c1615845a0116e789de0beea3e07f4b947377101aa822964614";

use banderwagon::trait_defs::*;
let mut root_bytes = [0u8; 32];
Expand Down
Loading