Closed schemar closed 5 years ago
CircularBufferUint.sol
has an implementation of the circular buffer.
If the GatewayBase
extends CircularBufferUint.sol
then the position of message box in the EVM storage will change because of the variables declared in the CircularBufferUint.sol
The position of message box i.e. MESSAGE_OUTBOX_OFFSET
in the outbox is used to generate Merkel proofs.
This change looks like an interface change to me. Maybe there is a workaround of this, not sure though.
I suggest we use the inherited contract approach. It is clearer to understand the storage layout, even if it changes the position.
To have a constant size
O(1)
instead of a linear sizeO(n)
depending on messages that will be sent with the gateways, the storage roots in gateway base should be stored in a circular buffer that prunes old storage roots.In GatewayBase the messagebox offset should be made public, such that the proof generation can query the offset.
Was potentially done in #669
Regenerate the proof using the tool from #711