Skip to content

Commit 9a0bd54

Browse files
authored
Merge pull request #6397 from filecoin-project/feat/nv24
Feat/nv24
2 parents 8b23108 + f8a7c9c commit 9a0bd54

File tree

199 files changed

+6524
-1339
lines changed

Some content is hidden

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

199 files changed

+6524
-1339
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ commands:
7272
executors:
7373
golang:
7474
docker:
75-
- image: cimg/go:1.21.7
75+
- image: cimg/go:1.22.8
7676

7777
jobs:
7878
test_all:

.github/workflows/baisc_checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Set up Go
1919
uses: actions/setup-go@v5
2020
with:
21-
go-version: '1.21'
21+
go-version: '1.22'
2222
cache: true
2323

2424
- name: install deps

.github/workflows/common_build_upload.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ jobs:
108108
- name: Set up Go
109109
uses: actions/setup-go@v5
110110
with:
111-
go-version: '1.21'
111+
go-version: '1.22'
112112
cache: true
113113

114114
- name: install deps
@@ -237,7 +237,7 @@ jobs:
237237
- name: Set up Go
238238
uses: actions/setup-go@v5
239239
with:
240-
go-version: '1.21'
240+
go-version: '1.22'
241241
cache: true
242242

243243
- name: install more deps

.github/workflows/common_go.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Set up Go
2828
uses: actions/setup-go@v5
2929
with:
30-
go-version: '1.21'
30+
go-version: '1.22'
3131
cache: true
3232

3333
- name: vars

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Set up Go
2222
uses: actions/setup-go@v5
2323
with:
24-
go-version: '1.21'
24+
go-version: '1.22'
2525
cache: true
2626

2727
- name: install deps

app/node/builder.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ func (b *Builder) build(ctx context.Context) (*Node, error) {
137137
return nil, errors.Wrap(err, "failed to build node.wallet")
138138
}
139139

140-
nd.f3, err = f3.NewF3Submodule(ctx, nd.repo, nd.chain, nd.network, nd.wallet.API())
140+
nd.f3, err = f3.NewF3Submodule(ctx, nd.repo, nd.chain, nd.network, nd.wallet.GetWalletSign(), nd.syncer)
141141
if err != nil {
142142
return nil, errors.Wrap(err, "failed to build node.f3")
143143
}

app/node/node.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,12 @@ func (node *Node) Stop(ctx context.Context) {
249249
log.Warnf("error shutdown jaeger-tracing: %w", err)
250250
}
251251
}
252+
253+
node.Wallet().WalletGateway.Close()
254+
255+
if err := node.f3.Stop(ctx); err != nil {
256+
log.Warnf("error closing f3: %w", err)
257+
}
252258
}
253259

254260
// RunRPCAndWait start rpc server and listen to signal to exit

app/submodule/chain/chaininfo_api.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,21 @@ func (cia *chainInfoAPI) VerifyEntry(parent, child *types.BeaconEntry, height ab
349349
// the entry has not yet been produced, the call will block until the entry
350350
// becomes available
351351
func (cia *chainInfoAPI) StateGetBeaconEntry(ctx context.Context, epoch abi.ChainEpoch) (*types.BeaconEntry, error) {
352+
ts := cia.chain.ChainReader.GetHead()
353+
if epoch <= ts.Height() {
354+
if epoch < 0 {
355+
epoch = 0
356+
}
357+
// get the beacon entry off the chain
358+
ts, err := cia.chain.ChainReader.GetTipSet(ctx, types.EmptyTSK)
359+
if err != nil {
360+
return nil, err
361+
}
362+
r := chain.NewChainRandomnessSource(cia.chain.ChainReader, ts.Key(), cia.chain.Drand, cia.chain.Fork.GetNetworkVersion)
363+
return r.GetBeaconEntry(ctx, epoch)
364+
}
365+
366+
// else we're asking for the future, get it from drand and block until it arrives
352367
b := cia.chain.Drand.BeaconForEpoch(epoch)
353368
nv := cia.chain.Fork.GetNetworkVersion(ctx, epoch)
354369
rr := b.MaxBeaconRoundForEpoch(nv, epoch)
@@ -745,6 +760,7 @@ func (cia *chainInfoAPI) StateGetNetworkParams(ctx context.Context) (*types.Netw
745760
UpgradeDragonHeight: cfg.NetworkParams.ForkUpgradeParam.UpgradeDragonHeight,
746761
UpgradePhoenixHeight: cfg.NetworkParams.ForkUpgradeParam.UpgradePhoenixHeight,
747762
UpgradeWaffleHeight: cfg.NetworkParams.ForkUpgradeParam.UpgradeWaffleHeight,
763+
UpgradeTuktukHeight: cfg.NetworkParams.ForkUpgradeParam.UpgradeTuktukHeight,
748764
},
749765
Eip155ChainID: cfg.NetworkParams.Eip155ChainID,
750766
}

0 commit comments

Comments
 (0)