Commit 6dcb14f5 authored by protolambda's avatar protolambda

Merge branch 'develop' into cleanup-logging-service-utils

parents e3ecfc47 b7acdec2
name: 'UFM Test Service: 1 hour'
on:
schedule:
# Run every hour
- cron: '0 * * * *'
jobs:
ufm_test_service_metamask:
name: 'UFM Test Service: Metamask'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run Docker Compose
run: docker-compose run metamask
env:
CI: ${{ secrets.CI }}
PROMETHEUS_SERVER_URL: ${{ secrets.PROMETHEUS_SERVER_URL }}
PROMETHEUS_PUSHGATEWAY_URL: ${{ secrets.PROMETHEUS_PUSHGATEWAY_URL }}
METAMASK_SECRET_WORDS_OR_PRIVATEKEY: ${{ secrets.METAMASK_SECRET_WORDS_OR_PRIVATEKEY }}
METAMASK_NETWORK: ${{ secrets.METAMASK_NETWORK || 'goerli' }}
METAMASK_PASSWORD: ${{ secrets.METAMASK_PASSWORD || 'T3st_P@ssw0rd!' }}
METAMASK_DAPP_URL: ${{ secrets.METAMASK_DAPP_URL || 'http://localhost:9011' }}
METAMASK_OP_GOERLI_RPC_URL: ${{ secrets.METAMASK_OP_GOERLI_RPC_URL }}
...@@ -26,6 +26,7 @@ packages/contracts-bedrock/deployments/anvil ...@@ -26,6 +26,7 @@ packages/contracts-bedrock/deployments/anvil
# jetbrains # jetbrains
.idea/ .idea/
.secrets
.env .env
.env* .env*
!.env.example !.env.example
......
...@@ -156,6 +156,7 @@ def devnet_l1_genesis(paths): ...@@ -156,6 +156,7 @@ def devnet_l1_genesis(paths):
'--rpc.allow-unprotected-txs' '--rpc.allow-unprotected-txs'
]) ])
try:
forge = ChildProcess(deploy_contracts, paths) forge = ChildProcess(deploy_contracts, paths)
forge.start() forge.start()
forge.join() forge.join()
...@@ -168,6 +169,7 @@ def devnet_l1_genesis(paths): ...@@ -168,6 +169,7 @@ def devnet_l1_genesis(paths):
allocs = response['result'] allocs = response['result']
write_json(paths.allocs_path, allocs) write_json(paths.allocs_path, allocs)
finally:
geth.terminate() geth.terminate()
......
...@@ -4,7 +4,6 @@ ignore: ...@@ -4,7 +4,6 @@ ignore:
- "**/*.t.sol" - "**/*.t.sol"
- "op-bindings/bindings/*.go" - "op-bindings/bindings/*.go"
- "packages/contracts-bedrock/contracts/vendor/WETH9.sol" - "packages/contracts-bedrock/contracts/vendor/WETH9.sol"
- "packages/contracts-bedrock/contracts/cannon" # tested through Go tests
- 'packages/contracts-bedrock/contracts/EAS/**/*.sol' - 'packages/contracts-bedrock/contracts/EAS/**/*.sol'
coverage: coverage:
status: status:
...@@ -31,6 +30,5 @@ flag_management: ...@@ -31,6 +30,5 @@ flag_management:
- name: common-ts-tests - name: common-ts-tests
- name: contracts-tests - name: contracts-tests
- name: core-utils-tests - name: core-utils-tests
- name: dtl-tests
- name: chain-mon-tests - name: chain-mon-tests
- name: sdk-tests - name: sdk-tests
...@@ -208,7 +208,7 @@ require ( ...@@ -208,7 +208,7 @@ require (
rsc.io/tmplfunc v0.0.3 // indirect rsc.io/tmplfunc v0.0.3 // indirect
) )
replace github.com/ethereum/go-ethereum v1.13.1 => github.com/ethereum-optimism/op-geth v1.101202.0-rc.1.0.20230925151842-7dfe72eb2d63 replace github.com/ethereum/go-ethereum v1.13.1 => github.com/ethereum-optimism/op-geth v1.101301.0-rc.2
//replace github.com/ethereum-optimism/superchain-registry/superchain => ../superchain-registry/superchain //replace github.com/ethereum-optimism/superchain-registry/superchain => ../superchain-registry/superchain
//replace github.com/ethereum/go-ethereum v1.13.1 => ../go-ethereum //replace github.com/ethereum/go-ethereum v1.13.1 => ../go-ethereum
...@@ -175,8 +175,8 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7 ...@@ -175,8 +175,8 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7
github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw=
github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.3 h1:RWHKLhCrQThMfch+QJ1Z8veEq5ZO3DfIhZ7xgRP9WTc= github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.3 h1:RWHKLhCrQThMfch+QJ1Z8veEq5ZO3DfIhZ7xgRP9WTc=
github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.3/go.mod h1:QziizLAiF0KqyLdNJYD7O5cpDlaFMNZzlxYNcWsJUxs= github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.3/go.mod h1:QziizLAiF0KqyLdNJYD7O5cpDlaFMNZzlxYNcWsJUxs=
github.com/ethereum-optimism/op-geth v1.101202.0-rc.1.0.20230925151842-7dfe72eb2d63 h1:T0FQmTM9U7YVUTcLdOiS3AXcSVShLS3FrvGjGyqw5So= github.com/ethereum-optimism/op-geth v1.101301.0-rc.2 h1:CoZuN0uuEqoXlKu3iirnGlfsO1nKcIvvbyFZqUVmYN4=
github.com/ethereum-optimism/op-geth v1.101202.0-rc.1.0.20230925151842-7dfe72eb2d63/go.mod h1:N++/klTCpY0UAU9tXFOyOEtvkjgHlNZkzzXm5I/1kzM= github.com/ethereum-optimism/op-geth v1.101301.0-rc.2/go.mod h1:N++/klTCpY0UAU9tXFOyOEtvkjgHlNZkzzXm5I/1kzM=
github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20230921190252-f29074de9e36 h1:HGDz8DcAkHvZy+iPnBa8yr4MdLqKpb7oAks01P08JOg= github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20230921190252-f29074de9e36 h1:HGDz8DcAkHvZy+iPnBa8yr4MdLqKpb7oAks01P08JOg=
github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20230921190252-f29074de9e36/go.mod h1:q0u2UbyOr1q/y94AgMOj/V8b1KO05ZwILTR/qKt7Auo= github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20230921190252-f29074de9e36/go.mod h1:q0u2UbyOr1q/y94AgMOj/V8b1KO05ZwILTR/qKt7Auo=
github.com/ethereum/c-kzg-4844 v0.3.1 h1:sR65+68+WdnMKxseNWxSJuAv2tsUrihTpVBTfM/U5Zg= github.com/ethereum/c-kzg-4844 v0.3.1 h1:sR65+68+WdnMKxseNWxSJuAv2tsUrihTpVBTfM/U5Zg=
......
{
"npmClient": "pnpm",
"useWorkspaces": true,
"version": "independent",
"packages": [
"packages/*"
]
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -95,14 +95,14 @@ func (r *FaultResponder) Resolve(ctx context.Context) error { ...@@ -95,14 +95,14 @@ func (r *FaultResponder) Resolve(ctx context.Context) error {
} }
// buildResolveClaimData creates the transaction data for the ResolveClaim function. // buildResolveClaimData creates the transaction data for the ResolveClaim function.
func (r *FaultResponder) buildResolveClaimData(ctx context.Context, claimIdx uint64) ([]byte, error) { func (r *FaultResponder) buildResolveClaimData(claimIdx uint64) ([]byte, error) {
return r.fdgAbi.Pack("resolveClaim", big.NewInt(int64(claimIdx))) return r.fdgAbi.Pack("resolveClaim", big.NewInt(int64(claimIdx)))
} }
// CallResolveClaim determines if the resolveClaim function on the fault dispute game contract // CallResolveClaim determines if the resolveClaim function on the fault dispute game contract
// would succeed. // would succeed.
func (r *FaultResponder) CallResolveClaim(ctx context.Context, claimIdx uint64) error { func (r *FaultResponder) CallResolveClaim(ctx context.Context, claimIdx uint64) error {
txData, err := r.buildResolveClaimData(ctx, claimIdx) txData, err := r.buildResolveClaimData(claimIdx)
if err != nil { if err != nil {
return err return err
} }
...@@ -115,7 +115,7 @@ func (r *FaultResponder) CallResolveClaim(ctx context.Context, claimIdx uint64) ...@@ -115,7 +115,7 @@ func (r *FaultResponder) CallResolveClaim(ctx context.Context, claimIdx uint64)
// ResolveClaim executes a resolveClaim transaction to resolve a fault dispute game. // ResolveClaim executes a resolveClaim transaction to resolve a fault dispute game.
func (r *FaultResponder) ResolveClaim(ctx context.Context, claimIdx uint64) error { func (r *FaultResponder) ResolveClaim(ctx context.Context, claimIdx uint64) error {
txData, err := r.buildResolveClaimData(ctx, claimIdx) txData, err := r.buildResolveClaimData(claimIdx)
if err != nil { if err != nil {
return err return err
} }
......
This diff is collapsed.
...@@ -115,6 +115,10 @@ abstract contract Deployer is Script { ...@@ -115,6 +115,10 @@ abstract contract Deployer is Script {
string memory deploymentName = deployments[i].name; string memory deploymentName = deployments[i].name;
string memory deployTx = _getDeployTransactionByContractAddress(addr); string memory deployTx = _getDeployTransactionByContractAddress(addr);
if (bytes(deployTx).length == 0) {
console.log("Deploy Tx not found for %s skipping deployment artifact generation", deploymentName);
continue;
}
string memory contractName = _getContractNameFromDeployTransaction(deployTx); string memory contractName = _getContractNameFromDeployTransaction(deployTx);
console.log("Syncing deployment %s: contract %s", deploymentName, contractName); console.log("Syncing deployment %s: contract %s", deploymentName, contractName);
......
This diff is collapsed.
This diff is collapsed.
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0; pragma solidity ^0.8.0;
import { ISchemaRegistry } from "./ISchemaRegistry.sol"; import { ISchemaRegistry } from "src/EAS/ISchemaRegistry.sol";
import { Attestation, Signature } from "./Common.sol"; import { Attestation, Signature } from "src/EAS/Common.sol";
/// @dev A struct representing the arguments of the attestation request. /// @dev A struct representing the arguments of the attestation request.
struct AttestationRequestData { struct AttestationRequestData {
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0; pragma solidity ^0.8.0;
import { ISchemaResolver } from "./resolver/ISchemaResolver.sol"; import { ISchemaResolver } from "src/EAS/resolver/ISchemaResolver.sol";
/// @title A struct representing a record for a submitted schema. /// @title A struct representing a record for a submitted schema.
struct SchemaRecord { struct SchemaRecord {
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
pragma solidity 0.8.15; pragma solidity 0.8.15;
import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol";
import { ISemver } from "../universal/ISemver.sol"; import { ISemver } from "src/universal/ISemver.sol";
import { Types } from "../libraries/Types.sol"; import { Types } from "src/libraries/Types.sol";
/// @custom:proxied /// @custom:proxied
/// @title L2OutputOracle /// @title L2OutputOracle
...@@ -63,8 +63,8 @@ contract L2OutputOracle is Initializable, ISemver { ...@@ -63,8 +63,8 @@ contract L2OutputOracle is Initializable, ISemver {
event OutputsDeleted(uint256 indexed prevNextOutputIndex, uint256 indexed newNextOutputIndex); event OutputsDeleted(uint256 indexed prevNextOutputIndex, uint256 indexed newNextOutputIndex);
/// @notice Semantic version. /// @notice Semantic version.
/// @custom:semver 1.5.0 /// @custom:semver 1.5.1
string public constant version = "1.5.0"; string public constant version = "1.5.1";
/// @notice Constructs the L2OutputOracle contract. /// @notice Constructs the L2OutputOracle contract.
/// @param _submissionInterval Interval in blocks at which checkpoints must be submitted. /// @param _submissionInterval Interval in blocks at which checkpoints must be submitted.
......
...@@ -244,4 +244,11 @@ contract Drippie is AssetReceiver { ...@@ -244,4 +244,11 @@ contract Drippie is AssetReceiver {
emit DripExecuted(_name, _name, msg.sender, block.timestamp); emit DripExecuted(_name, _name, msg.sender, block.timestamp);
} }
/// @notice Returns the status of a given drip.
/// @param _name Drip to check.
/// @return DripStatus of the given drip.
function getDripStatus(string calldata _name) public view returns (DripStatus) {
return drips[_name].status;
}
} }
...@@ -81,7 +81,7 @@ contract OptimismMintableTokenFactory_Test is Bridge_Initializer { ...@@ -81,7 +81,7 @@ contract OptimismMintableTokenFactory_Test is Bridge_Initializer {
{ {
bytes memory constructorArgs = abi.encode(address(L2Bridge), _remote, _name, _symbol, _decimals); bytes memory constructorArgs = abi.encode(address(L2Bridge), _remote, _name, _symbol, _decimals);
bytes memory bytecode = abi.encodePacked(type(OptimismMintableERC20).creationCode, constructorArgs); bytes memory bytecode = abi.encodePacked(type(OptimismMintableERC20).creationCode, constructorArgs);
bytes32 salt = keccak256(abi.encode(_remote, _name, _symbol)); bytes32 salt = keccak256(abi.encode(_remote, _name, _symbol, _decimals));
bytes32 hash = keccak256(abi.encodePacked(bytes1(0xff), address(L2TokenFactory), salt, keccak256(bytecode))); bytes32 hash = keccak256(abi.encodePacked(bytes1(0xff), address(L2TokenFactory), salt, keccak256(bytecode)));
return address(uint160(uint256(hash))); return address(uint160(uint256(hash)));
} }
......
This diff is collapsed.
...@@ -261,7 +261,7 @@ func (cp *ConsensusPoller) UpdateBackend(ctx context.Context, be *Backend) { ...@@ -261,7 +261,7 @@ func (cp *ConsensusPoller) UpdateBackend(ctx context.Context, be *Backend) {
} }
// if backend is not healthy state we'll only resume checking it after ban // if backend is not healthy state we'll only resume checking it after ban
if !be.IsHealthy() { if !be.IsHealthy() && !be.forcedCandidate {
log.Warn("backend banned - not healthy", "backend", be.Name) log.Warn("backend banned - not healthy", "backend", be.Name)
cp.Ban(be) cp.Ban(be)
return return
...@@ -327,7 +327,7 @@ func (cp *ConsensusPoller) UpdateBackend(ctx context.Context, be *Backend) { ...@@ -327,7 +327,7 @@ func (cp *ConsensusPoller) UpdateBackend(ctx context.Context, be *Backend) {
RecordBackendUnexpectedBlockTags(be, !expectedBlockTags) RecordBackendUnexpectedBlockTags(be, !expectedBlockTags)
if !expectedBlockTags { if !expectedBlockTags && !be.forcedCandidate {
log.Warn("backend banned - unexpected block tags", log.Warn("backend banned - unexpected block tags",
"backend", be.Name, "backend", be.Name,
"oldFinalized", bs.finalizedBlockNumber, "oldFinalized", bs.finalizedBlockNumber,
...@@ -490,6 +490,10 @@ func (cp *ConsensusPoller) IsBanned(be *Backend) bool { ...@@ -490,6 +490,10 @@ func (cp *ConsensusPoller) IsBanned(be *Backend) bool {
// Ban bans a specific backend // Ban bans a specific backend
func (cp *ConsensusPoller) Ban(be *Backend) { func (cp *ConsensusPoller) Ban(be *Backend) {
if be.forcedCandidate {
return
}
bs := cp.backendState[be] bs := cp.backendState[be]
defer bs.backendStateMux.Unlock() defer bs.backendStateMux.Unlock()
bs.backendStateMux.Lock() bs.backendStateMux.Lock()
......
...@@ -99,7 +99,11 @@ func rewriteParam(rctx RewriteContext, req *RPCReq, res *RPCRes, pos int, requir ...@@ -99,7 +99,11 @@ func rewriteParam(rctx RewriteContext, req *RPCReq, res *RPCRes, pos int, requir
return RewriteNone, nil return RewriteNone, nil
} }
val, rw, err := rewriteTag(rctx, p[pos].(string)) s, ok := p[pos].(string)
if !ok {
return RewriteOverrideError, errors.New("expected string")
}
val, rw, err := rewriteTag(rctx, s)
if err != nil { if err != nil {
return RewriteOverrideError, err return RewriteOverrideError, err
} }
......
This diff is collapsed.
# Used by Test Services to perform certain actions if in CI environment
CI=false CI=false
GRAFANA_ADMIN_PWD= # This is the password used to login into Grafana dashboard as the admin user
GRAFANA_ADMIN_PWD=op
# Used to set the display to be used by playwright when running Metamask test service. # Used by Test Services to query metrics. http://prometheus will use Docker's built-in DNS
# The following are to be used if running on MacOS PROMETHEUS_SERVER_URL="http://prometheus:9090"
# MM_DISPLAY=host.docker.internal:0
# MM_DISPLAY_VOLUME=/tmp/.X11-unix:/tmp/.X11-unix # Used by Test Services to push metrics. http://pushgateway will use Docker's built-in DNS
MM_DISPLAY= PROMETHEUS_PUSHGATEWAY_URL="http://pushgateway:9091"
MM_DISPLAY_VOLUME=
# If true, Metamask Test Service will install Xvfb inside it's container and used that for Playwright tests.
# If false, Metamask you will need to specify METAMASK_DISPLAY and METAMASK_DISPLAY_VOLUME so Playwright can connect to a display
METAMASK_RUN_HEADLESS=true
# The display used for running Playwright tests
METAMASK_DISPLAY=host.docker.internal:0
# The storage for Playwright to store test result, screenshots, videos, etc.
METAMASK_DISPLAY_VOLUME=/tmp/.X11-unix:/tmp/.X11-unix
# Mnemonic used to initialize Metamask, make sure there's enough ETH to run tests
METAMASK_SECRET_WORDS_OR_PRIVATEKEY="test test test test test test test test test test test junk"
# The initial network Metamask will be initialized with, Test Service will override with OP Goerli
METAMASK_NETWORK="goerli"
# The password to unlock Metamask
METAMASK_PASSWORD="T3st_P@ssw0rd!"
# The URL of the Metamask test dApp that will be spun up automatically for testing against
METAMASK_DAPP_URL="http://localhost:9011"
# The OP Goerli RPC provider to be used to read/write data
METAMASK_OP_GOERLI_RPC_URL=""
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
# Needs to point to docker, otherwise you'll get the error: exec: "docker": executable file not found in $PATH
PATH=/
# Runs every minute
* * * * * /usr/local/bin/docker-compose -f /path/to/docker-compose.yml --profile 1minute up -d
# Runs every 5 minutes
*/5 * * * * /usr/local/bin/docker-compose -f /path/to/docker-compose.yml --profile 5minutes up -d
This diff is collapsed.
This diff is collapsed.
METAMASK_SECRET_WORDS_OR_PRIVATEKEY=""
METAMASK_NETWORK="goerli"
METAMASK_PASSWORD="Test@1234"
METAMASK_DAPP_URL="http://localhost:9011"
OP_GOERLI_RPC_URL=""
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -10,7 +10,7 @@ const env = z ...@@ -10,7 +10,7 @@ const env = z
.parse(process.env) .parse(process.env)
const txSuccessMetricName = 'metamask_tx_success' const txSuccessMetricName = 'metamask_tx_success'
const txFailureMetricName = 'metamask_tx_failuree' const txFailureMetricName = 'metamask_tx_failure'
const txSuccessCounter = new Counter({ const txSuccessCounter = new Counter({
name: txSuccessMetricName, name: txSuccessMetricName,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment