upgrade nightstream to 675f2ce (new neo-fold-clean-api)#156
Merged
Conversation
…5f2ce) Replace the old Twist/Shout proof adapter with the existing Nebula memory backend, and wire the proof crate through the new flow: - extract per-batch ark R1CS assignments from the interleaving circuit - fold them with neo-fold-clean using deterministic preprocessing - carry the folded audit through ZkTransactionProof - verify the audit from the interleaving spec/ledger path Rework circuit synthesis around Nebula's ordered RS/WS commitment model: - keep tracer and circuit memory-op order aligned - initialize dynamic ref memories before tracing - pad traces to scan and folding batch boundaries - support sparse memory tag ordering in the scan - zero gated-off write values so tracer and circuit witnesses agree This intentionally leaves some soundness work for follow-up: the Nebula Poseidon IC commitment is still disabled, and public binding for memory tables / host-call roots needs a new (maybe Nightstream-side) API. The current fold only cross-links the program-state IVC wires. 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>
SpaceManiac
approved these changes
Jul 9, 2026
SpaceManiac
left a comment
Contributor
There was a problem hiding this comment.
Gave the diff a basic read-through. I don't think I know this part of the code well enough yet to really spot subtle mistakes, but I didn't see anything that should prevent this PR from being merged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR supersedes #152
That PR was mixed with other previous work I had done before, as mentioned in there. And I thought it was fine, but now I think it requires some extra work/thought, and I didn't want to keep mixing things, so I decided to split it for easier review. I'll do a follow-up PR without those changes done in a more proper way after this. And then a follow-up introducing the tracing crate from the wasm-vm branch.
The second part of the description still applies:
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):