s/ActorEvents/Events/g in global config

This commit is contained in:
Rod Vagg 2024-02-26 15:07:59 +11:00
parent 2194eacc0f
commit c492b491d7
6 changed files with 28 additions and 28 deletions

View File

@ -339,7 +339,7 @@
[Fevm.Events] [Fevm.Events]
# DisableRealTimeFilterAPI will disable the RealTimeFilterAPI that can create and query filters for actor events as they are emitted. # DisableRealTimeFilterAPI will disable the RealTimeFilterAPI that can create and query filters for actor events as they are emitted.
# The API is enabled when EnableEthRPC or EnableActorEventsAPI is true, but can be disabled selectively with this flag. # The API is enabled when EnableEthRPC or Events.EnableActorEventsAPI is true, but can be disabled selectively with this flag.
# #
# type: bool # type: bool
# env var: LOTUS_FEVM_EVENTS_DISABLEREALTIMEFILTERAPI # env var: LOTUS_FEVM_EVENTS_DISABLEREALTIMEFILTERAPI
@ -347,7 +347,7 @@
# DisableHistoricFilterAPI will disable the HistoricFilterAPI that can create and query filters for actor events # DisableHistoricFilterAPI will disable the HistoricFilterAPI that can create and query filters for actor events
# that occurred in the past. HistoricFilterAPI maintains a queryable index of events. # that occurred in the past. HistoricFilterAPI maintains a queryable index of events.
# The API is enabled when EnableEthRPC or EnableActorEventsAPI is true, but can be disabled selectively with this flag. # The API is enabled when EnableEthRPC or Events.EnableActorEventsAPI is true, but can be disabled selectively with this flag.
# #
# type: bool # type: bool
# env var: LOTUS_FEVM_EVENTS_DISABLEHISTORICFILTERAPI # env var: LOTUS_FEVM_EVENTS_DISABLEHISTORICFILTERAPI
@ -389,14 +389,14 @@
#DatabasePath = "" #DatabasePath = ""
[ActorEvents] [Events]
# EnableActorEventsAPI enables the Actor events API that enables clients to consume events # EnableActorEventsAPI enables the Actor events API that enables clients to consume events
# emitted by (smart contracts + built-in Actors). # emitted by (smart contracts + built-in Actors).
# This will also enable the RealTimeFilterAPI and HistoricFilterAPI by default, but they can be # This will also enable the RealTimeFilterAPI and HistoricFilterAPI by default, but they can be
# disabled by setting their respective Disable* options in Fevm.Events. # disabled by setting their respective Disable* options in Fevm.Events.
# #
# type: bool # type: bool
# env var: LOTUS_ACTOREVENTS_ENABLEACTOREVENTSAPI # env var: LOTUS_EVENTS_ENABLEACTOREVENTSAPI
#EnableActorEventsAPI = false #EnableActorEventsAPI = false

View File

@ -66,7 +66,7 @@ var DefaultNodeOpts = nodeOpts{
cfg.Fevm.EnableEthRPC = true cfg.Fevm.EnableEthRPC = true
cfg.Fevm.Events.MaxFilterHeightRange = math.MaxInt64 cfg.Fevm.Events.MaxFilterHeightRange = math.MaxInt64
cfg.ActorEvents.EnableActorEventsAPI = true cfg.Events.EnableActorEventsAPI = true
return nil return nil
}, },
}, },

View File

@ -281,10 +281,10 @@ func ConfigFullNode(c interface{}) Option {
), ),
ApplyIf(isFullNode, ApplyIf(isFullNode,
If(cfg.ActorEvents.EnableActorEventsAPI, If(cfg.Events.EnableActorEventsAPI,
Override(new(full.ActorEventAPI), modules.ActorEventHandler(cfg.ActorEvents.EnableActorEventsAPI, cfg.Fevm)), Override(new(full.ActorEventAPI), modules.ActorEventHandler(cfg.Events.EnableActorEventsAPI, cfg.Fevm)),
), ),
If(!cfg.ActorEvents.EnableActorEventsAPI, If(!cfg.Events.EnableActorEventsAPI,
Override(new(full.ActorEventAPI), &full.ActorEventDummy{}), Override(new(full.ActorEventAPI), &full.ActorEventDummy{}),
), ),
), ),

View File

@ -119,7 +119,7 @@ func DefaultFullNode() *FullNode {
MaxFilterHeightRange: 2880, // conservative limit of one day MaxFilterHeightRange: 2880, // conservative limit of one day
}, },
}, },
ActorEvents: ActorEventsConfig{ Events: EventsConfig{
EnableActorEventsAPI: false, EnableActorEventsAPI: false,
}, },
} }

View File

