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

Fix(engine): update to latest SputnikVM #316

Merged
merged 1 commit into from
Oct 26, 2021
Merged

Fix(engine): update to latest SputnikVM #316

merged 1 commit into from
Oct 26, 2021

Conversation

birchmd
Copy link
Member

@birchmd birchmd commented Oct 26, 2021

We must update to the latest version of SputnikVM due to the recent security advisory.

Note: no changes to Cargo.toml were needed because we use a git dependency on our own fork of the SputnikVM repo. I only needed to update the lock file via cargo update -p evm and then make some small code changes due to upstream API changes.

@birchmd birchmd added P-high Pririoty: high A-security Area: Security related. A-evm-compatibility Area: EVM compatibility changes or fixes. labels Oct 26, 2021
impl StackExecutorParams {
fn new(gas_limit: u64) -> Self {
Self {
precompiles: Precompiles::new_istanbul(),
Copy link
Member Author

Choose a reason for hiding this comment

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

We'll need to update this to Berlin (and eventually London), but in the spirit of a minimal fix to the security advisory I chose to not do that update in this PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

We do have Berlin activated now. There is no way right now to do Berlin?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah I see as per comment out code in another section.

Comment on lines +273 to +276
fn make_executor<'a>(
&'a self,
engine: &'a Engine,
) -> executor::StackExecutor<'static, 'a, executor::MemoryStackState<Engine>> {
Copy link
Member Author

Choose a reason for hiding this comment

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

Factoring this out from the Engine struct was needed now that executor::StackExecutor takes a reference to the precompiles map instead of the map itself. The explicit lifetimes are needed for it to compile.

Copy link
Contributor

@joshuajbouw joshuajbouw left a comment

Choose a reason for hiding this comment

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

Looks good

@birchmd birchmd merged commit 128ccd2 into develop Oct 26, 2021
@birchmd birchmd deleted the update-evm-dep branch October 26, 2021 19:41
artob pushed a commit that referenced this pull request Nov 1, 2021
* Feat(engine): Public method for computing block hash at given height (#303)
* Fix(precompiles): Always charge for gas in ecrecover (#305)
* Fix(precompiles): Pad modexp input if it is too short (#306)
* Feat(engine): Include address field in returned EVM logs (#299)
* Fix(engine): Remove unnecessary eth-connector logic (#312)
* Feat(benchmarks): update gas bounds after wasm cost reduction (#315)
* Fix(engine): update to latest SputnikVM (#316)
* Add logging of public of the signer (#319)

Co-authored-by: Dmitry Strokov <[email protected]>
Co-authored-by: Joshua J. Bouw <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-evm-compatibility Area: EVM compatibility changes or fixes. A-security Area: Security related. P-high Pririoty: high
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants