You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Verifyfee function is one of the most import process in the daily workflow.
Among this function, CalculateL1DataFee introduces some StateDB level reads. According to the current logic, if the Tx fails to validate if the L2fee is insufficient, so the StateDB reads introduced by taking the lead in calculating the L1DataFee can be avoided in this scenario.
The reason for calculating L1DataFee first at the moment seems to be because this CalculateL1DataFee contains a unit that checks whether the RLP is legal or not. If this module is can be took out, it would be possible to validate L2fee first, then L1fee, and omit the unnecessary StateDB Read mentioned above.
I can help if this is not on the working timetable.
The text was updated successfully, but these errors were encountered:
so you mean, besides simply moving l1DataFee, err := CalculateL1DataFee(tx, state) after l2Fee check, we can do further improments?
not really; switching the transaction fee verification logic should be enough so far. Just found many references on CalculateL1DataFee; refactoring it could be a little non-trival.
The Verifyfee function is one of the most import process in the daily workflow.
Among this function,
CalculateL1DataFee
introduces some StateDB level reads. According to the current logic, if the Tx fails to validate if the L2fee is insufficient, so the StateDB reads introduced by taking the lead in calculating the L1DataFee can be avoided in this scenario.The reason for calculating
L1DataFee
first at the moment seems to be because thisCalculateL1DataFee
contains a unit that checks whether the RLP is legal or not. If this module is can be took out, it would be possible to validate L2fee first, then L1fee, and omit the unnecessary StateDB Read mentioned above.I can help if this is not on the working timetable.
The text was updated successfully, but these errors were encountered: