-
Notifications
You must be signed in to change notification settings - Fork 98
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
Do not send batch poster reports in fee token based chains #108
Conversation
If the goal is for the arbos will debt the sequencer an amount of There are additional steps however to ensure
Seems that there's much more complexity than meets the surface for a simple patch. I think using an initial fixed conversion rate of feeToken / eth and reporting batch spending in terms of the feeToken is preferable as a temporary measure until there is a more robust feeToken pricing model. Perhaps the arb owner can update the exchange rate. |
src/bridge/SequencerInbox.sol
Outdated
@@ -409,16 +410,32 @@ contract SequencerInbox is DelegateCallAware, GasRefundEnabled, ISequencerInbox | |||
address batchPoster = msg.sender; | |||
bytes memory spendingReportMsg; | |||
if (hostChainIsArbitrum) { |
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.
Do we support custom fee tokens on L2 Anytrust chains? If so, fetching the native token below will be quite expensive to do on every batch post. In that case we should consider having an immutable var on this contract so that we dont have to do a .call or storage lookup.
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.
Switched to using immutable bool - 4c994f6
I believe custom fee tokens only work with anytrust, so in most cases no batch spending report will be processed at all. But in the case that not all the DAS members sign the batch the sequencer can fall back to posting full data, and triggering this code. In that case we need to think more about the consequences in the l1pricing algo, as you're pointing out above. I believe anytrust sets a bunch of these parameters already, but I could be wrong about that. |
Yep custom fee token is only supported with Anytrust. Though batch spending reports will still be generated as part of DA certs postings, right? It's tricky to check if all the pricing params which @shotaronowhere mentioned are correctly set as most of them are not exposed. I'll try to figure out a way |
Very good points, I'll be checking further 1) and 2). |
Checked the recent custom fee token based chain deployment. Pricing params had default values ( |
LGTM I'd be interested in running some e2e tests, but the contract changes look like they achieve the desired goal.
You mean the Another param teams should be aware of is the |
Yep I meant Regarding |
deb18fb
to
2dc88d7
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 but do not merge yet
This is a short term solution for Anytrust Orbit chains that use custom fee token. Due to missing ETH<->fee token conversion rates, batch poster reports are not being sent in fee token based chains. Long term solution is researched which will involve some kind of oracle.