Skip to content

Commit

Permalink
Merge branch 'main' into staterecovery-part-13-blockhash-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jpnovais committed Feb 19, 2025
2 parents 3c740a8 + 2f5dd49 commit 465331e
Show file tree
Hide file tree
Showing 40 changed files with 177 additions and 226 deletions.
13 changes: 13 additions & 0 deletions bridge-ui/src/components/bridge/BridgeLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"use client";

import { useAccount } from "wagmi";
import { MdWarning } from "react-icons/md";
import Bridge from "../bridge/Bridge";
import { BridgeExternal } from "./BridgeExternal";
import { useTokenStore } from "@/stores/tokenStoreProvider";
Expand Down Expand Up @@ -34,6 +35,18 @@ export default function BridgeLayout() {
<BridgeExternal />
</div>
)}
{isConnected && token?.type === TokenType.USDC && (
<div className="mb-4 min-w-min max-w-lg rounded-lg bg-warning p-2 text-warning-content shadow-lg">
<div className="flex flex-col items-center justify-center gap-2 text-center">
<MdWarning className="text-lg" />
<p>The Linea Sepolia (Testnet) USDC bridge is being upgraded.</p>
<p>
To bridge USDC between Linea and Ethereum, you can use alternative bridge providers. Linea Mainnet is not
effected
</p>
</div>
</div>
)}
<FormProvider {...methods}>
<Bridge />
</FormProvider>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ eth-api="http://traces-node-v2:8545"
[traces]
switch-to-linea-besu=true
blob-compressor-version="V1_0_1"
expected-traces-api-version-v2="v0.8.0-rc8"
expected-traces-api-version-v2="v1.3.0-rc4.1"
[traces.counters-v2]
endpoints=["http://traces-node-v2:8545/"]
request-limit-per-endpoint=1
Expand Down
2 changes: 1 addition & 1 deletion constraints
2 changes: 1 addition & 1 deletion contracts/src/_testing/mocks/tokens/TestERC20.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import "@openzeppelin/contracts/access/Ownable.sol";

/**
* @title TestERC20
* @dev Simple ERC20 Token example.
* @dev Simple ERC-20 Token example.
*/

contract TestERC20 is ERC20, Ownable {
Expand Down
4 changes: 2 additions & 2 deletions contracts/src/bridging/token/BridgedToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ERC20PermitUpgradeable } from "@openzeppelin/contracts-upgradeable/toke

