Skip to content

Commit

Permalink
change the params and returns type
Browse files Browse the repository at this point in the history
  • Loading branch information
Terry authored and Terry committed Jun 5, 2023
1 parent 0f3bc2b commit 1b35296
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions model/fevm/trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ type FEVMTrace struct {
ExitCode int64 `pg:",notnull,use_zero"`
// GasUsed by message.
GasUsed int64 `pg:",notnull,use_zero"`
// Params contained in message encode in base64.
// Params contained in message encode in eth bytes.
Params string `pg:",notnull"`
// Returns value of message receipt encode in base64.
// Returns value of message receipt encode in eth bytes.
Returns string `pg:",notnull"`
// Index indicating the order of the messages execution.
Index uint64 `pg:",notnull,use_zero"`
Expand Down
10 changes: 5 additions & 5 deletions schemas/v1/26_fevm_traces.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ func init() {
message_state_root TEXT,
transaction_hash TEXT,
message_cid TEXT,
trace_cid TEXT,
trace_cid TEXT,
"from" TEXT,
"to" TEXT,
from_eth_address TEXT,
Expand All @@ -20,11 +20,11 @@ func init() {
exit_code BIGINT,
gas_used BIGINT,
params TEXT,
returns TEXT,
index BIGINT,
returns TEXT,
index BIGINT,
parsed_params JSONB,
parsed_returns JSONB,
PRIMARY KEY(height, message_state_root, trace_cid, message_cid)
parsed_returns JSONB,
PRIMARY KEY(height, message_state_root, trace_cid, message_cid)
);
CREATE INDEX IF NOT EXISTS fevm_traces_height_idx ON {{ .SchemaName | default "public"}}.fevm_traces USING BTREE (height);
CREATE INDEX IF NOT EXISTS fevm_traces_from_idx ON {{ .SchemaName | default "public"}}.fevm_traces USING HASH ("from");
Expand Down
8 changes: 4 additions & 4 deletions tasks/fevm/trace/task.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package fevmvm
package fevmtrace

import (
"context"
Expand All @@ -24,7 +24,7 @@ import (
tasks "github.com/filecoin-project/lily/tasks"
)

var log = logging.Logger("lily/tasks/fevmvm")
var log = logging.Logger("lily/tasks/fevmtrace")

type Task struct {
node tasks.DataSource
Expand Down Expand Up @@ -165,8 +165,8 @@ func (t *Task) ProcessTipSets(ctx context.Context, current *types.TipSet, execut
ActorCode: toActorCode,
Method: uint64(child.Message.Method),
Index: child.Index,
Params: base64.StdEncoding.EncodeToString(child.Message.Params),
Returns: base64.StdEncoding.EncodeToString(child.Receipt.Return),
Params: ethtypes.EthBytes(child.Message.Params).String(),
Returns: ethtypes.EthBytes(child.Receipt.Return).String(),
}

// only parse params and return of successful messages since unsuccessful messages don't return a parseable value.
Expand Down

0 comments on commit 1b35296

Please sign in to comment.