@ -29,17 +29,6 @@ var Doc = map[string][]DocField{
Comment: ``, Comment: ``,
}, },
}, },
"ActorEventsConfig": {
{
Name: "EnableActorEventsAPI",
Type: "bool",
Comment: `EnableActorEventsAPI enables the Actor events API that enables clients to consume events
emitted by (smart contracts + built-in Actors).
This will also enable the RealTimeFilterAPI and HistoricFilterAPI by default, but they can be
disabled by setting their respective Disable* options in Fevm.Events.`,
},
},
"ApisConfig": { "ApisConfig": {
{ {
Name: "ChainApiInfo", Name: "ChainApiInfo",
@ -374,7 +363,7 @@ see https://lotus.filecoin.io/storage-providers/advanced-configurations/market/#
Type: "bool", Type: "bool",
Comment: `DisableRealTimeFilterAPI will disable the RealTimeFilterAPI that can create and query filters for actor events as they are emitted. Comment: `DisableRealTimeFilterAPI will disable the RealTimeFilterAPI that can create and query filters for actor events as they are emitted.
The API is enabled when EnableEthRPC or EnableActorEventsAPI is true, but can be disabled selectively with this flag.`, The API is enabled when EnableEthRPC or Events.EnableActorEventsAPI is true, but can be disabled selectively with this flag.`,
}, },
{ {
Name: "DisableHistoricFilterAPI", Name: "DisableHistoricFilterAPI",
@ -382,7 +371,7 @@ The API is enabled when EnableEthRPC or EnableActorEventsAPI is true, but can be
Comment: `DisableHistoricFilterAPI will disable the HistoricFilterAPI that can create and query filters for actor events Comment: `DisableHistoricFilterAPI will disable the HistoricFilterAPI that can create and query filters for actor events
that occurred in the past. HistoricFilterAPI maintains a queryable index of events. that occurred in the past. HistoricFilterAPI maintains a queryable index of events.
The API is enabled when EnableEthRPC or EnableActorEventsAPI is true, but can be disabled selectively with this flag.`, The API is enabled when EnableEthRPC or Events.EnableActorEventsAPI is true, but can be disabled selectively with this flag.`,
}, },
{ {
Name: "FilterTTL", Name: "FilterTTL",
@ -420,6 +409,17 @@ the database must already exist and be writeable. If a relative path is provided
relative to the CWD (current working directory).`, relative to the CWD (current working directory).`,
}, },
}, },
"EventsConfig": {
{
Name: "EnableActorEventsAPI",
Type: "bool",
Comment: `EnableActorEventsAPI enables the Actor events API that enables clients to consume events
emitted by (smart contracts + built-in Actors).
This will also enable the RealTimeFilterAPI and HistoricFilterAPI by default, but they can be
disabled by setting their respective Disable* options in Fevm.Events.`,
},
},
"FaultReporterConfig": { "FaultReporterConfig": {
{ {
Name: "EnableConsensusFaultReporter", Name: "EnableConsensusFaultReporter",
@ -517,8 +517,8 @@ Set to 0 to keep all mappings`,
Comment: ``, Comment: ``,
}, },
{ {
Name: "ActorEvents", Name: "Events",
Type: "ActorEventsConfig", Type: "EventsConfig",
Comment: ``, Comment: ``,
}, },

View File

@ -28,7 +28,7 @@ type FullNode struct {
Chainstore Chainstore Chainstore Chainstore
Cluster UserRaftConfig Cluster UserRaftConfig
Fevm FevmConfig Fevm FevmConfig
ActorEvents ActorEventsConfig Events EventsConfig
Index IndexConfig Index IndexConfig
FaultReporter FaultReporterConfig FaultReporter FaultReporterConfig
} }
@ -796,12 +796,12 @@ type FevmConfig struct {
type Events struct { type Events struct {
// DisableRealTimeFilterAPI will disable the RealTimeFilterAPI that can create and query filters for actor events as they are emitted. // DisableRealTimeFilterAPI will disable the RealTimeFilterAPI that can create and query filters for actor events as they are emitted.
// The API is enabled when EnableEthRPC or EnableActorEventsAPI is true, but can be disabled selectively with this flag. // The API is enabled when EnableEthRPC or Events.EnableActorEventsAPI is true, but can be disabled selectively with this flag.
DisableRealTimeFilterAPI bool DisableRealTimeFilterAPI bool
// DisableHistoricFilterAPI will disable the HistoricFilterAPI that can create and query filters for actor events // DisableHistoricFilterAPI will disable the HistoricFilterAPI that can create and query filters for actor events
// that occurred in the past. HistoricFilterAPI maintains a queryable index of events. // that occurred in the past. HistoricFilterAPI maintains a queryable index of events.
// The API is enabled when EnableEthRPC or EnableActorEventsAPI is true, but can be disabled selectively with this flag. // The API is enabled when EnableEthRPC or Events.EnableActorEventsAPI is true, but can be disabled selectively with this flag.
DisableHistoricFilterAPI bool DisableHistoricFilterAPI bool
// FilterTTL specifies the time to live for actor event filters. Filters that haven't been accessed longer than // FilterTTL specifies the time to live for actor event filters. Filters that haven't been accessed longer than
@ -830,7 +830,7 @@ type Events struct {
// Set upper bound on index size // Set upper bound on index size
} }
type ActorEventsConfig struct { type EventsConfig struct {
// EnableActorEventsAPI enables the Actor events API that enables clients to consume events // EnableActorEventsAPI enables the Actor events API that enables clients to consume events
// emitted by (smart contracts + built-in Actors). // emitted by (smart contracts + built-in Actors).
// This will also enable the RealTimeFilterAPI and HistoricFilterAPI by default, but they can be // This will also enable the RealTimeFilterAPI and HistoricFilterAPI by default, but they can be