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

common: add spec test for 2935 contract code and update history storage address #3373

Merged
merged 5 commits into from May 3, 2024

Conversation

g11tech
Copy link
Contributor

@g11tech g11tech commented Apr 25, 2024

test the 2935 contract code as per the eip

and update history save address, however old address is till overriden for kaustine6 (tested and verified)

its likely that the code and hence address will be modified at which point the address and the code for testing will be updated

@g11tech g11tech changed the title vm: add spec test for 2935 contract code and update history storage address common: add spec test for 2935 contract code and update history storage address Apr 25, 2024
Copy link

codecov bot commented Apr 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.25%. Comparing base (61acbd3) to head (ac3ea10).
Report is 16 commits behind head on master.

❗ Current head ac3ea10 differs from pull request most recent head 81dfa11. Consider uploading reports for the commit 81dfa11 to get more accurate results

Additional details and impacted files

Impacted file tree graph

Flag Coverage Δ
tx ?
wallet 87.25% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Copy link
Member

@jochem-brouwer jochem-brouwer left a comment

Choose a reason for hiding this comment

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

LGTM. Will not approve since the code + addr will (indeed) likely get updated.

await vm.stateManager.putContractCode(historyAddress, contract2935Code)

const result = await vm.runTx({ tx, block, skipHardForkValidation: true })
const blockHashi = result.execResult.returnValue
Copy link
Member

Choose a reason for hiding this comment

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

Small nit: above 15 lines can be easily DRYied by setting up a small method taking in i and getting back the blockhash or something similar and then reused in the test below. This will likely also ease the writing of additional test cases.

Copy link
Member

Choose a reason for hiding this comment

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

(can also quickly do if you answer in the next 20 min)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ahh seeing this now, will do and update

@g11tech
Copy link
Contributor Author

g11tech commented May 3, 2024

LGTM. Will not approve since the code + addr will (indeed) likely get updated.

this will not change until after devnet0, lets take this in and then re-PR when changes come in spec

Copy link
Member

@holgerd77 holgerd77 left a comment

Choose a reason for hiding this comment

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

Ok, LGTM

@acolytec3 acolytec3 merged commit d94dc5f into master May 3, 2024
33 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants