Skip to content

Commit e58dbad

Browse files
committed
chore: add Logs and IpldOps to ExecutionTrace
1 parent 604c7b6 commit e58dbad

File tree

7 files changed

+442
-14
lines changed

7 files changed

+442
-14
lines changed

venus-devtool/api-gen/example.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,12 @@ func init() {
395395
},
396396
Input: ecchain,
397397
})
398+
addExample(types.IpldOpGet)
399+
addExample(&types.TraceIpld{
400+
Op: types.IpldOpGet,
401+
Cid: c,
402+
Size: 123,
403+
})
398404
}
399405

400406
func ExampleValue(method string, t, parent reflect.Type) interface{} {

venus-devtool/cborgen/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ func main() {
6060
types.ActorTrace{},
6161
types.MessageTrace{},
6262
types.ReturnTrace{},
63+
types.TraceIpld{},
6364
types.ExecutionTrace{},
6465
types.F3ParticipationLease{},
6566
},

venus-shared/api/chain/v0/method.md

Lines changed: 75 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1403,7 +1403,31 @@ Response:
14031403
"tt": 60000000000
14041404
}
14051405
],
1406-
"Subcalls": null
1406+
"Subcalls": null,
1407+
"Logs": [
1408+
"string value"
1409+
],
1410+
"IpldOps": [
1411+
{
1412+
"Op": "Get",
1413+
"Cid": {
1414+
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
1415+
},
1416+
"Size": 42
1417+
}
1418+
]
1419+
}
1420+
],
1421+
"Logs": [
1422+
"string value"
1423+
],
1424+
"IpldOps": [
1425+
{
1426+
"Op": "Get",
1427+
"Cid": {
1428+
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
1429+
},
1430+
"Size": 42
14071431
}
14081432
]
14091433
},
@@ -1606,7 +1630,31 @@ Response:
16061630
"tt": 60000000000
16071631
}
16081632
],
1609-
"Subcalls": null
1633+
"Subcalls": null,
1634+
"Logs": [
1635+
"string value"
1636+
],
1637+
"IpldOps": [
1638+
{
1639+
"Op": "Get",
1640+
"Cid": {
1641+
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
1642+
},
1643+
"Size": 42
1644+
}
1645+
]
1646+
}
1647+
],
1648+
"Logs": [
1649+
"string value"
1650+
],
1651+
"IpldOps": [
1652+
{
1653+
"Op": "Get",
1654+
"Cid": {
1655+
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
1656+
},
1657+
"Size": 42
16101658
}
16111659
]
16121660
},
@@ -1929,7 +1977,31 @@ Response:
19291977
"tt": 60000000000
19301978
}
19311979
],
1932-
"Subcalls": null
1980+
"Subcalls": null,
1981+
"Logs": [
1982+
"string value"
1983+
],
1984+
"IpldOps": [
1985+
{
1986+
"Op": "Get",
1987+
"Cid": {
1988+
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
1989+
},
1990+
"Size": 42
1991+
}
1992+
]
1993+
}
1994+
],
1995+
"Logs": [
1996+
"string value"
1997+
],
1998+
"IpldOps": [
1999+
{
2000+
"Op": "Get",
2001+
"Cid": {
2002+
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
2003+
},
2004+
"Size": 42
19332005
}
19342006
]
19352007
},

venus-shared/api/chain/v1/method.md

