Skip to content

Commit

Permalink
update test help
Browse files Browse the repository at this point in the history
  • Loading branch information
g11tech committed Mar 25, 2023
1 parent 7d8f3b2 commit d4f5223
Showing 1 changed file with 21 additions and 7 deletions.
28 changes: 21 additions & 7 deletions packages/client/test/sim/4844.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,36 @@ Note: All commands should be run from the `client` package directory root (so so

## Running a local devnet

To run a single EthereumJS client <> Lodestar CL client for testing, run the following command:
`NETWORK=sharding EXTRA_CL_PARAMS="--params.CAPELLA_FORK_EPOCH 0 --params.EIP4844_FORK_EPOCH 0" LODE_IMAGE=g11tech/lodestar:4844-ae177e DATADIR=path/to/your/data/directory test/sim/./single-run.sh`
Step 1. To run a single EthereumJS client <> Lodestar CL client for testing, run the following command:
`NETWORK=sharding EXTRA_CL_PARAMS="--params.CAPELLA_FORK_EPOCH 0 --params.DENEB_FORK_EPOCH 0" LODE_IMAGE=g11tech/lodestar:decoupled DATADIR=path/to/your/data/directory test/sim/./single-run.sh`

To run a second EthereumJS <> Lodestar pair, use this command:
`MULTIPEER=syncpeer NETWORK=sharding EXTRA_CL_PARAMS="--params.CAPELLA_FORK_EPOCH 0 --params.DENEB_FORK_EPOCH 0" LODE_IMAGE=g11tech/lodestar:4844-ae177e DATADIR=path/to/your/data/directory test/sim/./single-run.sh`
Step 2. (Optional) To run a second EthereumJS <> Lodestar pair, use this command:
`MULTIPEER=syncpeer NETWORK=sharding EXTRA_CL_PARAMS="--params.CAPELLA_FORK_EPOCH 0 --params.DENEB_FORK_EPOCH 0" LODE_IMAGE=g11tech/lodestar:decoupled DATADIR=path/to/your/data/directory test/sim/./single-run.sh`

To send a single blob transaction to the network, you can use the `txGenerator.ts` script as follows:
Step 3. To send a single blob transaction to the network, you may just run spec test:
`EXTERNAL_RUN=true npm run tape -- test/sim/sharding.spec.ts`

OR, you can use the `txGenerator.ts` script as follows:

`ts-node test/sim/txGenerator 8545 'hello'`. The first argument is the port number of the EthereumJS client you which to submit the transaction to and the second is any data to include in the blob.

This script was adapted from the [interop repo blob script](https://github.com/Inphi/eip4844-interop/blob/master/blob_tx_generator/blob.js)


## EIP-4844 spec tests

To run the 4844 spec tests contained in `test/sim/sharding.spec.ts`, use the following command:
You don't need to externally start the nodes, the sim tests will do all that for you as well as run the tests against it.

Run Step 1 & 3 together:

`LODE_IMAGE=g11tech/lodestar:decoupled DATADIR=path/to/your/data/directory npm run tape --
test/sim/sharding.spec.ts`


### Run Step 1, 2 & 3 together


`EXTRA_CL_PARAMS="--params.CAPELLA_FORK_EPOCH 0 --params.DENEB_FORK_EPOCH 0" LODE_IMAGE=g11tech/lodestar:4844-ae177e DATADIR=/absolute/path/to/your/data/dir npm run tape -- test/sim/sharding.spec.ts`
`WITH_PEER=syncpeer LODE_IMAGE=g11tech/lodestar:decoupled DATADIR=path/to/your/data/directory npm run tape --
test/sim/sharding.spec.ts`

Note, these tests are adapted from the specification tests contained in the [EIP-4844 Interop repo](https://github.com/Inphi/eip4844-interop)

0 comments on commit d4f5223

Please sign in to comment.