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(protocol): use prevrandao for L2 mixHash #13157

Merged
merged 22 commits into from
Feb 16, 2023
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
a19e97d
additional integration test, tokenomics tests, and fixing type-errors…
cyberhorsey Feb 15, 2023
5f3e17e
additional integration test, tokenomics tests, and fixing type-errors…
cyberhorsey Feb 15, 2023
37248e1
add hardhat sizer and refactor TokenVault as it is the one approachig…
cyberhorsey Feb 15, 2023
cffc440
lockfile
cyberhorsey Feb 15, 2023
4f8c77e
Merge branch 'main' into addtl_int_tests
davidtaikocha Feb 15, 2023
d244498
fix t okenomics tests
cyberhorsey Feb 15, 2023
01ba23c
fix(protocol): make mixHash have random number from beaconchain (#13156)
dantaik Feb 15, 2023
a691892
Revert "fix(protocol): make mixHash have random number from beaconcha…
dantaik Feb 15, 2023
7a90292
Merge branch 'addtl_int_tests' of github.com:taikochain/taiko-mono in…
cyberhorsey Feb 15, 2023
8bd162b
Revert "Revert "fix(protocol): make mixHash have random number from b…
dantaik Feb 15, 2023
79a4520
Update LibProposing.sol
dantaik Feb 15, 2023
4aba273
Merge branch 'main' into addtl_int_tests
cyberhorsey Feb 15, 2023
7d813df
change sol coverage to my fork until PR is merged in
cyberhorsey Feb 15, 2023
f54fa8f
Merge branch 'addtl_int_tests' of github.com:taikochain/taiko-mono in…
cyberhorsey Feb 15, 2023
de2cf59
Merge branch 'main' into addtl_int_tests
davidtaikocha Feb 16, 2023
0bb361b
Merge branch 'addtl_int_tests' into fix_mixHash
dantaik Feb 16, 2023
a290ac3
Merge branch 'main' into addtl_int_tests
cyberhorsey Feb 16, 2023
07879b3
test fix, rm log
cyberhorsey Feb 16, 2023
fa81b9c
Merge branch 'addtl_int_tests' of github.com:taikochain/taiko-mono in…
cyberhorsey Feb 16, 2023
f8230f9
use taikoxyz fork and not cyberhorsey
cyberhorsey Feb 16, 2023
512cec9
Merge branch 'addtl_int_tests' into fix_mixHash
dantaik Feb 16, 2023
d19b23e
Merge branch 'main' into fix_mixHash
dantaik Feb 16, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions packages/protocol/contracts/L1/libs/LibProposing.sol
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,13 @@ library LibProposing {
meta.l1Hash = blockhash(block.number - 1);
meta.timestamp = uint64(block.timestamp);

// if multiple L2 blocks included in the same L1 block,
// their block.mixHash fields for randomness will be the same.
meta.mixHash = bytes32(block.difficulty);
// After The Merge, L1 mixHash contains the prevrandao
// from the beacon chain. Since multiple Taiko blocks
// can be proposed in one Ethereum block, we need to
// add salt to this random number as L2 mixHash
meta.mixHash = keccak256(
abi.encodePacked(block.prevrandao, state.nextBlockId)
cyberhorsey marked this conversation as resolved.
Show resolved Hide resolved
);
}

uint256 deposit;
Expand Down