-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: add batch multi proofing #10
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
base: master
Are you sure you want to change the base?
Conversation
68c7c7c to
5efed64
Compare
|
@ozwaldorf you could set eyes on this as well |
|
Whats the usecase? |
for receipts in the same block, they basically share most of the receipts-trie path, so we bundle those shared nodes once and prove all the (path, receipt) pairs together. that cuts calldata/gas in comparison to separate proofs. and if you only have one receipt, you just pass 1 element arrays and it behaves exactly like a single proof flow |
|
But to a user, what does this feature enable? At first I didn't think there's much value here. Though after thinking on it, it might be beneficial to be able to process multiple transfers to fill a single escrow transfer (ie, a node uses 3 different transfers included in a batch through buildernet to transfer a total sum expected by the escrow) Is this what's been implemented or is this multiple proofs for multiple escrow bonds? |
To a user, this means you can submit one bundled proof that contains several receipts from the same block, and the escrow will verify them all against that block header. if any of those receipts contains a Transfer log for the escrow’s configured token, recipient, and exact expectedAmount, the bonded executor can collect the payout. what it doesnt do is: sum multiple transfers to reach the expected amount and it still looks for a single Transfer event that matches expectedAmount. also, it doesn’t support multiple concurrent bonds and the contract still tracks one bondedExecutor and one proof driven collect at a time. this is mainly a gas/efficiency win for proving receipts (or reusing the same shared proof across multiple escrows if needed), it's nothing in any way a way to combine partial payments. but we could make it that
And yeah we can actually implement this. If we are to do this, we can keep the shared block header and proof nodes, but allow |
todo: