Sections which include account or storage rows that may `RevertWithCallerDomSubStamps` and/or `RevertWithChildDomSubStamps` must remember the `hubStamp` of their creation
Closed this issue · 1 comments
OlivierBBB commented
As observed both by @letypequividelespoubelles and myself every section that contains an AccountFragment
and or a StorageFragment
which may be reverted either with the current context or with the child context ought to be augmented with a
final int hubStamp; // the HUB_STAMP at which the section was created
which will be set by the constructor as such
public XxxSection(Hub hub) {
this.hubStamp = hub.stamp();
// ...
}
and potentially used to fill the RevertWithCallerDomSubStamps
and RevertWithChildDomSubStamps
at the appropriate time. This also implies modifying the signatures as we will need to feed them with this hubStamp
. Note that this.hubStamp
will be used to fill the subordinate stamp i.e. the various
SUB_STAMP[i + ω] = τ ∙ h + s // h = hubStamp ≡ HUB_STAMP[i] i.e. Hub stamp at section creation
<--------
The above applies to
- STOP (whenever we STOP during a deployment that will be REVERT'ed)
- BALANCE
- EXTCODECOPY
- EXTCODESIZE
- EXTCODEHASH
- SSTORE
- SLOAD
- CREATE's
- CALL's
- SELFDESTRUCT (inheritor address)
- ... I don't think there's anything else ...
letypequividelespoubelles commented
We can access the snapshot of the hubStamp via the commonValues
of the TraceSection
.
public int hubStamp() {
return commonValues.hubStamp;
}