decode actor address and revamt the dashboard

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
Jakub Sztandera 2019-12-11 01:53:18 +01:00
parent 032e59907b
commit 5f4127859e
No known key found for this signature in database
GPG Key ID: 9A9AF56F8B3879BA
2 changed files with 699 additions and 547 deletions

File diff suppressed because it is too large Load Diff

View File

@ -14,6 +14,7 @@ import (
"github.com/filecoin-project/lotus/chain/actors"
"github.com/filecoin-project/lotus/chain/address"
"github.com/filecoin-project/lotus/chain/types"
"github.com/multiformats/go-multihash"
_ "github.com/influxdata/influxdb1-client"
models "github.com/influxdata/influxdb1-client/models"
@ -215,7 +216,13 @@ func RecordTipsetMessagesPoints(ctx context.Context, api api.FullNode, pl *Point
}
p = NewPoint("chain.message_count", 1)
p.AddTag("actor", actor.Code.String())
dm, err := multihash.Decode(actor.Code.Hash())
if err != nil {
continue
}
p.AddTag("actor", string(dm.Digest))
p.AddTag("method", fmt.Sprintf("%d", msg.Message.Method))
p.AddTag("exitcode", fmt.Sprintf("%d", recp[i].ExitCode))
pl.AddPoint(p)