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

Sync Stable Cadence feature branch #5377

Merged
merged 35 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
2d6e5e4
Enable execution sync on public network on AN
UlyanaAndrukhiv Jan 8, 2024
671d7b0
Updated public network execution data service for AN
UlyanaAndrukhiv Jan 9, 2024
11b3a63
Added public network execution data service to observer
UlyanaAndrukhiv Jan 17, 2024
d3d7766
Merge branch 'master' into UlyanaAndrukhiv/2795-add-execution-state-sync
UlyanaAndrukhiv Jan 19, 2024
1025615
Added checks for execution data config
UlyanaAndrukhiv Jan 23, 2024
f9d107a
Merge branch 'master' into UlyanaAndrukhiv/2795-add-execution-state-sync
UlyanaAndrukhiv Jan 23, 2024
0a04cbb
Removed filter for public services
UlyanaAndrukhiv Jan 24, 2024
1d12508
Merge with master
UlyanaAndrukhiv Jan 24, 2024
e58638a
Linted
UlyanaAndrukhiv Jan 24, 2024
a65bb9c
Updated imports
UlyanaAndrukhiv Jan 24, 2024
e8c14de
Added PublicExecutionDataService channel to public channels list
UlyanaAndrukhiv Jan 25, 2024
422acd0
Merged with master
UlyanaAndrukhiv Jan 25, 2024
6666878
Added ExecutionDataService channels to relay network on ANs, updated …
UlyanaAndrukhiv Jan 25, 2024
b97d0ef
Merged with master
UlyanaAndrukhiv Jan 26, 2024
343deeb
Merge branch 'master' into UlyanaAndrukhiv/2795-add-execution-state-sync
UlyanaAndrukhiv Jan 30, 2024
2a502bb
Updated public network execution data service component according to …
UlyanaAndrukhiv Jan 30, 2024
23ed303
Updated according to comments
UlyanaAndrukhiv Jan 30, 2024
c2289f0
Merge branch 'master' into UlyanaAndrukhiv/2795-add-execution-state-sync
UlyanaAndrukhiv Jan 30, 2024
53289fb
Merge branch 'master' into UlyanaAndrukhiv/2795-add-execution-state-sync
UlyanaAndrukhiv Jan 31, 2024
53c685c
expose invoke to evm
ramtinms Feb 1, 2024
2e6cad7
update mocks
ramtinms Feb 1, 2024
2505c7e
fix linter
ramtinms Feb 1, 2024
548dde1
Merge branch 'master' into ramtin/5197-part1-expose-invoke
ramtinms Feb 2, 2024
e7e9c7d
Merge branch 'master' into ramtin/5197-part1-expose-invoke
ramtinms Feb 5, 2024
128a76a
update to Cadence v0.42.9
turbolent Feb 7, 2024
f889b61
Merge branch 'master' into ramtin/5197-part1-expose-invoke
ramtinms Feb 8, 2024
7400952
Merge pull request #5341 from onflow/ramtin/5197-part1-expose-invoke
ramtinms Feb 8, 2024
8496900
Merged with master
UlyanaAndrukhiv Feb 9, 2024
73ae830
Merge branch 'UlyanaAndrukhiv/2795-add-execution-state-sync' of githu…
UlyanaAndrukhiv Feb 9, 2024
d23f40a
Merge pull request #5253 from UlyanaAndrukhiv/UlyanaAndrukhiv/2795-ad…
Guitarheroua Feb 9, 2024
51202b7
Merge pull request #5361 from onflow/bastian/cadence-v0.42.9
turbolent Feb 9, 2024
216ea84
Merge branch 'master' into bastian/sync-stable-cadence
turbolent Feb 13, 2024
a621e66
go mod tidy
turbolent Feb 13, 2024
925fe0c
update Emulator
turbolent Feb 13, 2024
59cf9b5
Merge branch 'feature/stable-cadence' into bastian/sync-stable-cadence
turbolent Feb 13, 2024
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
95 changes: 62 additions & 33 deletions cmd/access/node_builder/access_node_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,36 +120,37 @@ import (
// For a node running as a standalone process, the config fields will be populated from the command line params,
// while for a node running as a library, the config fields are expected to be initialized by the caller.
type AccessNodeConfig struct {
supportsObserver bool // True if this is an Access node that supports observers and consensus follower engines
collectionGRPCPort uint
executionGRPCPort uint
pingEnabled bool
nodeInfoFile string
apiRatelimits map[string]int
apiBurstlimits map[string]int
rpcConf rpc.Config
stateStreamConf statestreambackend.Config
stateStreamFilterConf map[string]int
ExecutionNodeAddress string // deprecated
HistoricalAccessRPCs []access.AccessAPIClient
logTxTimeToFinalized bool
logTxTimeToExecuted bool
logTxTimeToFinalizedExecuted bool
retryEnabled bool
rpcMetricsEnabled bool
executionDataSyncEnabled bool
executionDataDir string
executionDataStartHeight uint64
executionDataConfig edrequester.ExecutionDataConfig
PublicNetworkConfig PublicNetworkConfig
TxResultCacheSize uint
TxErrorMessagesCacheSize uint
executionDataIndexingEnabled bool
registersDBPath string
checkpointFile string
scriptExecutorConfig query.QueryConfig
scriptExecMinBlock uint64
scriptExecMaxBlock uint64
supportsObserver bool // True if this is an Access node that supports observers and consensus follower engines
collectionGRPCPort uint
executionGRPCPort uint
pingEnabled bool
nodeInfoFile string
apiRatelimits map[string]int
apiBurstlimits map[string]int
rpcConf rpc.Config
stateStreamConf statestreambackend.Config
stateStreamFilterConf map[string]int
ExecutionNodeAddress string // deprecated
HistoricalAccessRPCs []access.AccessAPIClient
logTxTimeToFinalized bool
logTxTimeToExecuted bool
logTxTimeToFinalizedExecuted bool
retryEnabled bool
rpcMetricsEnabled bool
executionDataSyncEnabled bool
publicNetworkExecutionDataEnabled bool
executionDataDir string
executionDataStartHeight uint64
executionDataConfig edrequester.ExecutionDataConfig
PublicNetworkConfig PublicNetworkConfig
TxResultCacheSize uint
TxErrorMessagesCacheSize uint
executionDataIndexingEnabled bool
registersDBPath string
checkpointFile string
scriptExecutorConfig query.QueryConfig
scriptExecMinBlock uint64
scriptExecMaxBlock uint64
}

type PublicNetworkConfig struct {
Expand Down Expand Up @@ -225,9 +226,10 @@ func DefaultAccessNodeConfig() *AccessNodeConfig {
BindAddress: cmd.NotSet,
Metrics: metrics.NewNoopCollector(),
},
executionDataSyncEnabled: true,
executionDataDir: filepath.Join(homedir, ".flow", "execution_data"),
executionDataStartHeight: 0,
executionDataSyncEnabled: true,
publicNetworkExecutionDataEnabled: false,
executionDataDir: filepath.Join(homedir, ".flow", "execution_data"),
executionDataStartHeight: 0,
executionDataConfig: edrequester.ExecutionDataConfig{
InitialBlockHeight: 0,
MaxSearchAhead: edrequester.DefaultMaxSearchAhead,
Expand Down Expand Up @@ -272,6 +274,7 @@ type FlowAccessNodeBuilder struct {
FollowerCore module.HotStuffFollower
Validator hotstuff.Validator
ExecutionDataDownloader execution_data.Downloader
PublicBlobService network.BlobService
ExecutionDataRequester state_synchronization.ExecutionDataRequester
ExecutionDataStore execution_data.ExecutionDataStore
ExecutionDataCache *execdatacache.ExecutionDataCache
Expand Down Expand Up @@ -664,6 +667,28 @@ func (builder *FlowAccessNodeBuilder) BuildExecutionSyncComponents() *FlowAccess
return builder.ExecutionDataRequester, nil
})

if builder.publicNetworkExecutionDataEnabled {
builder.Component("public network execution data service", func(node *cmd.NodeConfig) (module.ReadyDoneAware, error) {
opts := []network.BlobServiceOption{
blob.WithBitswapOptions(
bitswap.WithTracer(
blob.NewTracer(node.Logger.With().Str("public_blob_service", channels.PublicExecutionDataService.String()).Logger()),
),
),
}

net := builder.AccessNodeConfig.PublicNetworkConfig.Network

var err error
builder.PublicBlobService, err = net.RegisterBlobService(channels.PublicExecutionDataService, ds, opts...)
if err != nil {
return nil, fmt.Errorf("could not register blob service: %w", err)
}

return builder.PublicBlobService, nil
})
}

if builder.executionDataIndexingEnabled {
var indexedBlockHeight storage.ConsumerProgress

Expand Down Expand Up @@ -1029,6 +1054,10 @@ func (builder *FlowAccessNodeBuilder) extraFlags() {
"execution-data-sync-enabled",
defaultConfig.executionDataSyncEnabled,
"whether to enable the execution data sync protocol")
flags.BoolVar(&builder.publicNetworkExecutionDataEnabled,
"public-network-execution-data-sync-enabled",
defaultConfig.publicNetworkExecutionDataEnabled,
"[experimental] whether to enable the execution data sync protocol on public network")
flags.StringVar(&builder.executionDataDir, "execution-data-dir", defaultConfig.executionDataDir, "directory to use for Execution Data database")
flags.Uint64Var(&builder.executionDataStartHeight,
"execution-data-start-height",
Expand Down
Loading
Loading