Skip to content

Commit 4d6dd12

Browse files
committed
Merge branch 'master' into leo/pebble-minor-refactors
2 parents 6b39000 + 26f6919 commit 4d6dd12

File tree

138 files changed

+4100
-1432
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

138 files changed

+4100
-1432
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ on:
1919
- master
2020

2121
env:
22-
GO_VERSION: "1.23"
22+
GO_VERSION: "1.25"
2323

2424
concurrency:
2525
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}

.github/workflows/flaky-test-monitor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ permissions:
1313
contents: read
1414

1515
env:
16-
GO_VERSION: "1.23"
16+
GO_VERSION: "1.25"
1717
BIGQUERY_DATASET: dev_src_flow_test_metrics
1818
BIGQUERY_TABLE: skipped_tests
1919
BIGQUERY_TABLE2: test_results

.github/workflows/image_builds.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616
type: string
1717

1818
env:
19-
GO_VERSION: "1.23"
19+
GO_VERSION: "1.25"
2020
PRIVATE_REGISTRY_HOST: us-central1-docker.pkg.dev
2121

2222
jobs:

.github/workflows/tools.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
type: boolean
1515

1616
env:
17-
GO_VERSION: "1.23"
17+
GO_VERSION: "1.25"
1818

1919
jobs:
2020
build-publish:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ The following table lists all work streams and links to their home directory and
5454
## Installation
5555

