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

Build: Add reproducible build job. #633

Merged
merged 1 commit into from
Nov 24, 2022
Merged

Build: Add reproducible build job. #633

merged 1 commit into from
Nov 24, 2022

Conversation

RomanHodulak
Copy link
Contributor

@RomanHodulak RomanHodulak commented Nov 3, 2022

Description

Adds a build job that produces identical binaries across different build environments.

This is useful to verify that the binary wasn't changed, preventing malicious code from being deployed.

Performance / NEAR gas cost considerations

None.

Testing

Ran locally with @joshuajbouw, and resulted in the same hash of the WASM binary.

shasum -a 256 bin/aurora-mainnet.wasm

How should this be reviewed

Nothing to highlight.

Additional information

Checksums

Steps to produce

cargo make --profile <profile> build-docker
shasum -a 256 bin/aurora-<profile>.wasm

Expected results

57bb07e64187780ddd9870efbe683634f95a98200c026a950757dc0fd3876fca  bin/aurora-mainnet.wasm
789029331d468155bbee6114f70d05945d45691439a69a70bec14f0e99558630  bin/aurora-testnet.wasm

Copy link
Contributor

@sept-en sept-en left a comment

Choose a reason for hiding this comment

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

Could you please provide the expected verified binary hash and instructions on reproducing it locally?

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.

As what @sept-en said, we need instructions written up in in the README file and also include the binary hash that the process created in the PR so that we can have multiple people building. It wouldn't be the same as the one we had already done when we figured this out last night, as that was on master.

Also, the Github Actions build workflow must be updated to build with docker. That way, all builds produced by CI and locally should be identical.

@RomanHodulak RomanHodulak force-pushed the repro-builds branch 2 times, most recently from 423232e to 8c9a76d Compare November 9, 2022 14:42
@RomanHodulak
Copy link
Contributor Author

RomanHodulak commented Nov 9, 2022

I have addressed all comments and rebased on the latest develop.

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.

Got the same hashes. Well done.

Makefile.toml Outdated Show resolved Hide resolved
@joshuajbouw joshuajbouw merged commit 93e6fc5 into develop Nov 24, 2022
@joshuajbouw joshuajbouw deleted the repro-builds branch November 24, 2022 12:59
joshuajbouw pushed a commit that referenced this pull request Nov 24, 2022
@birchmd birchmd mentioned this pull request Nov 24, 2022
@mrLSD mrLSD self-requested a review November 24, 2022 16:19
joshuajbouw added a commit that referenced this pull request Nov 25, 2022
* Chore(docs): Additional documentation for xcc gas values (#590)
* Feat(standalone): Conversion from standalone's TransactionKind to NormalizedEthTransaction (#586)
* Add Backstage metadata (#534)
* Add Backstage metadata
* Fix(aurora-engine-transactions): remove hex feaure from std (#600)
* Feat(tests): benchmark transaction Emufid2pv2UpxrZae4NyowF2N2ZHvYEPq16LsQc7Uoc6 (#599)
* Connector-tests: Add tests for the case where an account other than aurora-engine is used for ETH deposit (#598)
* [Docs] Eth Connector - extended documentation (#601)
* feat: add serde JSON to JSON serializable structs in parameters (#605)
* Pausable precompiles (#588)
* Test(engine): Increase unit test coverage (#614)
* Feat: allow xcc calls to perform any possible NEAR call (#610)
* Test(engine): Increase unit test coverage (#618)
* Refactor: Mark functions that create promises on NEAR as unsafe (#617)
* Fix(xcc): Only update the router contract version in storage if the deploy is successful (#616)
* Fix(CI): broken submodules checkout + Clippy warnings (#621)
* Chore(standalone): Upgrade rocksdb to v0.19. (#615)
* fix: remove sscache from CI (#626)
* Tiny refactoring by clippy suggestions (#625)
* Improvements in log macro (#630)
* Fix (engine): update SputnikVM dependency to avoid stack overflow on deeply nested EVM calls (#628)
* Fix(xcc): Ensure the xcc router attaches enough gas to the execute function (#622)
* Release 2.8.0 notes
* Build: Add reproducible build job. (#633)
* fix: bn 256 regression (#637)
* Update release notes
* Update README to exclude version (#623)
* Chore: Update to SputnikVM version v0.37.1-aurora. Includes some overflow-related fixes. (#638)
* fix: modexp underestimated gas
* chore: bump Cargo to 2.8
* chore: remove version from deployments in README.md

Co-authored-by: Alexey Lapitsky <lex@realisticgroup.com>
Co-authored-by: Joshua J. Bouw <joshua@aurora.dev>
Co-authored-by: Kirill <kirill@aurora.dev>
Co-authored-by: Evgeny Ukhanov <evgeny@aurora.dev>
Co-authored-by: Roman Hodulák <roman.hodulak@aurora.dev>
Co-authored-by: Dmitry Strokov <dmitry.strokov@aurora.dev>
Co-authored-by: Oleksandr Anyshchenko <aanischenko@gmail.com>
Co-authored-by: Oleksandr Anyshchenko <oleksandr.anyshchenko@aurora.dev>
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.

None yet

3 participants