Lines changed: 75 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1597,7 +1597,31 @@ Response:
15971597
"tt": 60000000000
15981598
}
15991599
],
1600-
"Subcalls": null
1600+
"Subcalls": null,
1601+
"Logs": [
1602+
"string value"
1603+
],
1604+
"IpldOps": [
1605+
{
1606+
"Op": "Get",
1607+
"Cid": {
1608+
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
1609+
},
1610+
"Size": 42
1611+
}
1612+
]
1613+
}
1614+
],
1615+
"Logs": [
1616+
"string value"
1617+
],
1618+
"IpldOps": [
1619+
{
1620+
"Op": "Get",
1621+
"Cid": {
1622+
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
1623+
},
1624+
"Size": 42
16011625
}
16021626
]
16031627
},
@@ -1800,7 +1824,31 @@ Response:
18001824
"tt": 60000000000
18011825
}
18021826
],
1803-
"Subcalls": null
1827+
"Subcalls": null,
1828+
"Logs": [
1829+
"string value"
1830+
],
1831+
"IpldOps": [
1832+
{
1833+
"Op": "Get",
1834+
"Cid": {
1835+
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
1836+
},
1837+
"Size": 42
1838+
}
1839+
]
1840+
}
1841+
],
1842+
"Logs": [
1843+
"string value"
1844+
],
1845+
"IpldOps": [
1846+
{
1847+
"Op": "Get",
1848+
"Cid": {
1849+
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
1850+
},
1851+
"Size": 42
18041852
}
18051853
]
18061854
},
@@ -2182,7 +2230,31 @@ Response:
21822230
"tt": 60000000000
21832231
}
21842232
],
2185-
"Subcalls": null
2233+
"Subcalls": null,
2234+
"Logs": [
2235+
"string value"
2236+
],
2237+
"IpldOps": [
2238+
{
2239+
"Op": "Get",
2240+
"Cid": {
2241+
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
2242+
},
2243+
"Size": 42
2244+
}
2245+
]
2246+
}
2247+
],
2248+
"Logs": [
2249+
"string value"
2250+
],
2251+
"IpldOps": [
2252+
{
2253+
"Op": "Get",
2254+
"Cid": {
2255+
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
2256+
},
2257+
"Size": 42
21862258
}
21872259
]
21882260
},

