Skip to content

upgrade the interleaving proof circuit to new nightstream version#152

Draft
ecioppettini wants to merge 11 commits into
mainfrom
enzo/circuit-fids-and-nightstream-upgrade
Draft

upgrade the interleaving proof circuit to new nightstream version#152
ecioppettini wants to merge 11 commits into
mainfrom
enzo/circuit-fids-and-nightstream-upgrade

Conversation

@ecioppettini

Copy link
Copy Markdown
Contributor

This PR actually contains two unrelated changes, but the first one was so small (and I did it like two months ago, I just forgot to include it), that I figured it would be fine to just batch them. But I could split the first 2 commits to a different PR if preferred.

The first change is just that the circuit was only using a single field element as "function id", which is not enough to store a (collision-resistant) hash.

The main thing however is that this bumps the Nightstream version to latest.

Basically the public API was completely re-written, so this is also basically a re-write of the neo-related parts.

The circuit is basically the same, it's just that I removed the entire twist and shout middleware (since the implementation was actually in nightstream, the code here was just a translation layer), and I restored the code to the partial nebula implementation that I already had before.

I had to re-order some things in the code, because that implementation is a bit more strict (we compute a commitment to the memory events out of circuit and in circuit, and they need to match, so there are two different things that need to happen in the same order), but the logic is the same.

The nebula implementation has the commitment in circuit disabled though, since that's still to expensive, but for now it's mainly a place-holder until there is new memory implementation in Nightstream.

Things that are intentionally out of scope (for now):

  1. Sound MCC implementation. The constraints are implemented, but there is the performance issue, plus the challenges are currently not computed (simple change though), and the IVC cross-step state is not bound nor asserted by the verifier.
  2. Output binding of the proof to some of the ledger statement. The previous api doesn't exist anymore, and the memory api that I already had doesn't have a replacement yet.

Signed-off-by: Enzo Cioppettini <48031343+ecioppettini@users.noreply.github.com>
Signed-off-by: Enzo Cioppettini <48031343+ecioppettini@users.noreply.github.com>
using the already existing nebula-mem code to replace twist and shout
(not fully sound atm)

the poseidon commitment is currently omitted for performance reasons,
and some of the previous TODOs are still there

nightstream is going to have either support for replacing the
commitment, or just a full memory implementation, so this is not that
important right now

Signed-off-by: Enzo Cioppettini <48031343+ecioppettini@users.noreply.github.com>
…eaving-spec (ledger)

Signed-off-by: Enzo Cioppettini <48031343+ecioppettini@users.noreply.github.com>
Signed-off-by: Enzo Cioppettini <48031343+ecioppettini@users.noreply.github.com>
Signed-off-by: Enzo Cioppettini <48031343+ecioppettini@users.noreply.github.com>
@ecioppettini ecioppettini self-assigned this Jun 19, 2026
Signed-off-by: Enzo Cioppettini <48031343+ecioppettini@users.noreply.github.com>
Signed-off-by: Enzo Cioppettini <48031343+ecioppettini@users.noreply.github.com>
Signed-off-by: Enzo Cioppettini <48031343+ecioppettini@users.noreply.github.com>
…g/starstream-component-runtime

Signed-off-by: Enzo Cioppettini <48031343+ecioppettini@users.noreply.github.com>
Signed-off-by: Enzo Cioppettini <48031343+ecioppettini@users.noreply.github.com>
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.

1 participant