feat: Update SubmitProvenTransaction RPC with tx replay data#1278
feat: Update SubmitProvenTransaction RPC with tx replay data#1278
Conversation
|
Before we start the implementation, would be good to describe the overall architecture. For example, it is not clear to me yet at which point it is best to do the verification and whether it will be done inside our current components or delegated to some new component. At the high level, I can see 3 separate approaches to this:
We should think through pros/cons of the above as they will result in different implementation complexity but also will allows to provide different "features". |
994b008 to
73dd58b
Compare
13a16da to
ae097a6
Compare
| ); | ||
| }, | ||
| } | ||
| } |
There was a problem hiding this comment.
- Do we want this to be blocking as it is now?
- Do we want this to return an error if it fails? Or just log like it does now?
There was a problem hiding this comment.
Since this is opt in for debugging only, we probably want to create bounded queue but do the re-execution async. This implies it's not going to block by default, but will eventually if we're under high load, mostly to avoid OOM as it would occur in the unbounded channel scenario. This would hint at 2. being logging only.
There was a problem hiding this comment.
This re-execution logic will move to the validator component and this RPC stack will talk to that via gRPC.
Having said that, I think the bounded queue and async processing logic would be the same for this PR and the followup work. Its just a question of what we want to put into this PR for now.
|
I will need 0xMiden/miden-client#1382 to be completed before I can update client and integration tests to validate the changes in this PR. But in the meantime I will prepare this for merge because the new codepath cannot be triggered without the client changes anyway. |
4695a14 to
b464f9d
Compare
|
I have run integration tests to validate the new codepath and it seems innocuous 👍 |
bobbinth
left a comment
There was a problem hiding this comment.
Looks good! Thank you! I left some comments inline - but most of them are for the future.
10fe567 to
64b3e2e
Compare
64b3e2e to
3ca4707
Compare
Context
As part of the guardrails we are adding to the overall network, we want to be able to perform re-execution of proven transactions when they are submitted to the RPC via the
SubmitProvenTransactionendpoint.Relates to #613.
Changes
SubmitProvenTransactionendpoint to take an optional binary encodedTransactionInputs.submit_proven_transaction()function to perform re-execution of transactions when the optionalTransactionInputsis provided.