[Fix] - Compute genesis shnarf dynamically (#353)

* compute genesis shnarf dynamically

* use newest ABI for V6

* remove validate tags and branch

* use correct var name for council

* Update contracts/deploy/06_deploy_TokenBridge.ts

Co-authored-by: Diana Borbe - ConsenSys <diana.borbe@consensys.net>
Signed-off-by: The Dark Jester <thedarkjester@users.noreply.github.com>

* adjust env var names for consistency

* Fix: remove github actions warnings (#394)

* fix: remove github actions warnings

* fix: bump code ql github action version to v3 (#396)

* use latest OZ link (#395)

* feat: update local compose file for linea-besu delivery39 and plugins (#397)

* fix: update github actions versions (#398)

* [Feat] - Exclude *.md files from triggering CI workflow (#370)

* did .md exclusion rules for workflow files

* test md change

* add markdown exclusion to pull_request event in main.yml

* modify main.yml to ignore *.md file on pull_request

* test if main.yml will ignore yml changes

* adjust paths exclusion for *.md

* test commit

* test commit

* alternate way for main.yml to filter out .md

* test changes to main.yml

* test change to main.yml

* add compound dorny/path-filter param

* fix duplicate workflow id

* removed *.yml test value

* adjust pr 370 as per comments 1 + test markdown change

* revert *.md test change

* clarify main.yml comments

* test

* test

* flip to is-markdown-only

* Revert "flip to is-markdown-only"

This reverts commit 5496a1b08384bcf034264a25322c20456c18df1c.

* trial push down

* test

* test

* test

* test

* test

* test

* test

* remove *.yml

* DO NOT MERGE THIS COMMIT - *.yml for demo purpose

* remove *.yml after demo done

* rename not-markdown-only to has-changes-other-than-markdown

* change to has-code-changes

* DO NOT MERGE - *.yml test

* Revert "DO NOT MERGE - *.yml test"

This reverts commit 807d71b3597204497d21afc2c51b81f68a92f63f.

* add docs to exclusion list, replace image extensions

* DO NOT MERGE - test ci

* Revert "DO NOT MERGE - test ci"

This reverts commit ee8831fe6259967d10ce9aa5c6db96e4ba808d82.

* change to has-changes-requiring-build

---------

Co-authored-by: Victorien Gauch <85494462+VGau@users.noreply.github.com>

* Introduced spotless checks to gradle scripts. Added publishing logic … (#401)

* Introduced spotless checks to gradle scripts. Added publishing logic to all the generic jvm libs. Removed redundant useJUnitPlatform()

* Removed more useJUnitPlatform()

* feat: update copyShadowJarToLocalBesu in finalized-tag-updater gradle build file

* fix: geth traces-node running in start-all local stack

---------

Co-authored-by: jonesho <jones.ho@consensys.net>

* Fixing spotless plugin application performance issue when applied to gradle.build files (#405)

* Feat/272 split sdk and postman (#381)

* feat: split postman and sdk

* fix: update postman client and sendMessage script

* fix: clean the sdk

* fix: update sdk dependencies

* fix: remove .env.sample file

* fix: remove testing helpers from the build

* fix: update gas provider in linea sdk and update postman client

* fix: update postman dependencies

* fix: update postman dockerfile and fix tests imports and types

* fix: remove unused code in the sdk + move typechain folder

* fix: remove unused code + fix imports in postman

* fix: pnpm lock file issue

* fix: import issue

* fix: case sensitive file issue

* fix: update sdk fees options and update exports

* fix: remove postman unused code and adjust imports and tests

* fix: update contracts abis + clean error parsing

* fix: update postman based on new SDk changes

* add readme + remove unused interface in postman

* fix: rename Base.ts file to BaseError.ts

* fix: rename Base.ts file to BaseError.ts in postman

* chore: update readme for the postman

* fix: rename maxFeePerGas to maxFeePerGasCap

* fix: update DefaultGasProvider fees check

* fix: default gas provider test issue

* fix: update main ci filter

* fix: issue in default gas provider

* feat: update postman docker image version in local stack (#410)

* Remove V5 from e2e + allow multiple runs no deploy (#411)

* Prover: couple of fixes betav1 (#377)

* fix(execution): a few fixes in the wizard verifier

* feat(dict): pass the dict path from config

* fix: makeBw6Proof returns circuitID instead of -1

* fix(circuitID): make bw6Proof returns the circuitID

* fix(config-testing)

* feat(config): sepolia-full uses full aggregation

* style(naming): renaming the rolling hash fields and documenting the checks in pi-interconnection

* feat: flag for target number of constraints

* fix refactoring oversight

---------

Co-authored-by: Arya Tabaie <arya.pourtabatabaie@gmail.com>

* Revert "Revert: Prover: bump to arithmetization beta-v0.8.0-rc6 (#362) (#371)" (#418)

This reverts commit 8be665e11c.

---------

Signed-off-by: The Dark Jester <thedarkjester@users.noreply.github.com>
Co-authored-by: Diana Borbe - ConsenSys <diana.borbe@consensys.net>
Co-authored-by: Victorien Gauch <85494462+VGau@users.noreply.github.com>
Co-authored-by: jonesho <81145364+jonesho@users.noreply.github.com>
Co-authored-by: kyzooghost <73516204+kyzooghost@users.noreply.github.com>
Co-authored-by: Roman Vaseev <4833306+Filter94@users.noreply.github.com>
Co-authored-by: jonesho <jones.ho@consensys.net>
Co-authored-by: AlexandreBelling <alexandrebelling8@gmail.com>
Co-authored-by: Arya Tabaie <arya.pourtabatabaie@gmail.com>
This commit is contained in:
The Dark Jester
2025-01-06 10:31:29 +00:00
committed by GitHub
parent f9c49099c5
commit c9e67e75b7
5 changed files with 25 additions and 49 deletions

View File

@@ -111,7 +111,7 @@ deploy-token-bridge-l1:
RPC_URL=http:\\localhost:8445/ \
REMOTE_CHAIN_ID=1337 \
TOKEN_BRIDGE_L1=true \
TOKEN_BRIDGE_SECURITY_COUNCIL=0x90F79bf6EB2c4f870365E785982E1f101E93b906 \
L1_TOKEN_BRIDGE_SECURITY_COUNCIL=0x90F79bf6EB2c4f870365E785982E1f101E93b906 \
L2MESSAGESERVICE_ADDRESS=0xe537D669CA013d86EBeF1D64e40fC74CADC91987 \
LINEA_ROLLUP_ADDRESS=0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9 \
npx ts-node local-deployments-artifacts/deployBridgedTokenAndTokenBridge.ts
@@ -124,7 +124,7 @@ deploy-token-bridge-l2:
RPC_URL=http:\\localhost:8545/ \
REMOTE_CHAIN_ID=31648428 \
TOKEN_BRIDGE_L1=false \
TOKEN_BRIDGE_SECURITY_COUNCIL=0xf17f52151EbEF6C7334FAD080c5704D77216b732 \
L2_TOKEN_BRIDGE_SECURITY_COUNCIL=0xf17f52151EbEF6C7334FAD080c5704D77216b732 \
L2MESSAGESERVICE_ADDRESS=0xe537D669CA013d86EBeF1D64e40fC74CADC91987 \
LINEA_ROLLUP_ADDRESS=0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9 \
npx ts-node local-deployments-artifacts/deployBridgedTokenAndTokenBridge.ts

View File

@@ -983,19 +983,6 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "GENESIS_SHNARF",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "INBOX_STATUS_RECEIVED",

View File

@@ -33,18 +33,6 @@ contract LineaRollup is
/// @notice The role required to set/remove proof verifiers by type.
bytes32 public constant VERIFIER_UNSETTER_ROLE = keccak256("VERIFIER_UNSETTER_ROLE");
/// @notice The default genesis shnarf using empty/default hashes and a default state.
bytes32 public constant GENESIS_SHNARF =
keccak256(
abi.encode(
EMPTY_HASH,
EMPTY_HASH,
0x072ead6777750dc20232d1cee8dc9a395c2d350df4bbaa5096c6f59b214dcecd,
EMPTY_HASH,
EMPTY_HASH
)
);
/// @dev Value indicating a shnarf exists.
uint256 internal constant SHNARF_EXISTS_DEFAULT_VALUE = 1;
@@ -138,9 +126,16 @@ contract LineaRollup is
currentL2BlockNumber = _initializationData.initialL2BlockNumber;
stateRootHashes[_initializationData.initialL2BlockNumber] = _initializationData.initialStateRootHash;
blobShnarfExists[GENESIS_SHNARF] = SHNARF_EXISTS_DEFAULT_VALUE;
bytes32 genesisShnarf = _computeShnarf(
EMPTY_HASH,
EMPTY_HASH,
_initializationData.initialStateRootHash,
EMPTY_HASH,
EMPTY_HASH
);
currentFinalizedShnarf = GENESIS_SHNARF;
blobShnarfExists[genesisShnarf] = SHNARF_EXISTS_DEFAULT_VALUE;
currentFinalizedShnarf = genesisShnarf;
currentFinalizedState = _computeLastFinalizedState(0, EMPTY_HASH, _initializationData.genesisTimestamp);
}

View File

@@ -37,15 +37,22 @@ async function main() {
const ORDERED_NONCE_POST_L2MESSAGESERVICE = 3;
const ORDERED_NONCE_POST_LINEAROLLUP = 4;
let securityCouncilAddress;
if (process.env.TOKEN_BRIDGE_L1 === "true") {
securityCouncilAddress = getRequiredEnvVar("L1_TOKEN_BRIDGE_SECURITY_COUNCIL");
} else {
securityCouncilAddress = getRequiredEnvVar("L2_TOKEN_BRIDGE_SECURITY_COUNCIL");
}
const l2MessageServiceAddress = process.env.L2MESSAGESERVICE_ADDRESS;
const lineaRollupAddress = process.env.LINEA_ROLLUP_ADDRESS;
const remoteChainId = getRequiredEnvVar("REMOTE_CHAIN_ID");
const tokenBridgeSecurityCouncil = getRequiredEnvVar("TOKEN_BRIDGE_SECURITY_COUNCIL");
const pauseTypeRoles = getEnvVarOrDefault("TOKEN_BRIDGE_PAUSE_TYPES_ROLES", TOKEN_BRIDGE_PAUSE_TYPES_ROLES);
const unpauseTypeRoles = getEnvVarOrDefault("TOKEN_BRIDGE_UNPAUSE_TYPES_ROLES", TOKEN_BRIDGE_UNPAUSE_TYPES_ROLES);
const defaultRoleAddresses = generateRoleAssignments(TOKEN_BRIDGE_ROLES, tokenBridgeSecurityCouncil, []);
const defaultRoleAddresses = generateRoleAssignments(TOKEN_BRIDGE_ROLES, securityCouncilAddress, []);
const roleAddresses = getEnvVarOrDefault("TOKEN_BRIDGE_ROLE_ADDRESSES", defaultRoleAddresses);
const provider = new ethers.JsonRpcProvider(process.env.RPC_URL);
const wallet = new ethers.Wallet(process.env.PRIVATE_KEY!, provider);
@@ -53,13 +60,13 @@ async function main() {
let walletNonce;
if (process.env.TOKEN_BRIDGE_L1 === "true") {
if (process.env.L1_NONCE === undefined) {
if (!process.env.L1_NONCE) {
walletNonce = await wallet.getNonce();
} else {
walletNonce = parseInt(process.env.L1_NONCE) + ORDERED_NONCE_POST_LINEAROLLUP;
}
} else {
if (process.env.L2_NONCE === undefined) {
if (!process.env.L2_NONCE) {
walletNonce = await wallet.getNonce();
} else {
walletNonce = parseInt(process.env.L2_NONCE) + ORDERED_NONCE_POST_L2MESSAGESERVICE;
@@ -119,7 +126,7 @@ async function main() {
const initializer = getInitializerData(TokenBridgeAbi, "initialize", [
{
defaultAdmin: tokenBridgeSecurityCouncil,
defaultAdmin: securityCouncilAddress,
messageService: deployingChainMessageService,
tokenBeacon: beaconProxyAddress,
sourceChainId: chainId,

File diff suppressed because one or more lines are too long