5656
- Clone this repository
57-
- Install [Go](https://golang.org/doc/install) (Flow requires Go 1.23 and later)
57+
- Install [Go](https://golang.org/doc/install) (Flow requires Go 1.25 and later)
5858
- Install [Docker](https://docs.docker.com/get-docker/), which is used for running a local network and integration tests
5959
- Make sure the [`GOPATH`](https://golang.org/cmd/go/#hdr-GOPATH_environment_variable) and `GOBIN` environment variables
6060
are set, and `GOBIN` is added to your path:

cmd/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
####################################
55
## (1) Setup the build environment
6-
FROM golang:1.23-bullseye AS build-setup
6+
FROM golang:1.25-bookworm AS build-setup
77

88
RUN apt-get update
99
RUN apt-get -y install zip apt-utils gcc-aarch64-linux-gnu
@@ -85,7 +85,7 @@ RUN --mount=type=ssh \
8585
RUN chmod a+x /app/app
8686

8787
## (4) Add the statically linked debug binary to a distroless image configured for debugging
88-
FROM golang:1.23-bullseye as debug
88+
FROM golang:1.25-bookworm as debug
8989

9090
RUN go install github.com/go-delve/delve/cmd/dlv@latest
9191

cmd/collection/main.go

Lines changed: 60 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ import (
5151
"github.com/onflow/flow-go/module/mempool/herocache"
5252
"github.com/onflow/flow-go/module/mempool/queue"
5353
"github.com/onflow/flow-go/module/metrics"
54+
"github.com/onflow/flow-go/module/updatable_configs"
5455
"github.com/onflow/flow-go/network/channels"
5556
"github.com/onflow/flow-go/state/protocol"
5657
badgerState "github.com/onflow/flow-go/state/protocol/badger"
@@ -73,6 +74,7 @@ func main() {
7374
builderPayerRateLimitDryRun bool
7475
builderPayerRateLimit float64
7576
builderUnlimitedPayers []string
77+
builderPriorityPayers []string
7678
hotstuffMinTimeout time.Duration
7779
hotstuffTimeoutAdjustmentFactor float64
7880
hotstuffHappyPathMaxRoundFailures uint64
@@ -100,15 +102,16 @@ func main() {
100102
err error
101103

102104
// epoch qc contract client
103-
machineAccountInfo *bootstrap.NodeMachineAccountInfo
104-
flowClientConfigs []*grpcclient.FlowClientConfig
105-
insecureAccessAPI bool
106-
accessNodeIDS []string
107-
apiRatelimits map[string]int
108-
apiBurstlimits map[string]int
109-
txRatelimits float64
110-
txBurstlimits int
111-
txRatelimitPayers string
105+
machineAccountInfo *bootstrap.NodeMachineAccountInfo
106+
flowClientConfigs []*grpcclient.FlowClientConfig
107+
insecureAccessAPI bool
108+
accessNodeIDS []string
109+
apiRatelimits map[string]int
110+
apiBurstlimits map[string]int
111+
txRatelimits float64
112+
txBurstlimits int
113+
txRatelimitPayers string
114+
bySealingLagRateLimiterConfigGetter module.ReadonlySealingLagRateLimiterConfig
112115
)
113116
var deprecatedFlagBlockRateDelay time.Duration
114117

@@ -142,6 +145,8 @@ func main() {
142145
"rate limit for each payer (transactions/collection)")
143146
flags.StringSliceVar(&builderUnlimitedPayers, "builder-unlimited-payers", []string{}, // no unlimited payers
144147
"set of payer addresses which are omitted from rate limiting")
148+
flags.StringSliceVar(&builderPriorityPayers, "builder-priority-payers", []string{}, // no priority payers
149+
"set of payer addresses which are prioritized in tx selection algorithm")
145150
flags.UintVar(&maxCollectionSize, "builder-max-collection-size", flow.DefaultMaxCollectionSize,
146151
"maximum number of transactions in proposed collections")
147152
flags.Uint64Var(&maxCollectionByteSize, "builder-max-collection-byte-size", flow.DefaultMaxCollectionByteSize,
@@ -291,6 +296,43 @@ func main() {
291296

292297
return nil
293298
}).
299+
Module("updatable collection rate limiting config", func(node *cmd.NodeConfig) error {
300+
setter := updatable_configs.DefaultBySealingLagRateLimiterConfigs()
301+
302+
// update the getter with the setter, so other modules can only get, but not set
303+
bySealingLagRateLimiterConfigGetter = setter
304+
305+
// admin tool is the only instance that have access to the setter interface, therefore, is
306+
// the only module can change this config
307+
err = node.ConfigManager.RegisterUintConfig("collection-builder-rate-limiter-min-sealing-lag",
308+
setter.MinSealingLag,
309+
setter.SetMinSealingLag)
310+
if err != nil {
311+
return err
312+
}
313+
err = node.ConfigManager.RegisterUintConfig("collection-builder-rate-limiter-max-sealing-lag",
314+
setter.MaxSealingLag,
315+
setter.SetMaxSealingLag)
316+
if err != nil {
317+
return err
318+
}
319+
err = node.ConfigManager.RegisterUintConfig("collection-builder-rate-limiter-halving-interval",
320+
setter.HalvingInterval,
321+
setter.SetHalvingInterval)
322+
if err != nil {
323+
return err
324+
}
325+
err = node.ConfigManager.RegisterUintConfig("collection-builder-rate-limiter-min-collection-size",
326+
setter.MinCollectionSize,
327+
setter.SetMinCollectionSize)
328+
if err != nil {
329+
return err
330+
}
331+
332+
// report the initial config value
333+
colMetrics.CollectionMaxSize(maxCollectionSize)
334+
return nil
335+
}).
294336
Component("machine account config validator", func(node *cmd.NodeConfig) (module.ReadyDoneAware, error) {
295337
// @TODO use fallback logic for flowClient similar to DKG/QC contract clients
296338
flowClient, err := grpcclient.FlowClient(flowClientConfigs[0])
@@ -498,6 +540,13 @@ func main() {
498540
unlimitedPayers = append(unlimitedPayers, payerAddr)
499541
}
500542

543+
// convert hex string flag values to addresses
544+
priorityPayers := make([]flow.Address, 0, len(builderPriorityPayers))
545+
for _, payerStr := range builderPriorityPayers {
546+
payerAddr := flow.HexToAddress(payerStr)
547+
priorityPayers = append(priorityPayers, payerAddr)
548+
}
549+
501550
builderFactory, err := factories.NewBuilderFactory(
502551
node.ProtocolDB,
503552
node.State,
@@ -507,13 +556,15 @@ func main() {
507556
colMetrics,
508557
push,
509558
node.Logger,
559+
bySealingLagRateLimiterConfigGetter,
510560
builder.WithMaxCollectionSize(maxCollectionSize),
511561
builder.WithMaxCollectionByteSize(maxCollectionByteSize),
512562
builder.WithMaxCollectionTotalGas(maxCollectionTotalGas),
513563
builder.WithExpiryBuffer(builderExpiryBuffer),
514564
builder.WithRateLimitDryRun(builderPayerRateLimitDryRun),
515565
builder.WithMaxPayerTransactionRate(builderPayerRateLimit),
516566
builder.WithUnlimitedPayers(unlimitedPayers...),
567+
builder.WithPriorityPayers(priorityPayers...),
517568
)
518569
if err != nil {
519570
return nil, err

cmd/execution_builder.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -572,11 +572,13 @@ func (exeNode *ExecutionNode) LoadProviderEngine(
572572
node.FvmOptions...,
573573
)
574574

575-
opts = append(opts, computation.DefaultFVMOptions(
576-
node.RootChainID,
577-
exeNode.exeConf.computationConfig.CadenceTracing,
578-
exeNode.exeConf.computationConfig.ExtensiveTracing,
579-
exeNode.exeConf.scheduleCallbacksEnabled)...)
575+
opts = append(opts,
576+
computation.DefaultFVMOptions(
577+
node.RootChainID,
578+
exeNode.exeConf.computationConfig.ExtensiveTracing,
579+
exeNode.exeConf.scheduleCallbacksEnabled,
580+
)...,
581+
)
580582

581583
vmCtx := fvm.NewContext(opts...)
582584

cmd/execution_config.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ func (exeConf *ExecutionConfig) SetupFlags(flags *pflag.FlagSet) {
9696
flags.UintVar(&exeConf.computationConfig.DerivedDataCacheSize, "cadence-execution-cache", derived.DefaultDerivedDataCacheSize,
9797
"cache size for Cadence execution")
9898
flags.BoolVar(&exeConf.computationConfig.ExtensiveTracing, "extensive-tracing", false, "adds high-overhead tracing to execution")
99-
flags.BoolVar(&exeConf.computationConfig.CadenceTracing, "cadence-tracing", false, "enables cadence runtime level tracing")
10099
flags.IntVar(&exeConf.computationConfig.MaxConcurrency, "computer-max-concurrency", 1, "set to greater than 1 to enable concurrent transaction execution")
101100
flags.StringVar(&exeConf.chunkDataPackDir, "chunk-data-pack-dir", filepath.Join(datadir, "chunk_data_packs"), "directory to use for storing chunk data packs")
102101
flags.StringVar(&exeConf.chunkDataPackCheckpointsDir, "chunk-data-pack-checkpoints-dir", filepath.Join(datadir, "chunk_data_packs_checkpoints_dir"), "directory to use storing chunk data packs pebble database checkpoints for querying while the node is running")

cmd/observer/node_builder/observer_builder.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,8 @@ func (builder *ObserverServiceBuilder) buildFollowerEngine() *ObserverServiceBui
528528
if err != nil {
529529
return nil, fmt.Errorf("could not create follower engine: %w", err)
530530
}
531-
builder.FollowerDistributor.AddOnBlockFinalizedConsumer(builder.FollowerEng.OnFinalizedBlock)
531+
builder.FollowerDistributor.
532+
AddOnBlockFinalizedConsumer(builder.FollowerEng.OnFinalizedBlock)
532533

533534
return builder.FollowerEng, nil
534535
})

0 commit comments

Comments
 (0)