Skip to content

Delayed Balance Substraction on Cross-shard Transactions #919

@pichaoqkc

Description

@pichaoqkc

The Prometheus server was supposed to count the balance of each shard when the cross-shard transaction happens (#918), but the result sometimes gets wrong.

In this case, shard 0 transferred balances to each other shards(1 ~ 7), the curve of the total balance is supposed to be smooth but not.
image
Transactions happened at time 13:27:45, we can notice a total balance increase, which shouldn’t be there. When we dived deep into the change of each shard, we found that the balance of shard 1~7 increased as expected at time 13:27:45.
image
But the balance of shard 0 began to decrease till 13:31:45:
image

Normally, the counting script would observe the decrease of sender first and then the increase of receiver:
image
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions