mirror of
				https://github.com/grassrootseconomics/eth-tracker.git
				synced 2025-11-03 18:11:53 +01:00 
			
		
		
		
	docs: update README
This commit is contained in:
		
							parent
							
								
									2283190147
								
							
						
					
					
						commit
						eee3757895
					
				
							
								
								
									
										53
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										53
									
								
								README.md
									
									
									
									
									
								
							@ -2,35 +2,45 @@
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
A fast and lightweight tracker designed to monitor EVM blockchains for live and historical transaction events, including reverted transactions. It filters these events and publishes them to NATS for further processing.
 | 
			
		||||
A fast and lightweight tracker designed to monitor EVM blockchains for live and
 | 
			
		||||
historical transaction events, including reverted transactions. It filters these
 | 
			
		||||
events and publishes them to NATS for further processing.
 | 
			
		||||
 | 
			
		||||
It applies deduplication at the NATS level, making it safe to run in a distributed fashion.
 | 
			
		||||
It applies deduplication at the NATS level, making it safe to run in a
 | 
			
		||||
distributed fashion.
 | 
			
		||||
 | 
			
		||||
Note: To run it against an L2/EVM chain, you will need to manually add a replace directive in the `go.mod` file pointing to the EVM chain's `*geth` compatible source code. This will allow the tracker to process transaction types other than Ethereum's `0x0, 0x1 and 0x2`.
 | 
			
		||||
Note: To run it against an L2/EVM chain, you will need to manually add a replace
 | 
			
		||||
directive in the `go.mod` file pointing to the EVM chain's `*geth` compatible
 | 
			
		||||
source code. This will allow the tracker to process transaction types other than
 | 
			
		||||
Ethereum's `0x0, 0x1 and 0x2`.
 | 
			
		||||
 | 
			
		||||
### CEL2
 | 
			
		||||
 | 
			
		||||
We maintain a CEL2 compatible tracker (source and container image) on the `cel2` branch.
 | 
			
		||||
We maintain a CEL2 compatible tracker (source and container image) on the `cel2`
 | 
			
		||||
branch.
 | 
			
		||||
 | 
			
		||||
## Getting Started
 | 
			
		||||
 | 
			
		||||
A `Makefile` is also provided to build the required binaries to run eth-tracker.
 | 
			
		||||
 | 
			
		||||
### Bootstrap Cache
 | 
			
		||||
### Cache Bootstrap
 | 
			
		||||
 | 
			
		||||
An optional binary, `eth-tracker-cache-bootstrap`, is included to build the Redis cache with all relevant Grassroots Economics smart contract and user addresses to allow filtering on very busy smart contracts e.g. cUSD.
 | 
			
		||||
During startup `eth-tracker` will always build the cache with all relevant
 | 
			
		||||
Grassroots Economics smart contract and user addresses to allow filtering on
 | 
			
		||||
very busy smart contracts e.g. cUSD.
 | 
			
		||||
 | 
			
		||||
The cache will auto-update based on any additions/removals from all indexes.
 | 
			
		||||
 | 
			
		||||
### Prerequisites
 | 
			
		||||
 | 
			
		||||
* Git
 | 
			
		||||
* Docker
 | 
			
		||||
* NATS server
 | 
			
		||||
* Redis server
 | 
			
		||||
* Access to a Celo RPC node
 | 
			
		||||
- Git
 | 
			
		||||
- Docker
 | 
			
		||||
- NATS server
 | 
			
		||||
- Redis server (Optional)
 | 
			
		||||
- Access to a Celo RPC node
 | 
			
		||||
 | 
			
		||||
See [docker-compose.yaml](dev/docker-compose.yaml) for an example on how to run and deploy a single instance.
 | 
			
		||||
See [docker-compose.yaml](dev/docker-compose.yaml) for an example on how to run
 | 
			
		||||
and deploy a single instance.
 | 
			
		||||
 | 
			
		||||
### 1. Build the Docker image
 | 
			
		||||
 | 
			
		||||
@ -48,9 +58,12 @@ docker images
 | 
			
		||||
### 2. Run NATS and Redis
 | 
			
		||||
 | 
			
		||||
For an example, see `dev/docker-compose.yaml`.
 | 
			
		||||
 | 
			
		||||
### 3. Update config values
 | 
			
		||||
 | 
			
		||||
See `.env.example` on how to override default values defined in `config.toml` using env variables. Alternatively, mount your own config.toml either during build time or Docker runtime.
 | 
			
		||||
See `.env.example` on how to override default values defined in `config.toml`
 | 
			
		||||
using env variables. Alternatively, mount your own config.toml either during
 | 
			
		||||
build time or Docker runtime.
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
# Override only specific config values
 | 
			
		||||
@ -58,8 +71,8 @@ nano .env.example
 | 
			
		||||
mv .env.example .env
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Refer to [`config.toml`](config.toml) to understand different config value settings.
 | 
			
		||||
 | 
			
		||||
Refer to [`config.toml`](config.toml) to understand different config value
 | 
			
		||||
settings.
 | 
			
		||||
 | 
			
		||||
### 4. Run the tracker
 | 
			
		||||
 | 
			
		||||
@ -86,7 +99,8 @@ docker compose up
 | 
			
		||||
 | 
			
		||||
### Monitoring with NATS CLI
 | 
			
		||||
 | 
			
		||||
Install NATS CLI from [here](https://github.com/nats-io/natscli?tab=readme-ov-file#installation).
 | 
			
		||||
Install NATS CLI from
 | 
			
		||||
[here](https://github.com/nats-io/natscli?tab=readme-ov-file#installation).
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
nats subscribe "TRACKER.*"
 | 
			
		||||
@ -94,8 +108,11 @@ nats subscribe "TRACKER.*"
 | 
			
		||||
 | 
			
		||||
### DB File
 | 
			
		||||
 | 
			
		||||
A `tracker_db` file is created on the first run. This keeps track of all blocks missed by the processor to attempt a retry later on. This file should not be deleted if you want to maintain resume support for historical tracking across restarts.
 | 
			
		||||
A `tracker_db` file is created on the first run. This keeps track of all blocks
 | 
			
		||||
missed by the processor to attempt a retry later on. This file should not be
 | 
			
		||||
deleted if you want to maintain resume support for historical tracking across
 | 
			
		||||
restarts.
 | 
			
		||||
 | 
			
		||||
## License
 | 
			
		||||
 | 
			
		||||
[AGPL-3.0](LICENSE).
 | 
			
		||||
[AGPL-3.0](LICENSE).
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user