Skip to content

Conversation

@frangio
Copy link
Contributor

@frangio frangio commented Dec 11, 2025

CFI'd as of last week.

Comment on lines +626 to +628
0xE6 => DUPN => stack_io(0, 1), immediate_size(1);
0xE7 => SWAPN => stack_io(0, 0), immediate_size(1);
0xE8 => EXCHANGE => stack_io(0, 0), immediate_size(1);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The stack_io values are not accurate here, they depend on the immediate, unless we want to put the worst case values here. I don't know what this is used for.

}

#[cfg(test)]
mod tests {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test cases are the same listed in the EIP.

Self::Internal(InternalResult::InvalidExtDelegateCallTarget)
}
InstructionResult::InvalidImmediateEncoding => {
Self::Halt(HaltReason::OpcodeNotFound.into())
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't want to add a new HaltReason for this because IIUC it would be a breaking change for implementers of From<HaltReason>.

@codspeed-hq
Copy link

codspeed-hq bot commented Dec 11, 2025

CodSpeed Performance Report

Merging #3223 will not alter performance

Comparing frangio:eip-8024 (9892671) with main (5fec9bb)

Summary

✅ 173 untouched

@frangio
Copy link
Contributor Author

frangio commented Dec 11, 2025

I can't reproduce the nightly test failures.

@rakita
Copy link
Member

rakita commented Dec 11, 2025

I can't reproduce the nightly test failures.

Interesting error, jumpdest analysis found that the last opcode is 0x00, but it is jumped over, so it concluded it does not need to append zero bytes. Will see how to do this in an efficient way in analyze_legacy function.

@rakita
Copy link
Member

rakita commented Dec 11, 2025

Imo DUPN PUSH1 0x01 variant is better

@gakonst
Copy link
Collaborator

gakonst commented Dec 13, 2025

Unbelievably bullish change

@rakita rakita marked this pull request as draft December 23, 2025 23:03
@rakita
Copy link
Member

rakita commented Dec 23, 2025

It will take a few months before this becomes active so will move this PR to draft

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants