-
Notifications
You must be signed in to change notification settings - Fork 187
Open
Labels
P2Required to be completed in the assigned milestone, but may or may not impact the release schedule.Required to be completed in the assigned milestone, but may or may not impact the release schedule.
Milestone
Description
Here there is a hidden assumption that successful EVM tx executions in a batch will not have a later operation fail. C.f. a temporary workaround,
if (value == null) {
Bytes valueFromState;
if (executingHookId == null
|| contractId.contractNumOrThrow() != HTS_HOOKS_CONTRACT_NUM) {
valueFromState = writtenSlots.get(slotKey);
} else {
valueFromState = writtenLambdaSlots.get(
new LambdaSlotKey(executingHookId, minimalKey(slotKey.key())));
}
if (valueFromState == null) {
// (FUTURE) - uncomment throw below once we have determined the right way to
// unblock BlockItem -> TransactionSidecarRecord translation for the scenario in
// ContractGetInfoSuite#userPaysTheGasUsed()
// throw new IllegalStateException("No written
// value found for write to " + slotKey
// + " in " + remainingStateChanges);
valueFromState = Bytes.fromHex("02");
}
value = HookUtils.minimalRepresentationOf(valueFromState);
}
The fix actually applies to both record stream sidecars and block stream trace data:
- When an
AtomicBatchfails, revert or revise any data with "write" semantics.
Metadata
Metadata
Assignees
Labels
P2Required to be completed in the assigned milestone, but may or may not impact the release schedule.Required to be completed in the assigned milestone, but may or may not impact the release schedule.