Skip to content

Conversation

@wechman
Copy link
Contributor

@wechman wechman commented Jul 22, 2022

closes #12922

@ekpyron
Copy link
Collaborator

ekpyron commented Aug 2, 2022

Any reason for not adding // revertStrings: debug to all of them? If that doesn't cause issues, it may make it easy to properly check that this now catches all revert conditions.

@wechman
Copy link
Contributor Author

wechman commented Aug 10, 2022

Any reason for not adding // revertStrings: debug to all of them? If that doesn't cause issues, it may make it easy to properly check that this now catches all revert conditions.

@ekpyron The reason is an error message that keeps changing in consecutive test runs. An example:

// f(uint256[][]): 0x20, 2, 0x40, 0xa0, 2, 5, 6, 3, 7, 8 -> FAILURE, 3963877391197344453575983046348115674221700746820753546331534351508065746944, 862718293348820473429344482784628181556388621521298319395315527974912, 0x2b414249206465636f64696e673a20696e76616c69642063616c6c6461, 52639898083992983106342913290719799829523823861698573317707643453664495927296, 0x4100000000000000c820b8edba5500000100000001000000

I guess we may want to fix that, but I am not sure if we should do that in scope of this ticket.

@ekpyron
Copy link
Collaborator

ekpyron commented Aug 10, 2022

Ah right, I vaguely remember that there's some legacy vs. via-IR differences with some of these cases - we should indeed try to fix that and align those eventually, but true, no need to burden this PR with that.

}

function f_which(uint[] calldata a, uint[2] calldata b, uint which) public returns (bytes memory) {
return abi.encode(a[which], b[1]);
Copy link
Collaborator

Choose a reason for hiding this comment

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

indentation, also below

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A fixup commit delivered. Also, I delivered another one that removes compileViaYul: also option, because meanwhile it became a default.

@wechman wechman requested a review from ekpyron August 12, 2022 08:55
@ekpyron ekpyron merged commit b9967c6 into develop Aug 12, 2022
@ekpyron ekpyron deleted the calldata_tests branch August 12, 2022 09:29
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.

Increase test coverage for Calldata Validation

4 participants