/**
* @title BridgedToken Contract
* @notice ERC20 token created when a native token is bridged to a target chain.
* @notice ERC-20 token created when a native token is bridged to a target chain.
* @custom:security-contact [email protected]
*/
contract BridgedToken is ERC20PermitUpgradeable {
Expand Down Expand Up @@ -61,7 +61,7 @@ contract BridgedToken is ERC20PermitUpgradeable {
}

/**
* @dev Overrides ERC20 default function to support tokens with different decimals.
* @dev Overrides ERC-20 default function to support tokens with different decimals.
* @return The number of decimal.
*/
function decimals() public view override returns (uint8) {
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/bridging/token/CustomBridgedToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { BridgedToken } from "./BridgedToken.sol";

/**
* @title Custom BridgedToken Contract
* @notice Custom ERC20 token manually deployed for the Linea TokenBridge.
* @notice Custom ERC-20 token manually deployed for the Linea TokenBridge.
*/
contract CustomBridgedToken is BridgedToken {
function initializeV2(
Expand Down
20 changes: 10 additions & 10 deletions contracts/src/bridging/token/TokenBridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { PermissionsManager } from "../../security/access/PermissionsManager.sol
import { EfficientLeftRightKeccak } from "../../libraries/EfficientLeftRightKeccak.sol";
/**
* @title Linea Canonical Token Bridge
* @notice Contract to manage cross-chain ERC20 bridging.
* @notice Contract to manage cross-chain ERC-20 bridging.
* @author ConsenSys Software Inc.
* @custom:security-contact [email protected]
*/
Expand Down Expand Up @@ -221,7 +221,7 @@ contract TokenBridge is
/**
* @notice This function is the single entry point to bridge tokens to the
* other chain, both for native and already bridged tokens. You can use it
* to bridge any ERC20. If the token is bridged for the first time an ERC20
* to bridge any ERC-20. If the token is bridged for the first time an ERC-20
* (BridgedToken.sol) will be automatically deployed on the target chain.
* @dev User should first allow the bridge to transfer tokens on his behalf.
* Alternatively, you can use BridgeTokenWithPermit to do so in a single
Expand All @@ -233,7 +233,7 @@ contract TokenBridge is
* Linea can pause the bridge for security reason. In this case new bridge
* transaction would revert.
* @dev Note: If, when bridging an unbridged token and decimals are unknown,
* the call will revert to prevent mismatched decimals. Only those ERC20s,
* the call will revert to prevent mismatched decimals. Only those ERC-20s,
* with a decimals function are supported.
* @param _token The address of the token to be bridged.
* @param _amount The amount of the token to be bridged.
Expand Down Expand Up @@ -291,7 +291,7 @@ contract TokenBridge is

/**
* @notice Similar to `bridgeToken` function but allows to pass additional
* permit data to do the ERC20 approval in a single transaction.
* permit data to do the ERC-20 approval in a single transaction.
* @notice _permit can fail silently, don't rely on this function passing as a form
* of authentication
* @dev There is no need for validation at this level as the validation on pausing,
Expand Down Expand Up @@ -482,7 +482,7 @@ contract TokenBridge is
}

/**
* @dev Linea can set a custom ERC20 contract for specific ERC20.
* @dev Linea can set a custom ERC-20 contract for specific ERC-20.
* For security purpose, Linea can only call this function if the token has
* not been bridged yet.
* @dev SET_CUSTOM_CONTRACT_ROLE is required to execute.
Expand Down Expand Up @@ -521,7 +521,7 @@ contract TokenBridge is
// https://github.com/traderjoe-xyz/joe-core/blob/main/contracts/MasterChefJoeV3.sol#L55-L95

/**
* @dev Provides a safe ERC20.name version which returns 'NO_NAME' as fallback string.
* @dev Provides a safe ERC-20.name version which returns 'NO_NAME' as fallback string.
* @param _token The address of the ERC-20 token contract
* @return tokenName Returns the string of the token name.
*/
Expand All @@ -531,7 +531,7 @@ contract TokenBridge is
}

/**
* @dev Provides a safe ERC20.symbol version which returns 'NO_SYMBOL' as fallback string
* @dev Provides a safe ERC-20.symbol version which returns 'NO_SYMBOL' as fallback string
* @param _token The address of the ERC-20 token contract
* @return symbol Returns the string of the symbol.
*/
Expand All @@ -541,7 +541,7 @@ contract TokenBridge is
}

/**
* @notice Provides a safe ERC20.decimals version which reverts when decimals are unknown
* @notice Provides a safe ERC-20.decimals version which reverts when decimals are unknown
* Note Tokens with (decimals > 255) are not supported
* @param _token The address of the ERC-20 token contract
* @return Returns the token's decimals value.
Expand Down Expand Up @@ -592,9 +592,9 @@ contract TokenBridge is
}

/**
* @notice Call the token permit method of extended ERC20
* @notice Call the token permit method of extended ERC-20
* @notice Only support tokens implementing ERC-2612
* @param _token ERC20 token address
* @param _token ERC-20 token address
* @param _permitData Raw data of the call `permit` of the token
*/
function _permit(address _token, bytes calldata _permitData) internal {
Expand Down
4 changes: 2 additions & 2 deletions contracts/src/bridging/token/interfaces/ITokenBridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ interface ITokenBridge {

/**
* @notice Similar to `bridgeToken` function but allows to pass additional
* permit data to do the ERC20 approval in a single transaction.
* permit data to do the ERC-20 approval in a single transaction.
* @param _token The address of the token to be bridged.
* @param _amount The amount of the token to be bridged.
* @param _recipient The address that will receive the tokens on the other chain.
Expand Down Expand Up @@ -307,7 +307,7 @@ interface ITokenBridge {
function removeReserved(address _token) external;

/**
* @dev Linea can set a custom ERC20 contract for specific ERC20.
* @dev Linea can set a custom ERC-20 contract for specific ERC-20.
* For security purpose, Linea can only call this function if the token has
* not been bridged yet.
* @param _nativeToken address of the token on the source chain.
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/tokens/LineaSurgeXP.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import { AccessControl } from "@openzeppelin/contracts/access/AccessControl.sol";

/**
* @title ERC20 contract for Linea Surge XP (LXP-L) tokens.
* @title ERC-20 contract for Linea Surge XP (LXP-L) tokens.
* @author ConsenSys Software Inc.
* @custom:security-contact [email protected]
*/
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/tokens/LineaVoyageXP.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import { AccessControl } from "@openzeppelin/contracts/access/AccessControl.sol";

/**
* @title Soulbound ERC20 contract for Linea Voyage XP tokens.
* @title Soulbound ERC-20 contract for Linea Voyage XP tokens.
* @author ConsenSys Software Inc.
* @custom:security-contact [email protected]
*/
Expand Down
28 changes: 16 additions & 12 deletions docker/compose-spec-l1-services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ services:
l1-el-node:
container_name: l1-el-node
hostname: l1-el-node
image: consensys/linea-besu-package:${BESU_PACKAGE_TAG:-mainnet-fc27c01}
image: consensys/linea-besu-package:${BESU_PACKAGE_TAG:-mainnet-f2ff06c}
profiles: [ "l1", "debug", "external-to-monorepo" ]
depends_on:
l1-node-genesis-generator:
Expand All @@ -26,6 +26,7 @@ services:
- ./config/l1-node/el/config.toml:/config/config.toml:ro
- ./config/l1-node/jwtsecret.txt:/config/jwtsecret.txt:ro
- ./config/l1-node/el/log4j.xml:/var/lib/besu/log4j.xml:ro
- ./config/l1-node/el/genesis.json:/config/genesis.json
- local-dev:/data
ports:
- "8445:8545"
Expand Down Expand Up @@ -62,6 +63,7 @@ services:
- ./config/l1-node/jwtsecret.txt:/config/jwtsecret.txt:ro
- ./config/l1-node/cl/config.yaml:/config/config-file.yaml:ro
- ./config/l1-node/cl/log4j.xml:/config/log4j.xml:ro
- ./config/l1-node/cl/network-config.yml:/config/network-config.yml:ro
- local-dev:/data
ports:
- "9002:9000"
Expand All @@ -72,18 +74,20 @@ services:
ipv4_address: 10.10.10.202

l1-node-genesis-generator:
build:
context: ./config/l1-node/
image: ethpandaops/ethereum-genesis-generator:pk910-bash-el-genesis-generator
profiles: [ "l1", "debug", "external-to-monorepo" ]
command:
--genesis-time ${L1_GENESIS_TIME:-""}
--current-time-delay-in-sec 3
--l1-genesis /config/l1-genesis.json
--network-config /config/network-config.yml
--mnemonics /config/mnemonics.yaml
--output-dir /data/l1-node-config
entrypoint:
- /bin/bash
- -c
- |
/usr/local/bin/eth2-testnet-genesis deneb \
--config /config/network-config.yml \${L1_GENESIS_TIME:+--timestamp ${L1_GENESIS_TIME} \}
--mnemonics /config/mnemonics.yaml \
--tranches-dir /data/l1-node-config/tranches \
--state-output /data/l1-node-config/genesis.ssz \
--eth1-config /config/genesis.json
volumes:
- ./config/l1-node/cl/network-config.yml:/config/network-config.yml:ro
- ./config/l1-node/cl/mnemonics.yaml:/config/mnemonics.yaml:ro
- ./config/l1-node/el/genesis.json:/config/l1-genesis.json
- ./config/l1-node/cl/network-config.yml:/config/network-config.yml:ro
- ./config/l1-node/el/genesis.json:/config/genesis.json
- local-dev:/data
16 changes: 8 additions & 8 deletions docker/compose-spec-l2-services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
sequencer:
hostname: sequencer
container_name: sequencer
image: consensys/linea-besu-package:${BESU_PACKAGE_TAG:-mainnet-fc27c01}
image: consensys/linea-besu-package:${BESU_PACKAGE_TAG:-mainnet-f2ff06c}
profiles: [ "l2", "l2-bc", "debug", "external-to-monorepo" ]
ports:
- "8545:8545"
Expand Down Expand Up @@ -82,7 +82,7 @@ services:
l2-node-besu:
hostname: l2-node-besu
container_name: l2-node-besu
image: consensys/linea-besu-package:${BESU_PACKAGE_TAG:-mainnet-fc27c01}
image: consensys/linea-besu-package:${BESU_PACKAGE_TAG:-mainnet-f2ff06c}
profiles: [ "l2", "l2-bc", "debug", "external-to-monorepo" ]
depends_on:
sequencer:
Expand Down Expand Up @@ -162,7 +162,7 @@ services:
traces-node-v2:
hostname: traces-node-v2
container_name: traces-node-v2
image: consensys/linea-besu-package:devnet-811f30b
image: consensys/linea-besu-package:devnet-9136b07
profiles: [ "l2", "l2-bc", "debug", "external-to-monorepo" ]
depends_on:
sequencer:
Expand Down Expand Up @@ -226,7 +226,7 @@ services:
prover-v3: # prover compatible with the traces from zkbesu
container_name: prover-v3
hostname: prover-v3
image: consensys/linea-prover:${PROVER_TAG:-543aedd}
image: consensys/linea-prover:${PROVER_TAG:-cd7228e}
platform: linux/amd64
# to avoid spinning up on CI for now
profiles: [ "l2" ]
Expand All @@ -247,7 +247,7 @@ services:
postman:
container_name: postman
hostname: postman
image: consensys/linea-postman:${POSTMAN_TAG:-1f8647e}
image: consensys/linea-postman:${POSTMAN_TAG:-cd7228e}
profiles: [ "l2", "debug" ]
platform: linux/amd64
restart: on-failure
Expand All @@ -266,7 +266,7 @@ services:
traces-api:
hostname: traces-api
container_name: traces-api
image: consensys/linea-traces-api-facade:${TRACES_API_TAG:-1f8647e}
image: consensys/linea-traces-api-facade:${TRACES_API_TAG:-cd7228e}
profiles: [ "l2", "debug" ]
restart: on-failure
depends_on:
Expand All @@ -287,7 +287,7 @@ services:
coordinator:
hostname: coordinator
container_name: coordinator
image: consensys/linea-coordinator:${COORDINATOR_TAG:-c08e279}
image: consensys/linea-coordinator:${COORDINATOR_TAG:-cd7228e}
platform: linux/amd64
profiles: [ "l2", "debug" ]
depends_on:
Expand Down Expand Up @@ -490,7 +490,7 @@ services:
transaction-exclusion-api:
hostname: transaction-exclusion-api
container_name: transaction-exclusion-api
image: consensys/linea-transaction-exclusion-api:${TRANSACTION_EXCLUSION_API_TAG:-1f8647e}
image: consensys/linea-transaction-exclusion-api:${TRANSACTION_EXCLUSION_API_TAG:-cd7228e}
profiles: [ "l2", "debug" ]
restart: on-failure
depends_on:
Expand Down
2 changes: 1 addition & 1 deletion docker/compose-tracing-v1-ci-extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
extends:
file: compose-spec-l2-services.yml
service: l2-node-besu
image: consensys/linea-besu-package:${BESU_PACKAGE_TAG:-mainnet-fc27c01}
image: consensys/linea-besu-package:${BESU_PACKAGE_TAG:-mainnet-f2ff06c}
volumes:
- ../config/common/traces-limits-besu-v1.toml:/var/lib/besu/traces-limits.toml:ro

Expand Down
2 changes: 1 addition & 1 deletion docker/compose-tracing-v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ services:
extends:
file: compose-spec-l2-services.yml
service: sequencer
image: consensys/linea-besu-package:${BESU_PACKAGE_TAG:-mainnet-fc27c01}
image: consensys/linea-besu-package:${BESU_PACKAGE_TAG:-mainnet-f2ff06c}
volumes:
- ../config/common/traces-limits-besu-v1.toml:/var/lib/besu/traces-limits.toml:ro

Expand Down
2 changes: 1 addition & 1 deletion docker/compose-tracing-v2-ci-extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
extends:
file: compose-spec-l2-services.yml
service: l2-node-besu
image: consensys/linea-besu-package:devnet-811f30b
image: consensys/linea-besu-package:devnet-9136b07
volumes:
- ../config/common/traces-limits-besu-v2.toml:/var/lib/besu/traces-limits.toml:ro

Expand Down
2 changes: 1 addition & 1 deletion docker/compose-tracing-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ services:
extends:
file: compose-spec-l2-services.yml
service: sequencer
image: consensys/linea-besu-package:devnet-811f30b
image: consensys/linea-besu-package:devnet-9136b07
volumes:
- ../config/common/traces-limits-besu-v2.toml:/var/lib/besu/traces-limits.toml:ro

Expand Down
5 changes: 0 additions & 5 deletions docker/config/l1-node/Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion docker/config/l1-node/cl/config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#logging: "INFO"
log-destination: "DEFAULT_BOTH"
network: "/data/l1-node-config/network-config.yml"
network: "/config/network-config.yml"
data-storage-mode: "PRUNE"
initial-state: "/data/l1-node-config/genesis.ssz"

Expand Down
2 changes: 1 addition & 1 deletion docker/config/l1-node/cl/network-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ CONFIG_NAME: testnet # needs to exist because of Prysm. Otherwise it conflicts w
MIN_GENESIS_ACTIVE_VALIDATOR_COUNT: 1
# Mar-01-2021 08:53:32 AM +UTC
# This is an invalid valid and should be updated when you create the genesis
MIN_GENESIS_TIME: $GENESIS_TIME
MIN_GENESIS_TIME: 0
GENESIS_FORK_VERSION: 0x10000038
GENESIS_DELAY: 10
MAX_BLOBS_PER_BLOCK: 18
Expand Down
2 changes: 1 addition & 1 deletion docker/config/l1-node/el/config.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
genesis-file="/data/l1-node-config/genesis.json"
genesis-file="/config/genesis.json"
logging="INFO"
data-path="/opt/besu/data"
data-storage-format="FOREST"
Expand Down
2 changes: 1 addition & 1 deletion docker/config/l1-node/el/genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -998,5 +998,5 @@
"nonce": "0x1234",
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"timestamp": "1708874895"
"timestamp": "0x0"
}
Loading

0 comments on commit 465331e

Please sign in to comment.