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

EVM: Allow Null Addresses to convert into f4 Addresses #1003

Merged
merged 4 commits into from
Jan 9, 2023

Conversation

mriise
Copy link
Contributor

@mriise mriise commented Jan 5, 2023

Explicitly reject Null address being created by the EAM.

Side note: we should be deploying an Eth account at null address during network startup.

@mriise mriise marked this pull request as ready for review January 5, 2023 21:14
@mriise mriise requested a review from Stebalien January 5, 2023 21:36
@mriise mriise linked an issue Jan 5, 2023 that may be closed by this pull request
Copy link
Member

@Stebalien Stebalien left a comment

Choose a reason for hiding this comment

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

Nice!

actors/eam/src/lib.rs Show resolved Hide resolved
@@ -158,4 +162,27 @@ mod tests {
vec![0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01].as_slice() // ID address (u64 big endian) (8 bytes)
] => None,
}

#[test]
#[allow(unused)]
Copy link
Member

Choose a reason for hiding this comment

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

why allow unused?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Err value of the TryFrom trait for EthAddress to Address: "output::StatusCode must be used"

Copy link
Member

Choose a reason for hiding this comment

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

Hm. It's better to write that as let _ = .... Otherwise, you can miss other error cases.

actors/evm/src/interpreter/precompiles/mod.rs Show resolved Hide resolved
@Stebalien Stebalien merged commit 56339c2 into next Jan 9, 2023
@Stebalien Stebalien deleted the fix/eth-address-reserved branch January 9, 2023 17:24
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.

EVM: Null Address is being rejected by CALL
2 participants