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

Enable strict byte length checking by default #1903

Closed
kclowes opened this issue Mar 11, 2021 · 1 comment · Fixed by #2786
Closed

Enable strict byte length checking by default #1903

kclowes opened this issue Mar 11, 2021 · 1 comment · Fixed by #2786

Comments

@kclowes
Copy link
Collaborator

kclowes commented Mar 11, 2021

  • Version: v6

What was wrong?

In v5, there is a flag where you can enable strict bytes length checking. See these docs for some background. We want to remove the flag and make the strict checking the default.

How can it be fixed?

This PR added the flag and the stricter checks. We may want to keep flexible bytes type checking and put that behind the flag instead.

@kclowes kclowes mentioned this issue Mar 11, 2021
22 tasks
@benber86
Copy link

I started working on this and have a question: since the strict byte length checking is going to be the default behavior, should variables named to indicate a strict behavior be renamed accordingly?

For instance in the tests, things like StrictArraysContract would become ArraysContract and the old ArraysContract would be renamed to something like NonStrictArraysContract ?

On Discord, @marcgarreau suggested making names explicit in both cases with Strict and NonStrict, which could potentially mean renaming all variables for default behavior to indicate Strict even if they are not always used to test for strict mode behavior. For instance the web3 fixture used for all testing would need be renamed to web3_strict. Likewise the ArraysContract would be renamed to StrictArraysContract even though it's also used by several test functions that do not test for strict mode.

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 a pull request may close this issue.

2 participants