Skip to content

Commit

Permalink
chore!: Remove deprecated_serialize_commitment from API (#85)
Browse files Browse the repository at this point in the history
* chore!: remove `deprecated_serialize_commitment` from API

* change expected output in interop test vector
  • Loading branch information
kevaundray authored Feb 17, 2024
1 parent b803be9 commit eac18c4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
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

0 comments on commit eac18c4

Please sign in to comment.