Skip to content

Commit

Permalink
Merge pull request #6397 from filecoin-project/feat/nv24
Browse files Browse the repository at this point in the history
Feat/nv24
  • Loading branch information
simlecode authored Oct 14, 2024
2 parents 8b23108 + f8a7c9c commit 9a0bd54
Show file tree
Hide file tree
Showing 199 changed files with 6,524 additions and 1,339 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ commands:
executors:
golang:
docker:
- image: cimg/go:1.21.7
- image: cimg/go:1.22.8

jobs:
test_all:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/baisc_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
go-version: '1.22'
cache: true

- name: install deps
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/common_build_upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
go-version: '1.22'
cache: true

- name: install deps
Expand Down Expand Up @@ -237,7 +237,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
go-version: '1.22'
cache: true

- name: install more deps
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/common_go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
go-version: '1.22'
cache: true

- name: vars
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
go-version: '1.22'
cache: true

- name: install deps
Expand Down
2 changes: 1 addition & 1 deletion app/node/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func (b *Builder) build(ctx context.Context) (*Node, error) {
return nil, errors.Wrap(err, "failed to build node.wallet")
}

nd.f3, err = f3.NewF3Submodule(ctx, nd.repo, nd.chain, nd.network, nd.wallet.API())
nd.f3, err = f3.NewF3Submodule(ctx, nd.repo, nd.chain, nd.network, nd.wallet.GetWalletSign(), nd.syncer)
if err != nil {
return nil, errors.Wrap(err, "failed to build node.f3")
}
Expand Down
6 changes: 6 additions & 0 deletions app/node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,12 @@ func (node *Node) Stop(ctx context.Context) {
log.Warnf("error shutdown jaeger-tracing: %w", err)
}
}

node.Wallet().WalletGateway.Close()

if err := node.f3.Stop(ctx); err != nil {
log.Warnf("error closing f3: %w", err)
}
}

// RunRPCAndWait start rpc server and listen to signal to exit
Expand Down
16 changes: 16 additions & 0 deletions app/submodule/chain/chaininfo_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,21 @@ func (cia *chainInfoAPI) VerifyEntry(parent, child *types.BeaconEntry, height ab
// the entry has not yet been produced, the call will block until the entry
// becomes available
func (cia *chainInfoAPI) StateGetBeaconEntry(ctx context.Context, epoch abi.ChainEpoch) (*types.BeaconEntry, error) {
ts := cia.chain.ChainReader.GetHead()
if epoch <= ts.Height() {
if epoch < 0 {
epoch = 0
}
// get the beacon entry off the chain
ts, err := cia.chain.ChainReader.GetTipSet(ctx, types.EmptyTSK)
if err != nil {
return nil, err
}
r := chain.NewChainRandomnessSource(cia.chain.ChainReader, ts.Key(), cia.chain.Drand, cia.chain.Fork.GetNetworkVersion)
return r.GetBeaconEntry(ctx, epoch)
}

// else we're asking for the future, get it from drand and block until it arrives
b := cia.chain.Drand.BeaconForEpoch(epoch)
nv := cia.chain.Fork.GetNetworkVersion(ctx, epoch)
rr := b.MaxBeaconRoundForEpoch(nv, epoch)
Expand Down Expand Up @@ -745,6 +760,7 @@ func (cia *chainInfoAPI) StateGetNetworkParams(ctx context.Context) (*types.Netw
UpgradeDragonHeight: cfg.NetworkParams.ForkUpgradeParam.UpgradeDragonHeight,
UpgradePhoenixHeight: cfg.NetworkParams.ForkUpgradeParam.UpgradePhoenixHeight,
UpgradeWaffleHeight: cfg.NetworkParams.ForkUpgradeParam.UpgradeWaffleHeight,
UpgradeTuktukHeight: cfg.NetworkParams.ForkUpgradeParam.UpgradeTuktukHeight,
},
Eip155ChainID: cfg.NetworkParams.Eip155ChainID,
}
Expand Down
Loading

0 comments on commit 9a0bd54

Please sign in to comment.