Skip to content

Commit df816a8

Browse files
committed
Merge branch 'master' into leo/enable-view-index
2 parents 0950fb3 + 26f6919 commit df816a8

File tree

108 files changed

+2689
-1297
lines changed

Some content is hidden

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

108 files changed

+2689
-1297
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/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/util/cmd/debug-tx/cmd.go

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,18 @@ import (
1313
"github.com/onflow/flow/protobuf/go/flow/executiondata"
1414
"github.com/rs/zerolog/log"
1515
"github.com/spf13/cobra"
16+
"go.opentelemetry.io/otel/exporters/stdout/stdouttrace"
1617
"golang.org/x/exp/slices"
1718
"google.golang.org/grpc"
1819
"google.golang.org/grpc/credentials/insecure"
1920

2021
sdk "github.com/onflow/flow-go-sdk"
2122

23+
"github.com/onflow/flow-go/fvm"
2224
"github.com/onflow/flow-go/fvm/storage/snapshot"
2325
"github.com/onflow/flow-go/model/flow"
2426
"github.com/onflow/flow-go/module/grpcclient"
27+
"github.com/onflow/flow-go/module/trace"
2528
"github.com/onflow/flow-go/utils/debug"
2629
)
2730

@@ -36,6 +39,7 @@ var (
3639
flagProposalKeySeq uint64
3740
flagUseExecutionDataAPI bool
3841
flagDumpRegisters bool
42+
flagTracePath string
3943
)
4044

4145
var Cmd = &cobra.Command{
@@ -67,6 +71,8 @@ func init() {
6771
Cmd.Flags().BoolVar(&flagUseExecutionDataAPI, "use-execution-data-api", false, "use the execution data API")
6872

6973
Cmd.Flags().BoolVar(&flagDumpRegisters, "dump-registers", false, "dump registers")
74+
75+
Cmd.Flags().StringVar(&flagTracePath, "trace", "", "enable tracing to given path")
7076
}
7177

7278
func run(_ *cobra.Command, args []string) {
@@ -178,7 +184,54 @@ func runTransactionID(txID flow.Identifier, flowClient *client.Client, chain flo
178184

179185
blockSnapshot := newBlockSnapshot(remoteSnapshot)
180186

181-
debugger := debug.NewRemoteDebugger(chain, log.Logger)
187+
var fvmOptions []fvm.Option
188+
189+
if flagTracePath != "" {
190+
191+
var traceFile *os.File
192+
if flagTracePath == "-" {
193+
traceFile = os.Stdout
194+
} else {
195+
traceFile, err = os.Create(flagTracePath)
196+
if err != nil {
197+
log.Fatal().Err(err).Msg("failed to create trace file")
198+
}
199+
defer traceFile.Close()
200+
}
201+
202+
exporter, err := stdouttrace.New(
203+
stdouttrace.WithWriter(traceFile),
204+
)
205+
if err != nil {
206+
log.Fatal().Err(err).Msg("failed to create trace exporter")
207+
}
208+
209+
tracer, err := trace.NewTracerWithExporter(
210+
log.Logger,
211+
"debug-tx",
212+
flagChain,
213+
trace.SensitivityCaptureAll,
214+
exporter,
215+
)
216+
if err != nil {
217+
log.Fatal().Err(err).Msg("failed to create tracer")
218+
}
219+
220+
span, _ := tracer.StartTransactionSpan(context.TODO(), txID, "")
221+
defer span.End()
222+
223+
fvmOptions = append(
224+
fvmOptions,
225+
fvm.WithTracer(tracer),
226+
fvm.WithSpan(span),
227+
)
228+
}
229+
230+
debugger := debug.NewRemoteDebugger(
231+
chain,
232+
log.Logger,
233+
fvmOptions...,
234+
)
182235

183236
for _, blockTx := range txsResult {
184237
blockTxID := flow.Identifier(blockTx.ID())

cmd/util/cmd/rollback-executed-height/cmd/rollback_executed_height_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ func TestReExecuteBlock(t *testing.T) {
5555

5656
unittest.WithLock(t, lockManager, storage.LockInsertBlock, func(lctx lockctx.Context) error {
5757
return db.WithReaderBatchWriter(func(rw storage.ReaderBatchWriter) error {
58+
// By convention, root block has no proposer signature - implementation has to handle this edge case
5859
return blocks.BatchStore(lctx, rw, &flow.Proposal{Block: *genesis, ProposerSigData: nil})
5960
})
6061
})
@@ -209,6 +210,7 @@ func TestReExecuteBlockWithDifferentResult(t *testing.T) {
209210

210211
unittest.WithLock(t, lockManager, storage.LockInsertBlock, func(lctx lockctx.Context) error {
211212
return db.WithReaderBatchWriter(func(rw storage.ReaderBatchWriter) error {
213+
// By convention, root block has no proposer signature - implementation has to handle this edge case
212214
return blocks.BatchStore(lctx, rw, &flow.Proposal{Block: *genesis, ProposerSigData: nil})
213215
})
214216
})

0 commit comments

Comments
 (0)