Skip to content

lovenoble/zbc-ethermint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 


📒 Read documentation | 💛 Community support


Ethermint

Ethermint is a scalable and interoperable Ethereum library, built on Proof-of-Stake with fast-finality using the Cosmos SDK which runs on top of CometBFT consensus engine.

About

For now Ethermint is using go-ethereum v1.13.5, with fhEVM support.

Run the Ethermint node in the debugger

If you want to go deeper in the code and need to add some breakpoints, follow this tutorial to build from sources and activate the debugger in vscode.

How to run local node using codebase

Running a node locally currently requires building several different components. From a common parent folder, run the following commands:

fhevm-tfhe-cli

git clone https://github.com/zama-ai/fhevm-tfhe-cli
cd fhevm-tfhe-cli

# for x86 CPUs
cargo build --features tfhe/x86_64-unix --release

# for ARM64
cargo build --features tfhe/aarch64-unix --release

sudo cp ./target/release/fhevm-tfhe-cli /usr/local/bin/

fhevm-go

git clone https://github.com/Inco-fhevm/fhevm-go
cd fhevm-go
git submodule update --init --recursive
make build

zbc-go-etherum

git clone https://github.com/Inco-fhevm/zbc-go-ethereum

zbc-ethermint

git clone https://github.com/Inco-fhevm/zbc-ethermint
cd zbc-ethermint
make build-local
sudo cp ./build/incod /usr/local/bin/
./setup.sh
fhevm-tfhe-cli generate-keys -d ~/.incod/keys/network-fhe-keys
cp ./node_config.toml ~/.incod/config
./start.sh

How to run using docker images from registry

Ensure LOCAL_BUILD is set to false in .env.

To initalize and run the node:

make init-ethermint-node
make run-ethermint
# make stop-ethermint
# make clean

To run directly e2e test:

make e2e-test

How to run using docker locally

Run the following command to create the image ethermintnodelocal.

make build-local-docker

Init the node (configuration files)

make init-ethermint-node-local

This will create every needed files under running_node/node1/.ethermintd.

running_node/node1/.ethermintd/
.
├── config
│   ├── app.toml
│   ├── client.toml
│   ├── config.toml
│   ├── genesis.json
│   ├── gentx
│   │   └── gentx-bdaef3bad17f4da9489d90c139a3466145ca6f9d.json
│   ├── node_key.json
│   └── priv_validator_key.json
├── data
│   └── priv_validator_state.json
├── keyring-test
│   ├── ec41480801211af6f2aa0c1f2703b688bf460ef8.address
│   └── orchestrator.info
└── zama
    ├── config
    └── keys
        ├── kms-fhe-keys
        └── network-fhe-keys

Run/stop the node

make run-ethermint
make stop-ethermint

Get the logs

docker logs ethermintnodelocal0 -f

Give Alice (first account in fhevm test) some coins:

docker exec -i ethermintnodelocal0 faucet 0xa5e1defb98EFe38EBb2D958CEe052410247F4c80
# bob
docker exec -i ethermintnodelocal0 faucet 0xfCefe53c7012a075b8a711df391100d9c431c468

Need support?

License

This software is distributed under the LGPLv3. If you have any questions, please contact us at hello@zama.ai.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published