Skip to content

Conversation

@lukevalenta
Copy link
Contributor

@lukevalenta lukevalenta commented Jun 6, 2025

  • Move PendingLogEntry and LogEntry to tlog_tiles crate
  • Add implementation of above traits for tlog-tiles spec
  • Remove 'as_bytes' from PendingLogEntry trait, as the LogEntry can access private fields of the PendingLogEntry directly as it is an associated type.
  • Move StandardEd25519CheckpointSigner to tlog_tiles crate, as it is the
    default checkpoint signer used by the tlog-tiles spec, and drop the
    'Standard' prefix.
  • Rename StandardSigner -> Ed25519NoteSigner, signed_note::{Signer,
    Verifier} -> signed_note::Note{Signer,Verifier}

* Move PendingLogEntry and LogEntry to tlog_tiles crate
* Add implementation of above traits for tlog-tiles spec
* Remove 'as_bytes' from PendingLogEntry trait, as the LogEntry can
  access private fields of the PendingLogEntry directly as it is an
  associated type.
@lukevalenta lukevalenta requested a review from cjpatton June 6, 2025 13:37
* Move StandardEd25519CheckpointSigner to tlog_tiles crate, as it is the
  default checkpoint signer used by the tlog-tiles spec, and drop the
  'Standard' prefix.
* Rename StandardSigner -> Ed25519NoteSigner, signed_note::{Signer,
  Verifier} -> signed_note::Note{Signer,Verifier}
/// Returns the underlying pending entry
fn inner(&self) -> &Self::Pending;

/// Returns a marshaled [RFC 6962 `MerkleTreeLeaf`](https://datatracker.ietf.org/doc/html/rfc6962#section-3.4).
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, forgot to do this. This comment should be moved to the StaticCtLogEntry impl of this trait. The comment here should be something like "Returns the Merkle leaf value corresponding to this entry. For the tlog-tiles spec, this MUST be the hash of self.tile_leaf."

That comes from here

Each entry in a bundle hashes to the corresponding entry in the corresponding “level 0” Merkle Tree tile.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah whoops yeah forgot to update the comment. The value returned here isn't the leaf hash, but the bytes to be hashed into the leaf. I just pushed an update to make it just return the leaf hash directly, since it also simplifies some downstream code.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok that makes sense. One thing I’m not super clear on is what the relationship between data tile entry, leaf entry, and leaf hash has to be. In general, do they have to satisfy any specific relation? Idk

Copy link
Contributor Author

@lukevalenta lukevalenta Jun 9, 2025

Choose a reason for hiding this comment

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

In tlog-tiles, the leaf entry (or "log entry") is an opaque blob that you can hash (a la RFC6962) to get the leaf hash, or serialize with the big-endian uint16 length prefix to get the data tile entry.

In static CT, the relationship is fuzzier (due to needing the Merkle Tree hashes to be backwards-compatible with RFC6962). For example, the chain_fingerprints field of the log entry goes into the data tile entry, but is not hashed into the tree. Any protocol that doesn't have to deal with backwards-compatibility should probably just use the tlog-tiles approach so that everything in the data tile entries are authenticated.

@lukevalenta lukevalenta force-pushed the lvalenta/tlog-tile-traits branch from fd0041d to de4bf0c Compare June 9, 2025 18:21
@lukevalenta lukevalenta merged commit 44bdfec into main Jun 9, 2025
1 check passed
@lukevalenta lukevalenta deleted the lvalenta/tlog-tile-traits branch June 9, 2025 19:25
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