diff --git a/build/openrpc/full.json.gz b/build/openrpc/full.json.gz index 176f299f2..badaa1984 100644 Binary files a/build/openrpc/full.json.gz and b/build/openrpc/full.json.gz differ diff --git a/build/openrpc/gateway.json.gz b/build/openrpc/gateway.json.gz index db0e52442..2c85d0040 100644 Binary files a/build/openrpc/gateway.json.gz and b/build/openrpc/gateway.json.gz differ diff --git a/chain/types/actor_event.go b/chain/types/actor_event.go index 7aa268faf..127dfaea2 100644 --- a/chain/types/actor_event.go +++ b/chain/types/actor_event.go @@ -31,7 +31,7 @@ type SubActorEventFilter struct { type ActorEventFilter struct { // Matches events from one of these actors, or any actor if empty. // For now, this MUST be a Filecoin address. - Addresses []address.Address `json:"addresses"` + Addresses []address.Address `json:"addresses,omitempty"` // Matches events with the specified key/values, or all events if empty. // If the value is an empty slice, the filter will match on the key only, accepting any value. @@ -51,10 +51,22 @@ type ActorEventFilter struct { } type ActorEvent struct { - Entries []EventEntry - EmitterAddr address.Address // f4 address of emitter - Reverted bool - Height abi.ChainEpoch - TipSetKey cid.Cid // tipset that contained the message - MsgCid cid.Cid // cid of message that produced event + // Event entries in log form. + Entries []EventEntry `json:"entries"` + + // Filecoin address of the actor that emitted this event. + EmitterAddr address.Address `json:"emitter"` + + // Reverted is set to true if the message that produced this event was reverted because of a network re-org + // in that case, the event should be considered as reverted as well. + Reverted bool `json:"reverted"` + + // Height of the tipset that contained the message that produced this event. + Height abi.ChainEpoch `json:"height"` + + // CID of the tipset that contained the message that produced this event. + TipSetCid cid.Cid `json:"tipsetCid"` + + // CID of message that produced this event. + MsgCid cid.Cid `json:"msgCid"` } diff --git a/chain/types/actor_event_test.go b/chain/types/actor_event_test.go index aae4865d3..aaac329b2 100644 --- a/chain/types/actor_event_test.go +++ b/chain/types/actor_event_test.go @@ -32,7 +32,7 @@ func TestActorEventJson(t *testing.T) { EmitterAddr: randomF4Addr(t, rng), Reverted: false, Height: 1001, - TipSetKey: randomCid(t, rng), + TipSetCid: randomCid(t, rng), MsgCid: randomCid(t, rng), } diff --git a/documentation/en/api-v1-unstable-methods.md b/documentation/en/api-v1-unstable-methods.md index 7c2e36ed7..80f32158e 100644 --- a/documentation/en/api-v1-unstable-methods.md +++ b/documentation/en/api-v1-unstable-methods.md @@ -3421,7 +3421,7 @@ Response: ```json [ { - "Entries": [ + "entries": [ { "Flags": 7, "Key": "string value", @@ -3429,13 +3429,13 @@ Response: "Value": "Ynl0ZSBhcnJheQ==" } ], - "EmitterAddr": "f01234", - "Reverted": true, - "Height": 10101, - "TipSetKey": { + "emitter": "f01234", + "reverted": true, + "height": 10101, + "tipsetCid": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "MsgCid": { + "msgCid": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" } } @@ -8859,7 +8859,7 @@ Inputs: Response: ```json { - "Entries": [ + "entries": [ { "Flags": 7, "Key": "string value", @@ -8867,13 +8867,13 @@ Response: "Value": "Ynl0ZSBhcnJheQ==" } ], - "EmitterAddr": "f01234", - "Reverted": true, - "Height": 10101, - "TipSetKey": { + "emitter": "f01234", + "reverted": true, + "height": 10101, + "tipsetCid": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "MsgCid": { + "msgCid": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" } } diff --git a/itests/direct_data_onboard_test.go b/itests/direct_data_onboard_test.go index 3cfb19750..fad478d84 100644 --- a/itests/direct_data_onboard_test.go +++ b/itests/direct_data_onboard_test.go @@ -527,7 +527,7 @@ func buildActorEventsFromMessages(ctx context.Context, t *testing.T, node v1api. EmitterAddr: addr, Reverted: false, Height: ts.Height(), - TipSetKey: tsCid, + TipSetCid: tsCid, MsgCid: m.Cid, }) } diff --git a/node/impl/full/actor_event.go b/node/impl/full/actor_event.go index ce555d6d2..c185b35a9 100644 --- a/node/impl/full/actor_event.go +++ b/node/impl/full/actor_event.go @@ -175,7 +175,7 @@ func (a *ActorEvent) SubscribeActorEvents(ctx context.Context, f *types.SubActor EmitterAddr: ce.EmitterAddr, Reverted: ce.Reverted, Height: ce.Height, - TipSetKey: c, + TipSetCid: c, MsgCid: ce.MsgCid, } @@ -215,7 +215,7 @@ func getCollected(ctx context.Context, f *filter.EventFilter) ([]*types.ActorEve EmitterAddr: e.EmitterAddr, Reverted: e.Reverted, Height: e.Height, - TipSetKey: c, + TipSetCid: c, MsgCid: e.MsgCid, }