venus-shared/compatible-checks/api-diff.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,12 @@ github.com/filecoin-project/venus/venus-shared/api/chain/v0.FullNode <> github.c
6363
+ SetConcurrent
6464
+ SetPassword
6565
- Shutdown
66-
> StateCall {[func(context.Context, *types.Message, types.TipSetKey) (*types.InvocResult, error) <> func(context.Context, *types.Message, types.TipSetKey) (*api.InvocResult, error)] base=func out type: #0 input; nested={[*types.InvocResult <> *api.InvocResult] base=pointed type; nested={[types.InvocResult <> api.InvocResult] base=struct field; nested={[types.InvocResult <> api.InvocResult] base=exported field type: #4 field named ExecutionTrace; nested={[types.ExecutionTrace <> types.ExecutionTrace] base=struct field; nested={[types.ExecutionTrace <> types.ExecutionTrace] base=exported fields count: 5 != 7; nested=nil}}}}}}
67-
> StateCompute {[func(context.Context, abi.ChainEpoch, []*types.Message, types.TipSetKey) (*types.ComputeStateOutput, error) <> func(context.Context, abi.ChainEpoch, []*types.Message, types.TipSetKey) (*api.ComputeStateOutput, error)] base=func out type: #0 input; nested={[*types.ComputeStateOutput <> *api.ComputeStateOutput] base=pointed type; nested={[types.ComputeStateOutput <> api.ComputeStateOutput] base=struct field; nested={[types.ComputeStateOutput <> api.ComputeStateOutput] base=exported field type: #1 field named Trace; nested={[[]*types.InvocResult <> []*api.InvocResult] base=slice element; nested={[*types.InvocResult <> *api.InvocResult] base=pointed type; nested={[types.InvocResult <> api.InvocResult] base=struct field; nested={[types.InvocResult <> api.InvocResult] base=exported field type: #4 field named ExecutionTrace; nested={[types.ExecutionTrace <> types.ExecutionTrace] base=struct field; nested={[types.ExecutionTrace <> types.ExecutionTrace] base=exported fields count: 5 != 7; nested=nil}}}}}}}}}}
6866
- StateGetAllAllocations
6967
- StateGetAllClaims
7068
> StateGetNetworkParams {[func(context.Context) (*types.NetworkParams, error) <> func(context.Context) (*api.NetworkParams, error)] base=func out type: #0 input; nested={[*types.NetworkParams <> *api.NetworkParams] base=pointed type; nested={[types.NetworkParams <> api.NetworkParams] base=struct field; nested={[types.NetworkParams <> api.NetworkParams] base=exported field name: #3 field, SupportedProofTypes != PreCommitChallengeDelay; nested=nil}}}}
7169
+ StateMinerInitialPledgeForSector
7270
+ StateMinerSectorSize
7371
+ StateMinerWorkerAddress
74-
> StateReplay {[func(context.Context, types.TipSetKey, cid.Cid) (*types.InvocResult, error) <> func(context.Context, types.TipSetKey, cid.Cid) (*api.InvocResult, error)] base=func out type: #0 input; nested={[*types.InvocResult <> *api.InvocResult] base=pointed type; nested={[types.InvocResult <> api.InvocResult] base=struct field; nested={[types.InvocResult <> api.InvocResult] base=exported field type: #4 field named ExecutionTrace; nested={[types.ExecutionTrace <> types.ExecutionTrace] base=struct field; nested={[types.ExecutionTrace <> types.ExecutionTrace] base=exported fields count: 5 != 7; nested=nil}}}}}}
7572
- SyncCheckBad
7673
- SyncMarkBad
7774
- SyncUnmarkAllBad
@@ -170,12 +167,9 @@ github.com/filecoin-project/venus/venus-shared/api/chain/v1.FullNode <> github.c
170167
+ SetConcurrent
171168
+ SetPassword
172169
- Shutdown
173-
> StateCall {[func(context.Context, *types.Message, types.TipSetKey) (*types.InvocResult, error) <> func(context.Context, *types.Message, types.TipSetKey) (*api.InvocResult, error)] base=func out type: #0 input; nested={[*types.InvocResult <> *api.InvocResult] base=pointed type; nested={[types.InvocResult <> api.InvocResult] base=struct field; nested={[types.InvocResult <> api.InvocResult] base=exported field type: #4 field named ExecutionTrace; nested={[types.ExecutionTrace <> types.ExecutionTrace] base=struct field; nested={[types.ExecutionTrace <> types.ExecutionTrace] base=exported fields count: 5 != 7; nested=nil}}}}}}
174-
> StateCompute {[func(context.Context, abi.ChainEpoch, []*types.Message, types.TipSetKey) (*types.ComputeStateOutput, error) <> func(context.Context, abi.ChainEpoch, []*types.Message, types.TipSetKey) (*api.ComputeStateOutput, error)] base=func out type: #0 input; nested={[*types.ComputeStateOutput <> *api.ComputeStateOutput] base=pointed type; nested={[types.ComputeStateOutput <> api.ComputeStateOutput] base=struct field; nested={[types.ComputeStateOutput <> api.ComputeStateOutput] base=exported field type: #1 field named Trace; nested={[[]*types.InvocResult <> []*api.InvocResult] base=slice element; nested={[*types.InvocResult <> *api.InvocResult] base=pointed type; nested={[types.InvocResult <> api.InvocResult] base=struct field; nested={[types.InvocResult <> api.InvocResult] base=exported field type: #4 field named ExecutionTrace; nested={[types.ExecutionTrace <> types.ExecutionTrace] base=struct field; nested={[types.ExecutionTrace <> types.ExecutionTrace] base=exported fields count: 5 != 7; nested=nil}}}}}}}}}}
175170
> StateGetNetworkParams {[func(context.Context) (*types.NetworkParams, error) <> func(context.Context) (*api.NetworkParams, error)] base=func out type: #0 input; nested={[*types.NetworkParams <> *api.NetworkParams] base=pointed type; nested={[types.NetworkParams <> api.NetworkParams] base=struct field; nested={[types.NetworkParams <> api.NetworkParams] base=exported field name: #3 field, SupportedProofTypes != PreCommitChallengeDelay; nested=nil}}}}
176171
+ StateMinerSectorSize
177172
+ StateMinerWorkerAddress
178-
> StateReplay {[func(context.Context, types.TipSetKey, cid.Cid) (*types.InvocResult, error) <> func(context.Context, types.TipSetKey, cid.Cid) (*api.InvocResult, error)] base=func out type: #0 input; nested={[*types.InvocResult <> *api.InvocResult] base=pointed type; nested={[types.InvocResult <> api.InvocResult] base=struct field; nested={[types.InvocResult <> api.InvocResult] base=exported field type: #4 field named ExecutionTrace; nested={[types.ExecutionTrace <> types.ExecutionTrace] base=struct field; nested={[types.ExecutionTrace <> types.ExecutionTrace] base=exported fields count: 5 != 7; nested=nil}}}}}}
179173
- SyncCheckBad
180174
- SyncMarkBad
181175
- SyncUnmarkAllBad

0 commit comments

Comments
 (0)