NV18: Filecoin EVM runtime + Actor Events + EthAccount + EAM + f4 addressing (#9998)
Co-authored-by: Steven Allen <steven@stebalien.com> Co-authored-by: Raul Kripalani <raulk@users.noreply.github.com> Co-authored-by: Kevin Li <ychiaoli18@users.noreply.github.com> Co-authored-by: vyzo <vyzo@hackzen.org> Co-authored-by: Ian Davis <nospam@iandavis.com> Co-authored-by: Aayush Rajasekaran <arajasek94@gmail.com> Co-authored-by: Jiaying Wang <42981373+jennijuju@users.noreply.github.com> Co-authored-by: Jennifer Wang <jiayingw703@gmail.com> Co-authored-by: Geoff Stuart <geoff.vball@gmail.com> Co-authored-by: Shrenuj Bansal <shrenuj.bansal@protocol.ai> Co-authored-by: Shrenuj Bansal <108157875+shrenujbansal@users.noreply.github.com> Co-authored-by: Geoff Stuart <geoffrey.stuart@protocol.ai> Co-authored-by: Aayush Rajasekaran <aayushrajasekaran@Aayushs-MacBook-Pro.local> Co-authored-by: ZenGround0 <5515260+ZenGround0@users.noreply.github.com> Co-authored-by: zenground0 <ZenGround0@users.noreply.github.com>
This commit is contained in:
co-authored by
Steven Allen
Raul Kripalani
Kevin Li
vyzo
Ian Davis
Aayush Rajasekaran
Jiaying Wang
Jennifer Wang
Geoff Stuart
Shrenuj Bansal
Shrenuj Bansal
Geoff Stuart
Aayush Rajasekaran
ZenGround0
zenground0
parent
048ccc71bb
commit
cdf3812e40
+16
-5
@@ -70,11 +70,12 @@ func defCommon() Common {
|
||||
DirectPeers: nil,
|
||||
},
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var DefaultDefaultMaxFee = types.MustParseFIL("0.07")
|
||||
var DefaultSimultaneousTransfers = uint64(20)
|
||||
var (
|
||||
DefaultDefaultMaxFee = types.MustParseFIL("0.07")
|
||||
DefaultSimultaneousTransfers = uint64(20)
|
||||
)
|
||||
|
||||
// DefaultFullNode returns the default config
|
||||
func DefaultFullNode() *FullNode {
|
||||
@@ -98,6 +99,14 @@ func DefaultFullNode() *FullNode {
|
||||
},
|
||||
},
|
||||
Cluster: *DefaultUserRaftConfig(),
|
||||
ActorEvent: ActorEventConfig{
|
||||
EnableRealTimeFilterAPI: false,
|
||||
EnableHistoricFilterAPI: false,
|
||||
FilterTTL: Duration(time.Hour * 24),
|
||||
MaxFilters: 100,
|
||||
MaxFilterResults: 10000,
|
||||
MaxFilterHeightRange: 2880, // conservative limit of one day
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -255,8 +264,10 @@ func DefaultStorageMiner() *StorageMiner {
|
||||
return cfg
|
||||
}
|
||||
|
||||
var _ encoding.TextMarshaler = (*Duration)(nil)
|
||||
var _ encoding.TextUnmarshaler = (*Duration)(nil)
|
||||
var (
|
||||
_ encoding.TextMarshaler = (*Duration)(nil)
|
||||
_ encoding.TextUnmarshaler = (*Duration)(nil)
|
||||
)
|
||||
|
||||
// Duration is a wrapper type for time.Duration
|
||||
// for decoding and encoding from/to TOML
|
||||
|
||||
@@ -29,6 +29,56 @@ var Doc = map[string][]DocField{
|
||||
Comment: ``,
|
||||
},
|
||||
},
|
||||
"ActorEventConfig": []DocField{
|
||||
{
|
||||
Name: "EnableRealTimeFilterAPI",
|
||||
Type: "bool",
|
||||
|
||||
Comment: `EnableRealTimeFilterAPI enables APIs that can create and query filters for actor events as they are emitted.`,
|
||||
},
|
||||
{
|
||||
Name: "EnableHistoricFilterAPI",
|
||||
Type: "bool",
|
||||
|
||||
Comment: `EnableHistoricFilterAPI enables APIs that can create and query filters for actor events that occurred in the past.
|
||||
A queryable index of events will be maintained.`,
|
||||
},
|
||||
{
|
||||
Name: "FilterTTL",
|
||||
Type: "Duration",
|
||||
|
||||
Comment: `FilterTTL specifies the time to live for actor event filters. Filters that haven't been accessed longer than
|
||||
this time become eligible for automatic deletion.`,
|
||||
},
|
||||
{
|
||||
Name: "MaxFilters",
|
||||
Type: "int",
|
||||
|
||||
Comment: `MaxFilters specifies the maximum number of filters that may exist at any one time.`,
|
||||
},
|
||||
{
|
||||
Name: "MaxFilterResults",
|
||||
Type: "int",
|
||||
|
||||
Comment: `MaxFilterResults specifies the maximum number of results that can be accumulated by an actor event filter.`,
|
||||
},
|
||||
{
|
||||
Name: "MaxFilterHeightRange",
|
||||
Type: "uint64",
|
||||
|
||||
Comment: `MaxFilterHeightRange specifies the maximum range of heights that can be used in a filter (to avoid querying
|
||||
the entire chain)`,
|
||||
},
|
||||
{
|
||||
Name: "ActorEventDatabasePath",
|
||||
Type: "string",
|
||||
|
||||
Comment: `ActorEventDatabasePath is the full path to a sqlite database that will be used to index actor events to
|
||||
support the historic filter APIs. If the database does not exist it will be created. The directory containing
|
||||
the database must already exist and be writeable. If a relative path is provided here, sqlite treats it as
|
||||
relative to the CWD (current working directory).`,
|
||||
},
|
||||
},
|
||||
"Backup": []DocField{
|
||||
{
|
||||
Name: "DisableMetadataLog",
|
||||
@@ -378,6 +428,12 @@ see https://lotus.filecoin.io/storage-providers/advanced-configurations/market/#
|
||||
Name: "Cluster",
|
||||
Type: "UserRaftConfig",
|
||||
|
||||
Comment: ``,
|
||||
},
|
||||
{
|
||||
Name: "ActorEvent",
|
||||
Type: "ActorEventConfig",
|
||||
|
||||
Comment: ``,
|
||||
},
|
||||
},
|
||||
|
||||
+35
-1
@@ -27,6 +27,7 @@ type FullNode struct {
|
||||
Fees FeeConfig
|
||||
Chainstore Chainstore
|
||||
Cluster UserRaftConfig
|
||||
ActorEvent ActorEventConfig
|
||||
}
|
||||
|
||||
// // Common
|
||||
@@ -168,7 +169,6 @@ type DealmakingConfig struct {
|
||||
}
|
||||
|
||||
type IndexProviderConfig struct {
|
||||
|
||||
// Enable set whether to enable indexing announcement to the network and expose endpoints that
|
||||
// allow indexer nodes to process announcements. Enabled by default.
|
||||
Enable bool
|
||||
@@ -658,3 +658,37 @@ type UserRaftConfig struct {
|
||||
// Tracing enables propagation of contexts across binary boundaries.
|
||||
Tracing bool
|
||||
}
|
||||
|
||||
type ActorEventConfig struct {
|
||||
// EnableRealTimeFilterAPI enables APIs that can create and query filters for actor events as they are emitted.
|
||||
EnableRealTimeFilterAPI bool
|
||||
|
||||
// EnableHistoricFilterAPI enables APIs that can create and query filters for actor events that occurred in the past.
|
||||
// A queryable index of events will be maintained.
|
||||
EnableHistoricFilterAPI bool
|
||||
|
||||
// FilterTTL specifies the time to live for actor event filters. Filters that haven't been accessed longer than
|
||||
// this time become eligible for automatic deletion.
|
||||
FilterTTL Duration
|
||||
|
||||
// MaxFilters specifies the maximum number of filters that may exist at any one time.
|
||||
MaxFilters int
|
||||
|
||||
// MaxFilterResults specifies the maximum number of results that can be accumulated by an actor event filter.
|
||||
MaxFilterResults int
|
||||
|
||||
// MaxFilterHeightRange specifies the maximum range of heights that can be used in a filter (to avoid querying
|
||||
// the entire chain)
|
||||
MaxFilterHeightRange uint64
|
||||
|
||||
// ActorEventDatabasePath is the full path to a sqlite database that will be used to index actor events to
|
||||
// support the historic filter APIs. If the database does not exist it will be created. The directory containing
|
||||
// the database must already exist and be writeable. If a relative path is provided here, sqlite treats it as
|
||||
// relative to the CWD (current working directory).
|
||||
ActorEventDatabasePath string
|
||||
|
||||
// Others, not implemented yet:
|
||||
// Set a limit on the number of active websocket subscriptions (may be zero)
|
||||
// Set a timeout for subscription clients
|
||||
// Set upper bound on index size
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user