Skip to content
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(exec): dump intermediate cache blocks from FVM exec in StateReplay #12822

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
feat(exec): dump intermediate cache blocks from FVM exec in StateReplay
* Plumb through dump_cache from fvm4 to access intermediate blocks:
  - filecoin-project/filecoin-ffi#512
  - filecoin-project/ref-fvm#2101
* Enable cache dumping in StateReplay with LOTUS_REPLAY_DUMP_CACHED_BLOCKS
* Add optional "Blocks" field InvocResult
* Handle ExecutionEvent::Log's and add "Logs" field to ExecutionTrace
* Dump intermediate cache blocks to CAR in /tmp when they appear while using
  `lotus-shed msg --exec-trace`.
rvagg committed Jan 11, 2025
commit 369d5be6c513d42619efa4bba4ad8f22beb0c521
6 changes: 6 additions & 0 deletions api/api_full.go
Original file line number Diff line number Diff line change
@@ -1262,6 +1262,12 @@ type InvocResult struct {
ExecutionTrace types.ExecutionTrace
Error string
Duration time.Duration
CachedBlocks []Block `json:",omitempty"`
}

type Block struct {
Cid cid.Cid
Data []byte
}

type IpldObject struct {
129 changes: 123 additions & 6 deletions build/openrpc/full.json
Original file line number Diff line number Diff line change
@@ -17487,16 +17487,49 @@
"tt": 60000000000
}
],
"Subcalls": null
"Subcalls": null,
"Logs": [
"string value"
]
}
],
"Logs": [
"string value"
]
},
"Error": "string value",
"Duration": 60000000000
"Duration": 60000000000,
"CachedBlocks": [
{
"Cid": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Data": "Ynl0ZSBhcnJheQ=="
}
]
}
],
"additionalProperties": false,
"properties": {
"CachedBlocks": {
"items": {
"additionalProperties": false,
"properties": {
"Cid": {
"title": "Content Identifier",
"type": "string"
},
"Data": {
"media": {
"binaryEncoding": "base64"
},
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"Duration": {
"title": "number",
"type": "number"
@@ -17571,6 +17604,12 @@
},
"type": "object"
},
"Logs": {
"items": {
"type": "string"
},
"type": "array"
},
"Msg": {
"additionalProperties": false,
"properties": {
@@ -18182,12 +18221,26 @@
"tt": 60000000000
}
],
"Subcalls": null
"Subcalls": null,
"Logs": [
"string value"
]
}
],
"Logs": [
"string value"
]
},
"Error": "string value",
"Duration": 60000000000
"Duration": 60000000000,
"CachedBlocks": [
{
"Cid": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Data": "Ynl0ZSBhcnJheQ=="
}
]
}
]
}
@@ -18202,6 +18255,25 @@
"items": {
"additionalProperties": false,
"properties": {
"CachedBlocks": {
"items": {
"additionalProperties": false,
"properties": {
"Cid": {
"title": "Content Identifier",
"type": "string"
},
"Data": {
"media": {
"binaryEncoding": "base64"
},
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"Duration": {
"title": "number",
"type": "number"
@@ -18276,6 +18348,12 @@
},
"type": "object"
},
"Logs": {
"items": {
"type": "string"
},
"type": "array"
},
"Msg": {
"additionalProperties": false,
"properties": {
@@ -23541,16 +23619,49 @@
"tt": 60000000000
}
],
"Subcalls": null
"Subcalls": null,
"Logs": [
"string value"
]
}
],
"Logs": [
"string value"
]
},
"Error": "string value",
"Duration": 60000000000
"Duration": 60000000000,
"CachedBlocks": [
{
"Cid": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Data": "Ynl0ZSBhcnJheQ=="
}
]
}
],
"additionalProperties": false,
"properties": {
"CachedBlocks": {
"items": {
"additionalProperties": false,
"properties": {
"Cid": {
"title": "Content Identifier",
"type": "string"
},
"Data": {
"media": {
"binaryEncoding": "base64"
},
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"Duration": {
"title": "number",
"type": "number"
@@ -23625,6 +23736,12 @@
},
"type": "object"
},
"Logs": {
"items": {
"type": "string"
},
"type": "array"
},
"Msg": {
"additionalProperties": false,
"properties": {
86 changes: 82 additions & 4 deletions build/openrpc/gateway.json
Original file line number Diff line number Diff line change
@@ -8386,16 +8386,49 @@
"tt": 60000000000
}
],
"Subcalls": null
"Subcalls": null,
"Logs": [
"string value"
]
}
],
"Logs": [
"string value"
]
},
"Error": "string value",
"Duration": 60000000000
"Duration": 60000000000,
"CachedBlocks": [
{
"Cid": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Data": "Ynl0ZSBhcnJheQ=="
}
]
}
],
"additionalProperties": false,
"properties": {
"CachedBlocks": {
"items": {
"additionalProperties": false,
"properties": {
"Cid": {
"title": "Content Identifier",
"type": "string"
},
"Data": {
"media": {
"binaryEncoding": "base64"
},
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"Duration": {
"title": "number",
"type": "number"
@@ -8470,6 +8503,12 @@
},
"type": "object"
},
"Logs": {
"items": {
"type": "string"
},
"type": "array"
},
"Msg": {
"additionalProperties": false,
"properties": {
@@ -10872,16 +10911,49 @@
"tt": 60000000000
}
],
"Subcalls": null
"Subcalls": null,
"Logs": [
"string value"
]
}
],
"Logs": [
"string value"
]
},
"Error": "string value",
"Duration": 60000000000
"Duration": 60000000000,
"CachedBlocks": [
{
"Cid": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Data": "Ynl0ZSBhcnJheQ=="
}
]
}
],
"additionalProperties": false,
"properties": {
"CachedBlocks": {
"items": {
"additionalProperties": false,
"properties": {
"Cid": {
"title": "Content Identifier",
"type": "string"
},
"Data": {
"media": {
"binaryEncoding": "base64"
},
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"Duration": {
"title": "number",
"type": "number"
@@ -10956,6 +11028,12 @@
},
"type": "object"
},
"Logs": {
"items": {
"type": "string"
},
"type": "array"
},
"Msg": {
"additionalProperties": false,
"properties": {
Loading