Skip to content
This repository has been archived by the owner on May 11, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' into capacity_log
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaikocha authored Sep 26, 2023
2 parents 49c8499 + 4e0e390 commit 9fea02a
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 29 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,10 @@ jobs:
working-directory: ${{ env.TAIKO_MONO_DIR }}
run: cd ./packages/protocol && pnpm install && ./script/download_solc.sh && forge install

- name: Build
working-directory: ${{ env.CLIENT_DIR }}
run: make build

- name: Test
working-directory: ${{ env.CLIENT_DIR }}
run: |
TAIKO_MONO_DIR=${GITHUB_WORKSPACE}/${TAIKO_MONO_DIR} COMPILE_PROTOCOL=true make test
# - name: Test
# working-directory: ${{ env.CLIENT_DIR }}
# run: |
# TAIKO_MONO_DIR=${GITHUB_WORKSPACE}/${TAIKO_MONO_DIR} make test

- name: Codecov.io
uses: codecov/codecov-action@v3
Expand Down
1 change: 1 addition & 0 deletions cmd/flags/prover.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,5 @@ var ProverFlags = MergeFlags(CommonFlags, []cli.Flag{
ProverHTTPServerPort,
ProverCapacity,
MaxExpiry,
TaikoTokenAddress,
})
2 changes: 0 additions & 2 deletions integration_test/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ if ! docker info >/dev/null 2>&1; then
fi

TESTNET_CONFIG=$DIR/nodes/docker-compose.yml
COMPILE_PROTOCOL=${COMPILE_PROTOCOL:-false}
PREMINT_TOKEN_AMOUNT=92233720368547758070000000000000

TESTNET_CONFIG=$TESTNET_CONFIG \
COMPILE_PROTOCOL=$COMPILE_PROTOCOL \
TAIKO_MONO_DIR=$TAIKO_MONO_DIR \
PREMINT_TOKEN_AMOUNT=$PREMINT_TOKEN_AMOUNT \
$DIR/nodes/init.sh
Expand Down
Empty file.
15 changes: 3 additions & 12 deletions integration_test/nodes/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,10 @@ echo "Starting testnet..."
docker compose -f $TESTNET_CONFIG down -v --remove-orphans &>/dev/null
docker compose -f $TESTNET_CONFIG up -d

if [ "$COMPILE_PROTOCOL" == "true" ]; then
cd $TAIKO_MONO_DIR/packages/protocol && yarn run clean && yarn run compile
cd -
fi

echo "Waiting till testnet nodes fully started..."

NODE_URL=localhost:18545 $DIR/../util/wait_for_node.sh
NODE_URL=localhost:28545 $DIR/../util/wait_for_node.sh
rm -rf $DIR/deployments/mainnet.json

# Get the hash of L2 genesis.
L2_GENESIS_HASH=$(
Expand All @@ -40,19 +34,16 @@ L2_GENESIS_HASH=$(
cd $TAIKO_MONO_DIR/packages/protocol &&
PRIVATE_KEY=ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 \
ORACLE_PROVER=0x70997970C51812dc3A010C7d01b50e0d17dc79C8 \
SOLO_PROPOSER=0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 \
OWNER=0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC \
TREASURY=0xdf09A0afD09a63fb04ab3573922437e1e637dE8b \
TAIKO_L2_ADDRESS=0x1000777700000000000000000000000000000001 \
L2_SIGNAL_SERVICE=0x1000777700000000000000000000000000000007 \
SHARED_SIGNAL_SERVICE=0x0000000000000000000000000000000000000000 \
TAIKO_TOKEN_PREMINT_RECIPIENTS=0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266,0x70997970C51812dc3A010C7d01b50e0d17dc79C8 \
TAIKO_TOKEN_PREMINT_AMOUNTS=$PREMINT_TOKEN_AMOUNT,$PREMINT_TOKEN_AMOUNT \
TAIKO_TOKEN_PREMINT_RECIPIENTS="0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266,0x70997970C51812dc3A010C7d01b50e0d17dc79C8" \
TAIKO_TOKEN_PREMINT_AMOUNTS="$PREMINT_TOKEN_AMOUNT,$PREMINT_TOKEN_AMOUNT" \
L2_GENESIS_HASH=$L2_GENESIS_HASH \
L2_CHAIN_ID=167001 \
forge script script/DeployOnL1.s.sol:DeployOnL1 \
--fork-url http://localhost:18545 \
--broadcast \
--ffi \
-vvvv \
-vvvvv \
--block-gas-limit 100000000
2 changes: 2 additions & 0 deletions prover/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ type Config struct {
L2HttpEndpoint string
TaikoL1Address common.Address
TaikoL2Address common.Address
TaikoTokenAddress common.Address
L1ProverPrivKey *ecdsa.PrivateKey
ZKEvmRpcdEndpoint string
ZkEvmRpcdParamsPath string
Expand Down Expand Up @@ -134,6 +135,7 @@ func NewConfigFromCliContext(c *cli.Context) (*Config, error) {
L2HttpEndpoint: c.String(flags.L2HTTPEndpoint.Name),
TaikoL1Address: common.HexToAddress(c.String(flags.TaikoL1Address.Name)),
TaikoL2Address: common.HexToAddress(c.String(flags.TaikoL2Address.Name)),
TaikoTokenAddress: common.HexToAddress(c.String(flags.TaikoTokenAddress.Name)),
L1ProverPrivKey: l1ProverPrivKey,
ZKEvmRpcdEndpoint: c.String(flags.ZkEvmRpcdEndpoint.Name),
ZkEvmRpcdParamsPath: c.String(flags.ZkEvmRpcdParamsPath.Name),
Expand Down
15 changes: 8 additions & 7 deletions prover/prover.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,14 @@ func InitFromConfig(ctx context.Context, p *Prover, cfg *Config) (err error) {

// Clients
if p.rpc, err = rpc.NewClient(p.ctx, &rpc.ClientConfig{
L1Endpoint: cfg.L1WsEndpoint,
L2Endpoint: cfg.L2WsEndpoint,
TaikoL1Address: cfg.TaikoL1Address,
TaikoL2Address: cfg.TaikoL2Address,
RetryInterval: cfg.BackOffRetryInterval,
Timeout: cfg.RPCTimeout,
BackOffMaxRetrys: new(big.Int).SetUint64(p.cfg.BackOffMaxRetrys),
L1Endpoint: cfg.L1WsEndpoint,
L2Endpoint: cfg.L2WsEndpoint,
TaikoL1Address: cfg.TaikoL1Address,
TaikoL2Address: cfg.TaikoL2Address,
TaikoTokenAddress: cfg.TaikoTokenAddress,
RetryInterval: cfg.BackOffRetryInterval,
Timeout: cfg.RPCTimeout,
BackOffMaxRetrys: new(big.Int).SetUint64(p.cfg.BackOffMaxRetrys),
}); err != nil {
return err
}
Expand Down

0 comments on commit 9fea02a

Please sign in to comment.