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(protocol): use blobhash() and remove BlobHashReader.yulp #15610

Merged
merged 3 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
35 changes: 0 additions & 35 deletions packages/protocol/contracts/4844/BlobHashReader.yulp

This file was deleted.

25 changes: 0 additions & 25 deletions packages/protocol/contracts/4844/IBlobHashReader.sol

This file was deleted.

4 changes: 1 addition & 3 deletions packages/protocol/contracts/L1/libs/LibProposing.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
pragma solidity 0.8.24;

import "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";
import "../../4844/IBlobHashReader.sol";
import "../../common/AddressResolver.sol";
import "../../libs/LibAddress.sol";
import "../hooks/IHook.sol";
Expand Down Expand Up @@ -143,8 +142,7 @@ library LibProposing {
// proposeBlock functions are called more than once in the same
// L1 transaction, these multiple L2 blocks will share the same
// blob.
meta.blobHash =
IBlobHashReader(resolver.resolve("blob_hash_reader", false)).getFirstBlobHash();
meta.blobHash = blobhash(0);

if (meta.blobHash == 0) revert L1_BLOB_NOT_FOUND();

Expand Down
1 change: 1 addition & 0 deletions packages/protocol/genesis/generate_genesis.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,6 @@ forge test \
--fork-url http://localhost:18545 \
--fork-retry-backoff 120 \
--no-storage-caching \
--evm-version cancun \
--match-path genesis/*.g.sol \
--block-gas-limit 1000000000
8 changes: 4 additions & 4 deletions packages/protocol/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
"scripts": {
"buildMerkle": "ts-node ./utils/airdrop/buildMerkleTree.ts ./utils/airdrop/airdrop_db/example_claimList.json",
"clean": "rm -rf abis cache* && forge clean",
"compile": "forge build --build-info --extra-output storage-layout",
"compile": "forge build --evm-version cancun --build-info --extra-output storage-layout",
"deploy:foundry": "./script/download_solc.sh && ./script/test_deploy_on_l1.sh",
"eslint": "pnpm exec eslint --ignore-path .eslintignore --ext .js,.ts .",
"eslint:fix": "pnpm exec eslint --ignore-path .eslintignore --ext .js,.ts . --fix",
"fmt:sol": "forge fmt",
"generate:genesis": "ts-node ./utils/generate_genesis/main.ts",
"lint:sol": "forge fmt && pnpm solhint 'contracts/**/*.sol' --fix",
"snapshot": "forge snapshot --match-path 'test/**/*.t.sol'",
"test": "forge test -vvv --match-path test/*.t.sol",
"snapshot": "forge snapshot --evm-version cancun --match-path 'test/**/*.t.sol'",
"test": "forge test -vvv --evm-version cancun --match-path test/*.t.sol",
"test:coverage": "mkdir -p coverage && forge coverage --report lcov && lcov --remove ./lcov.info -o ./coverage/lcov.info 'test/' 'script/' 'contracts/thirdparty/' && genhtml coverage/lcov.info --branch-coverage --output-dir coverage --ignore-errors category && open coverage/index.html",
"test:genesis": "pnpm compile && FOUNDRY_PROFILE=genesis ./genesis/generate_genesis.test.sh",
"export:simconf": "forge test --match-test 'test_simulation' -vv > simulation/out/simconf_$(date +%s).txt"
"export:simconf": "forge test --evm-version cancun --match-test 'test_simulation' -vv > simulation/out/simconf_$(date +%s).txt"
},
"keywords": [
"ZKP",
Expand Down
1 change: 1 addition & 0 deletions packages/protocol/script/test_deploy_on_l1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ forge script script/DeployOnL1.s.sol:DeployOnL1 \
--fork-url http://localhost:8545 \
--broadcast \
--ffi \
--evm-version cancun \
-vvvv \
--private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 \
--block-gas-limit 100000000
Loading