Note: The current BRP-Refiner stable version is 0.5.7. For the latest updates or additional details, please check the announcements or discussions in Discord.
git clone https://github.com/covalenthq/refiner
cd refiner
Note:.envrc.local overrides any env vars set with .envrc on calling direnv allow
Note: When passing the private key into the env vars as above please remove the 0x prefix so the private key env var has exactly 64 characters.
BLOCK_RESULT_OPERATOR_PRIVATE_KEY: Your personal Block Result Producer (BRP) operator private key
AGENT_KEY & PROOF.OUT File: Your personal web3.storage Agent key & Delegation file use by the ipfs-pinner service
IPFS_PINNER_URL: Service (ipfs-pinner) used by rudder to access IPFS assets like Block Specimens (service is automatically invoked and run with the in repo docker compose files eg: docker-compose-mbeam.yml)
EVM_SERVER_URL: Service (evm-server) used by rudder for stateless execution of Block Specimens into indexable (queryable) Block Results
Start Services
Load env vars into the shell
direnv allow .
# make sure you see these being loaded
direnv: loading ~/refiner/.envrc
direnv: loading ~/refiner/.envrc.local
direnv: export +BLOCK_RESULT_OPERATOR_PRIVATE_KEY +EVM_SERVER_URL +IPFS_PINNER_URL +NODE_ETHEREUM_MAINNET +W3_AGENT_KEY +W3_DELEGATION_FILE
Start all 4 services in the background
docker compose -f "docker-compose-mbeam.yml" up -d --remove-orphans
# log
[+] Running 4/4
⠿ Container refiner Started 3.2s
⠿ Container autoheal Started 0.5s
⠿ Container das-pinner Started 1.9s
⠿ Container evm-server Started 1.8s
Monitor the logs for Block Result submissions
successful Refiner stack run log output with performance metrics
docker compose -f "docker-compose-mbeam.yml" logs -f –tail 2
# exmple log
refiner | [info] curr_block: 9629891 and latest_block_num:9629892
refiner | [info] listening for events at 9629891
refiner | [info] found 0 bsps to process
refiner | [info] curr_block: 9629892 and latest_block_num:9629892
refiner | [info] listening for events at 9629892
refiner | [info] found 0 bsps to process
refiner | [info] synced to latest; waiting for 9629893 to be mined
ewm-das | 2025-02-15T10:12:49.324Z INFO das-pinner ipfs-node/w3storage.go:121 w3 up output: {"root":{"/":"bafyreiel3xugx5rws2dwpuume5mrgank4s4rkk7aitqlf3pkqvufkqid3u"}}
ewm-das | 2025-02-15T10:12:49.325Z INFO das-pinner api/handlers.go:79 Data upload successfully with CID: bafyreiel3xugx5rws2dwpuume5mrgank4s4rkk7aitqlf3pkqvufkqid3u
refiner | [info] Counter for ipfs_metrics - [pin: 6]
refiner | [info] LastValue for ipfs_metrics - [pin_last_exec_time: 0.012145]
refiner | [info] 21850640:32f199a96b3d2f43523f7e4cc98c9b3e5d1fd27dd8bd14fff1e1d83b5d3df6f8 has been successfully uploaded at ipfs://bafyreiel3xugx5rws2dwpuume5mrgank4s4rkk7aitqlf3pkqvufkqid3u
refiner | [info] 21850640:32f199a96b3d2f43523f7e4cc98c9b3e5d1fd27dd8bd14fff1e1d83b5d3df6f8 proof submitting
refiner | [info] Counter for brp_metrics - [proof: 6]
refiner | [info] LastValue for brp_metrics - [proof_last_exec_time: 3.0199999999999997e-4]
refiner | [info] 21850640 txid is 0x8553c5d04eccffe79481c4b773eee1bd2436578154973b82b5b8f8a1374983fe
refiner | [info] Counter for brp_metrics - [upload_success: 6]
refiner | [info] LastValue for brp_metrics - [upload_success_last_exec_time: 0.012466999999999999]
refiner | [info] Counter for refiner_metrics - [pipeline_success: 6]
refiner | [info] LastValue for refiner_metrics - [pipeline_success_last_exec_time: 0.014299]