-
Notifications
You must be signed in to change notification settings - Fork 120
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
feat: validium NEAR DA via sidecar #129
base: develop
Are you sure you want to change the base?
Conversation
@dndll fantastic, thanks! I'd like to try this out, but get an unauthorized error:
Can I get access, or a hint on how to build that image? |
Woops! Looks like I forgot to make that public. It should be available now at https://github.com/near/rollup-data-availability/pkgs/container/rollup-data-availability%2Fhttp-api |
Hey @christophercampbell - chasing up, did you manage to take a look at this? |
Yes, great work! You followed the intended interfaces and code structure as intended, interested in the SC developments for sure. It'd be nice to get you in contact with product folks over here, do you have a preferred contact for that? |
Thanks Christopher, passing through our comms now! hello@nuff.tech |
gm! After a team discussion we're reconsidering the idea of adding the different DA protocol integrations directly on this repo. Instead we'd like this code to live on a repo you fully own, and for it to be imported here as an external dependency. In a nutshell, this PR should only contain the modifications done on:
Anything else should be handled on a repo of yours. Sorry for the confusion, and the last minute change of mind, but we believe this will be better for everyone |
This PR adds CDK validium support via NEAR DA. It uses the new etrog interface to provide a way for CDK validiums to verify if their sequence data has been submitted.
On the deeper details, we utilise the DA sidecar so we don't need to bake any FFI libraries into the node. This is much akin to nitro + others prefer to do it, and similar to how the DAC nodes are constructed. You'd just run the sidecar and it will submit all of the blob information, manage your near keys etc.
Some small issues:
Complexity around sequence DA availability.
NEARDA works with SPV light clients, when a blob is submitted to the tracked store, we send it off to a light client which will queue the proof for verification. Once we take a batch of transactions (in batches of 16, 64, or 128), we build a plonky2 proof with the light client protocol and then verify the batch. This gets wrapped in a groth16 snark and then we relay to the l1 eventually, paying roughly 470k gas depending on calldata. This is so we can provide various user flows, such as:
In short, this introduces some latency we need to be aware of for validiums to give them different avenues beyond eager verification, or adjust the configuration so the sequence sender can work at a reasonable cadence with the ZKLC. Ideally, we would allow some lazy information in the l2 to be provided eventually. It's possible we can do some form of hybrid approach where we can provide the eager, expensive info to the l2, but eventually prove on the l1. This is something we are exploring but it's very much an idea.
To test it, it all works with local nodes, so you should be able to run
make run-near
and check it out. It has the forced near sequencer & the standard sequencer. After a sequence with batches is sent off, check the sequence sender to ensure it's sent. Then you can check the forced sequencer to verify it's syncing with the DA layer.TODO: