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

feat(engine): Blockhash definition #213

Merged
merged 3 commits into from Aug 4, 2021
Merged

feat(engine): Blockhash definition #213

merged 3 commits into from Aug 4, 2021

Conversation

birchmd
Copy link
Member

@birchmd birchmd commented Aug 3, 2021

This PR defines an Aurora block hash for each height of the NEAR blockchain (including skipped ones). This definition is unique on different networks (via chain_id) and different accounts on the same network(*). It also includes a prefix byte which may allow us to change this scheme in the future and verify the change is implemented based on the hash output.

(*) Note: in the future, when we have sharding, this may need to change because there could be multiple Aurora accounts on the same network that are contributing to the same set of blocks.

src/engine.rs Outdated Show resolved Hide resolved
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.

LGTM!

@sept-en
Copy link
Contributor

sept-en commented Aug 3, 2021

NB: this PR fixes #209

@joshuajbouw joshuajbouw merged commit cd05557 into develop Aug 4, 2021
@joshuajbouw joshuajbouw deleted the def-blockhash branch August 4, 2021 03:16
@joshuajbouw joshuajbouw linked an issue Aug 4, 2021 that may be closed by this pull request
artob added a commit that referenced this pull request Aug 14, 2021
* ERC-20: forbid using invalid NEP141 AccountID for mapping (#179)
* Timestamp should be in milliseconds for Ethereum compatibility (#208)
* feat(engine): Blockhash definition (#213)
* Update etc/state-migration-test/Cargo.lock (#211)
* Include cost of access list in intrinsic gas (#219)
* Bump tar from 4.4.13 to 4.4.15 in /etc/eth-contracts (#217)
* Feat(engine): Relayer payment (#215)
* Scheduled lint is supposed to run nightly clippy (#214)
* Return actual status of a transaction (#218)
* Added parser for Integer types (#183)
* Update to latest nightly (#221)
* Fix(engine): do not panic when user has insufficient balance to cover gas (#223)
* Update lock files (#224)
* Method to fix balance of aurora account on testnet (#225)
* Use math api host functions on mainnet (#228)
* NEP-141 compliance correctness (#202)
* Adapt workflows to dockerized runners (#231)
* Move block height to the end of hashed data. (#233)
* Ensure solidity artifacts are always recompiled (#234)
* Prevent test binary from deploying (#237)
* Add removal of eth-contracts to `make clean`
* Remove deploy_code feature gate

Co-authored-by: Dmitry Strokov <dmitry@aurora.dev>
Co-authored-by: Evgeny Ukhanov <evgeny@aurora.dev>
Co-authored-by: Joshua J. Bouw <joshua@aurora.dev>
Co-authored-by: Kirill <kirill@aurora.dev>
Co-authored-by: Michael Birch <michael@aurora.dev>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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.

Fix block_hash
4 participants