https://github.com/cowprotocol/cow-tendermint-poc
A proof-of concept multi-proposer tendermint implementation for the CoW Protocol auction
https://github.com/cowprotocol/cow-tendermint-poc
Last synced: about 1 year ago
JSON representation
A proof-of concept multi-proposer tendermint implementation for the CoW Protocol auction
- Host: GitHub
- URL: https://github.com/cowprotocol/cow-tendermint-poc
- Owner: cowprotocol
- Created: 2025-03-09T18:02:33.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-10T07:10:10.000Z (about 1 year ago)
- Last Synced: 2025-04-10T08:23:24.692Z (about 1 year ago)
- Language: TypeScript
- Size: 307 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CoW Tendermint
A multi-proposer tendermint implementation for the CoW Protocol auction.
## Setup
1. Run the devcontainer (or `npm ci && cp env.example .env` locally)
2. Either export an existing private key or generate a new random one with
```bash
export PK=$(hexdump -vn32 -e'"0x" 8/4 "%08x" 1 "\n"' /dev/urandom)
```
3. Make sure that the address with which you are signing is added to the validator/solver registry (cf. `.env` file for addresses). The address (public key) is printed each time you start the node.
## Running
There are two types of nodes, validators and solvers. Make sure your signing key is registered accordingly in the relevant registry (cf. above)
You can run either mode by specifying:
```bash
npm run
```
If neither is specified, the client will run in both modes.
## Peer Discovery
The node will periodically print its peer count. Make sure you are connected to sufficient peers in order to ensure particpation in consensus.
### Discovering Peers
The node will automatically find peers on a local network. To connect to a remote peer you can pass their multiaddress in as a command-line argument like:
```bash
npm run validator /ip4//tcp//wss/p2p/
```
To connect to a client running as a github devcontainer, you can use their container's DNS like:
```
npm run solver /dns4//tcp/443/wss/p2p/
```
### Getting Discovered
In order to be discovered by other nodes over the internet, make sure you are announcing your publicly visible IP address (not the IP address on your local network). You can specify your IP address using the `MULTIADDRESS` environment variable.
E.g. to make a devcontainer discoverable, you can add the following line to your env file:
```
MULTIADDRESS=/dns4/--.app.github.dev/tcp/443/wss
```
> [!NOTE]
> Ensure, that the port's visibility is set to public.
> 
### Debugging
To configure custom log sensititvity, you can specify a log filter like:
```
LOG_FILTER=info,libp2p=trace,consensus=debug
```
To access lower level logs of the external libp2p library, also set
```
DEBUG=libp2p*
```