-
Notifications
You must be signed in to change notification settings - Fork 0
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
deposit: refactor to forward deploys to L1 #94
Conversation
…nager and SeverConfig
"Checking signatures and adding the deposit to the batch is not required to be done in the deposit endpoint." I'm not sure what is meant by this? The Kairos server/ node will query the L1 for deposits and then roll them up in a batch together with Transactions and Withdrawals and produce a proof. The proof is then submitted to another entry point of the demo smart contract that will verify it, extract the new root from the journal and update the contract state to store that new root. |
"It should rather according to casper best-practices forward deploys to the L1." But native L1 deposits will still occur, so not every deposit will be forwarded from the L2 to the L1? If you want to route Deposits through the L2 then yes this is the way to do it, but that's an additional means of depositing and not a replacement? |
@jonas089 the current implementation of the server suggests something different kairos/kairos-server/src/routes/deposit.rs Lines 24 to 52 in 27ef3fc
|
But if you forward a signed deploy to the L2 you might as well use the CLI to forward the deploy directly to the L1. It will be recorded as an Event and then picked up by the L2. Handling it differently introduces unwanted complexity. For Withdrawals we will have to route the Deploy through the L2 but I'm not sure about deposits... Native L1 deposits and a good CLI should be good enough? Another edit: |
@jonas089 If you ask me I would get rid of the |
Okay, shouldn't make a big difference, it'll work either way. |
541f23e
to
8a0736a
Compare
Minimum allowed coverage is Generated by 🐒 cobertura-action against 8a0736a |
bfda6bd
to
12a2d10
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
dee08c4
to
fdaea36
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
So if you don't have this environment variable sourced in your development environment and run the code it will instead throw a runtime exception. Also sourcing environment variables is not accomplished with Nix but rather captured with Nix. My local development environment sources these environment variables for me automatically when I enter the kairos repository. |
Motivation
TODOS
deposit
handler which can be used for property tests and only adds deposits to the batchkairos-cli
counterpart preparing the deposit deploySuccessive PR