Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Update Benchmark Expected Initcode #260

Merged
merged 3 commits into from
Mar 22, 2023
Merged

Update Benchmark Expected Initcode #260

merged 3 commits into from
Mar 22, 2023

Conversation

jtriley-eth
Copy link
Contributor

Overview

Before this PR, running cargo bench panics in the following file: huff_core/benches/huff_benchmark.rs.
The reason for the panic is the (partially) auto-generated initcode has changed since the expected_bytecode was hard coded.

Previous initcode:

CALLER
PUSH1 0x00
SSTORE
PUSH2 0x01ac
DUP1
PUSH2 0x0011
PUSH1 0x00
CODECOPY
PUSH1 0x00

new initcode:

CALLER
PUSH1 0x00
SSTORE
PUSH2 0x01ac
DUP1
PUSH1 0x0e
RETURNDATASIZE
CODECOPY
RETURNDATASIZE

This PR updates the initcode and removes the panic. A subsequent discussion should address this to ensure that code-generation changes don't break benchmarks in the future.

@jtriley-eth jtriley-eth requested a review from clabby March 22, 2023 04:53
Copy link
Member

@Maddiaa0 Maddiaa0 left a comment

Choose a reason for hiding this comment

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

lgtm, reproduced locally

@Maddiaa0 Maddiaa0 merged commit 5a5ee90 into huff-language:stage Mar 22, 2023
@jtriley-eth jtriley-eth deleted the jtriley-eth/update-benches branch March 23, 2023 00:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants