FuelSequencer is a blockchain built using Cosmos SDK and CometBFT and created with Ignite CLI.
Dependencies:
- buf (only if updating proto files)
- https://docs.buf.build/installation
- Preferred version:
1.28.1
- ignite-cli
- https://github.com/ignite/cli
- Preferred version:
v28.2.0
- proto-builder
- https://ghcr.io/cosmos/proto-builder
- Preferred version:
0.14.0
- go
- https://go.dev/doc/install
- Preferred version:
1.22
To run the Sequencer, Sidecar, and an Ethereum node:
make install run-eth-e2e-containers run-sequencer # terminal 1
make run-sidecar # terminal 2
make clean # once you're doneTo run just the Sidecar and an Ethereum node:
make install run-eth-e2e-containers run-sidecar
make clean # once you're doneTo generate keys for executing transactions:
make keysYour blockchain in development can be configured with config.yml. To learn more, see the Ignite CLI docs.
Build binary for various architectures:
make build-with-checksumVerify checksum:
cd build && sha256sum -c sha256sum.txtTo get an indication as to which binary to run:
echo "$(uname -s)-$(uname -m)"make lintDependencies:
make proto-formatDependencies:
make proto-swagger-genDependencies:
make build-docker-imageThe first time you run the docker container you should run it using:
# with Sidecar
make run-docker-container \
ETH_RPC_URL="http://example:8545" \
ETH_WS_URL="ws://example:8545"
# without Sidecar
make run-docker-container \
ETH_RPC_URL="http://example:8545" \
ETH_WS_URL="ws://example:8545" \
COMMAND="fuelsequencerd start"Note that the Ethereum node URLs need to be set explicitly since it does not make sense to default to
localhostin the scope of a Docker container. If your Ethereum node is running onlocalhostyou will need to specify your host's IP as the Ethereum address. If that does not work, you might need to reconfigure your host firewall to allow Docker to connect on 8545.
The command above will do the following:
- Create the docker container.
- Map the chain data located at
./data/fuelsequencerby default using docker volumes. - Give a name to the container.
- Expose the necessary ports.
- Start the container.
If you want to pass an alternative data folder you should run the make command as follows:
make run-docker-container \
ETH_RPC_URL="http://example:8545" \
ETH_WS_URL="ws://example:8545" \
DATA_FOLDER="/path/to/folder/with/config/data/and/keyring-test"After creating and running the docker container for the first time, you should manage the container as follows:
# To stop the container
make stop-docker-container# To restart the container
make start-docker-container# Run make stop-docker-image first if the container has not been stopped yet.
make stop-docker-container
# To remove the container.
make remove-docker-containerNOTE: Re-running the container using make run-docker-container will fail because docker will find an existing
container with the same name during the creation process.
To follow the container's logs run the following command:
make follow-docker-logs- https://github.com/Stride-Labs/stride/blob/main/.dockerignore
- https://github.com/Stride-Labs/stride/blob/main/dockernet/start_network.sh
- https://github.com/osmosis-labs/osmosis/blob/3eccca25dd40ec45c0a295f079fb21da66eeeb6a/Dockerfile
- https://github.com/osmosis-labs/osmosis/blob/3eccca25dd40ec45c0a295f079fb21da66eeeb6a/scripts/makefiles/docker.mk
- https://github.com/osmosis-labs/osmosis/blob/main/scripts/makefiles/docker.mk
make mocksmake test-unitYou will need a Sequencer image and Ethereum deployment image:
Ensure e2e/fuel-rollup/.npmrc file is set up before running this!
It should contain//registry.npmjs.org/:_authToken=<NPM_TOKEN>.
<NPM_TOKEN>is an access token to be obtained from your NPM account.
make build-all-docker-imagesThen you can run E2E tests:
make test-e2eMost likely this occurs due to permission issues on Linux and the solution is simply to run the following inside the project's root directory:
chmod -R 777 ./