Skip to content
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

clean: some cleaning #1944

Merged
merged 1 commit into from
Mar 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public JumpSection(Hub hub) {
// jump destination vetting
///////////////////////////
if (mustAttemptJump) {
this.triggerJumpDestinationVetting(hub);
this.triggerJumpDestinationVetting();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
import net.consensys.linea.zktracer.runtime.stack.Stack;
import net.consensys.linea.zktracer.runtime.stack.StackLine;
import org.apache.tuweni.bytes.Bytes;
import org.hyperledger.besu.evm.internal.Words;

@Accessors(fluent = true)
/* A TraceSection gather the trace lines linked to a single operation */
Expand Down Expand Up @@ -205,10 +204,7 @@ public void writeHashInfoResult(Bytes hash) {
}
}

public void triggerJumpDestinationVetting(Hub hub) {
final int pcNew = Words.clampedToInt(hub.messageFrame().getStackItem(0));
final boolean invalidJumpDestination = hub.messageFrame().getCode().isJumpDestInvalid(pcNew);

public void triggerJumpDestinationVetting() {
for (TraceFragment fragment : this.fragments()) {
if (fragment instanceof StackFragment) {
((StackFragment) fragment).jumpDestinationVettingRequired(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,6 @@ public class CallSection extends TraceSection

final Factories factory;

private boolean success;

public CallSection(Hub hub, MessageFrame frame) {
super(hub, maxNumberOfLines(hub));

Expand Down Expand Up @@ -201,7 +199,7 @@ public CallSection(Hub hub, MessageFrame frame) {

// OOGX case
if (Exceptions.outOfGasException(exceptions)) {
this.oogXCall(hub);
this.oogXCall();
return;
}

Expand Down Expand Up @@ -250,7 +248,7 @@ private static short maxNumberOfLines(final Hub hub) {
return 12; // 12 = 2 (stack) + 5 (CALL prequel) + 5 (successful PRC, except BLAKE and MODEXP)
}

private void oogXCall(Hub hub) {
private void oogXCall() {

final AccountFragment callerAccountFragment =
factory
Expand Down Expand Up @@ -450,7 +448,7 @@ public void resolveUponContextExit(Hub hub, CallFrame frame) {
public void resolveAtContextReEntry(Hub hub, CallFrame frame) {
// The callSuccess will only be set
// if the call is acted upon i.e. if the call is un-exceptional and un-aborted
success = bytesToBoolean(hub.messageFrame().getStackItem(0));
final boolean success = bytesToBoolean(hub.messageFrame().getStackItem(0));

reEntryCallerSnapshot = canonical(hub, callerAddress);
reEntryCalleeSnapshot = canonical(hub, calleeAddress);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,15 @@ public SelfdestructSection(Hub hub, MessageFrame frame) {
? selfdestructor
: AccountSnapshot.canonical(hub, frame.getWorldUpdater(), recipientAddress);

AccountFragment selfdestructorFirstAccountFragment =
final AccountFragment selfdestructorFirstAccountFragment =
hub.factories()
.accountFragment()
.make(
selfdestructor,
selfdestructor,
DomSubStampsSubFragment.standardDomSubStamps(this.hubStamp(), 0));

AccountFragment recipientFirstAccountFragment =
final AccountFragment recipientFirstAccountFragment =
hub.factories()
.accountFragment()
.makeWithTrm(
Expand Down Expand Up @@ -187,14 +187,14 @@ public SelfdestructSection(Hub hub, MessageFrame frame) {
}
checkArgument(recipientNew.isWarm());

AccountFragment selfdestructorFirstAccountFragment =
final AccountFragment selfdestructorFirstAccountFragment =
hub.factories()
.accountFragment()
.make(
selfdestructor,
selfdestructorNew,
DomSubStampsSubFragment.standardDomSubStamps(hubStamp, 0));
AccountFragment recipientFirstAccountFragment =
final AccountFragment recipientFirstAccountFragment =
hub.factories()
.accountFragment()
.makeWithTrm(
Expand Down
Loading