Skip to content

Metrics about claims are not available #571

@endersonmaia

Description

@endersonmaia

🙂 Expected behavior

When the rollups-node sends claims, we should have metrics about it from dispatcher and authority-claimer modules.

  • cartesi_rollups_dispatcher_claims_sent exposed and updated by the dispatcher when it feeds the claims `strea with the claim;
  • cartesi_rollups_authority_claimer_claims_sent exposed and updated by the authority-claimer when it sends the transaction claim to the blockchain.

🫠 Actual behavior

When I run the node with make docker-run and send some inputs, I see no *_claims_sent metrics on the /metrics endpoint.

🧪 Minimal test case

make docker-run
# send some inputs
go run cmd/cartesi-rollups-cli/main.go send --payload 0x$(printf "hello" | xxd -p)
go run cmd/cartesi-rollups-cli/main.go send --payload 0x$(printf "world" | xxd -p)
# wait for the epoch_length
# enter the node and check its `/metrics` endpoint
docker exec -ti rollups-node-node-1 /bin/bash
$ curl localhost:10000/metrics
# HELP cartesi_rollups_dispatcher_claims_sent Counts the number of claims sent.
# TYPE cartesi_rollups_dispatcher_claims_sent counter
# HELP cartesi_rollups_dispatcher_advance_inputs_sent Counts the number of <advance_input>s sent.
# TYPE cartesi_rollups_dispatcher_advance_inputs_sent counter
cartesi_rollups_dispatcher_advance_inputs_sent_total{chain_id="31337",dapp_address="7c54e3f7a8070a54223469965a871fb8f6f88c22"} 2
# HELP cartesi_rollups_dispatcher_finish_epochs_sent Counts the number of <finish_epoch>s sent.
# TYPE cartesi_rollups_dispatcher_finish_epochs_sent counter
cartesi_rollups_dispatcher_finish_epochs_sent_total{chain_id="31337",dapp_address="7c54e3f7a8070a54223469965a871fb8f6f88c22"} 2
# EOF

Checking redis streams, we can see the *:rollups-claims stream was created, thus I expected the _dispatcher_claims_sent to have some value.

# still inside the node
$ redis-cli -p 10011
127.0.0.1:10011> SCAN 0 TYPE stream
1) "0"
2) 1) "{chain-31337:dapp-7c54e3f7a8070a54223469965a871fb8f6f88c22}:rollups-outputs"
   2) "{chain-31337:dapp-7c54e3f7a8070a54223469965a871fb8f6f88c22}:rollups-inputs"
   3) "{chain-31337:dapp-7c54e3f7a8070a54223469965a871fb8f6f88c22}:rollups-claims"

If we connect directly to the authority-claimer port 10002:/metrics endpoint, the value is there.

# still inside the node
$ curl localhost:10002/metrics
# HELP cartesi_rollups_authority_claimer_claims_sent Counts the number of claims sent.
# TYPE cartesi_rollups_authority_claimer_claims_sent counter
cartesi_rollups_authority_claimer_claims_sent_total{chain_id="31337",dapp_address="7c54e3f7a8070a54223469965a871fb8f6f88c22"} 2
# EOF

🌎 Environment

I'm using cartesi/rollups-node:1.5.1-rc1.

✔️ Possible solutions

  • Make authority-claimer metrics appear at 10000:/metrics endpoint.
  • Make dispatcher feed the cartesi_rollups_dispatcher_claims_sent metric

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageTo be triaged

    Type

    No type

    Projects

    Status

    📋 Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions