-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add new task for fevm trace #1217
feat: add new task for fevm trace #1217
Conversation
tasks/fevm/vm/task.go
Outdated
ActorCode: toActorCode, | ||
Method: uint64(child.Message.Method), | ||
Index: child.Index, | ||
Params: base64.StdEncoding.EncodeToString(child.Message.Params), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Referring to the params value returned by lily chain getmessage
, we also encode params value in Base64.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the benefit to encode in base64?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the one of reasons for encoding params
into base64 is to ensure compatibility: Base64 encoding is a widely supported format, it is able to to mitigate risks across different operating systems and databases.
tasks/fevm/vm/task.go
Outdated
ActorCode: toActorCode, | ||
Method: uint64(child.Message.Method), | ||
Index: child.Index, | ||
Params: base64.StdEncoding.EncodeToString(child.Message.Params), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the benefit to encode in base64?
schemas/v1/26_fevm_traces.go
Outdated
message_state_root TEXT, | ||
transaction_hash TEXT, | ||
message_cid TEXT, | ||
trace_cid TEXT, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix indent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
tasks/fevm/trace/task.go
Outdated
@@ -0,0 +1,199 @@ | |||
package fevmvm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
package name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
tasks/fevm/trace/task.go
Outdated
tasks "github.com/filecoin-project/lily/tasks" | ||
) | ||
|
||
var log = logging.Logger("lily/tasks/fevmvm") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fevmvm?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
tasks/fevm/trace/task.go
Outdated
Params: base64.StdEncoding.EncodeToString(child.Message.Params), | ||
Returns: base64.StdEncoding.EncodeToString(child.Receipt.Return), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe use EthBytes
to be consistent with eth?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed
tasks/fevm/trace/task.go
Outdated
GasUsed: 0, | ||
ExitCode: int64(child.Receipt.ExitCode), | ||
ActorCode: toActorCode, | ||
Method: uint64(child.Message.Method), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try to store readable method name
tasks/fevm/trace/task.go
Outdated
FromEthAddress: fromEthAddress, | ||
ToEthAddress: toEthAddress, | ||
Value: child.Message.Value.String(), | ||
GasUsed: 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove gas_used
1b35296
to
33e7571
Compare
No description provided.