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

chore: release: update changelog with latests backports #11562

Merged
merged 5 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

## Improvements

# v1.25.2 / 2024-01-04
# v1.25.2 / 2024-01-11

This is an optional feature release of Lotus. It introduces Lotus-Provider in its alpha testing phase, and includes fixes for synchronization issues that users experienced during the network upgrade.
This is an optional but **highly recommended feature release** of Lotus, as it includes fixes for synchronizations issues that users have experienced. The feature release also introduces `Lotus-Provider` in its alpha testing phase, as well as the ability to call external PC2-binaries during the sealing process.

## ☢️ Upgrade Warnings ☢️

Expand Down Expand Up @@ -107,12 +107,15 @@ For more information on how to use SupraSeal PC2 with your `lotus-worker`, as we
- feat: syncer: optimize syncFork for one-epoch forks ([filecoin-project/lotus#11533](https://github.com/filecoin-project/lotus/pull/11533))
- fix: sync: do not include incoming in return of syncFork ([filecoin-project/lotus#11541](https://github.com/filecoin-project/lotus/pull/11541))
- fix: wdpost: fix vanilla proof indexes ([filecoin-project/lotus#11550](https://github.com/filecoin-project/lotus/pull/11550))
- feat: exchange: change GetBlocks to always fetch the requested number of tipsets ([filecoin-project/lotus#11565](https://github.com/filecoin-project/lotus/pull/11565))

## Dependencies
- update go-libp2p to v0.31.0 ([filecoin-project/lotus#11225](https://github.com/filecoin-project/lotus/pull/11225))
- deps: gostatetype (#11437) ([filecoin-project/lotus#11437](https://github.com/filecoin-project/lotus/pull/11437))
- fix: deps: stop using go-libp2p deprecated peer.ID.Pretty ([filecoin-project/lotus#11263](https://github.com/filecoin-project/lotus/pull/11263))
- chore:libp2p:update libp2p deps in release-v1.25.2 to v0.31.1 ([filecoin-project/lotus#11524](https://github.com/filecoin-project/lotus/pull/11524))
- deps: update go-multiaddr to v0.12.0 ([filecoin-project/lotus#11524](https://github.com/filecoin-project/lotus/pull/11558))
- dep: go-multi-address to v0.12.1 ([filecoin-project/lotus#11564](https://github.com/filecoin-project/lotus/pull/11564))

## Others
- chore: update FFI (#11431) ([filecoin-project/lotus#11431](https://github.com/filecoin-project/lotus/pull/11431))
Expand Down Expand Up @@ -146,6 +149,7 @@ For more information on how to use SupraSeal PC2 with your `lotus-worker`, as we
- eth_filter flake debug ([filecoin-project/lotus#11261](https://github.com/filecoin-project/lotus/pull/11261))
- fix: sealing: typo in FinalizeReplicaUpdate ([filecoin-project/lotus#11255](https://github.com/filecoin-project/lotus/pull/11255))
- chore: slice loop replace (#11349) ([filecoin-project/lotus#11349](https://github.com/filecoin-project/lotus/pull/11349))
- backport: docker build fix for v1.25.2 ([filecoin-project/lotus#11560](https://github.com/filecoin-project/lotus/pull/11560))

## Contributors

Expand Down
54 changes: 39 additions & 15 deletions chain/exchange/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,16 +284,18 @@ func (c *client) validateCompressedIndices(chain []*BSTipSet) error {
len(msgs.SecpkIncludes), blocksNum)
}

blsLen := uint64(len(msgs.Bls))
secpLen := uint64(len(msgs.Secpk))
for blockIdx := 0; blockIdx < blocksNum; blockIdx++ {
for _, mi := range msgs.BlsIncludes[blockIdx] {
if int(mi) >= len(msgs.Bls) {
if mi >= blsLen {
return xerrors.Errorf("index in BlsIncludes (%d) exceeds number of messages (%d)",
mi, len(msgs.Bls))
}
}

for _, mi := range msgs.SecpkIncludes[blockIdx] {
if int(mi) >= len(msgs.Secpk) {
if mi >= secpLen {
return xerrors.Errorf("index in SecpkIncludes (%d) exceeds number of messages (%d)",
mi, len(msgs.Secpk))
}
Expand All @@ -315,18 +317,36 @@ func (c *client) GetBlocks(ctx context.Context, tsk types.TipSetKey, count int)
)
}

req := &Request{
Head: tsk.Cids(),
Length: uint64(count),
Options: Headers,
}
var ret []*types.TipSet
start := tsk.Cids()
for len(ret) < count {
req := &Request{
Head: start,
Length: uint64(count - len(ret)),
Options: Headers,
}

validRes, err := c.doRequest(ctx, req, nil, nil)
if err != nil {
return nil, err
validRes, err := c.doRequest(ctx, req, nil, nil)
if err != nil {
return nil, xerrors.Errorf("failed to doRequest: %w", err)
}

if len(validRes.tipsets) == 0 {
return nil, xerrors.Errorf("doRequest fetched zero tipsets: %w", err)
}

ret = append(ret, validRes.tipsets...)

last := validRes.tipsets[len(validRes.tipsets)-1]
if last.Height() <= 1 {
// we've walked all the way up to genesis, return
break
}

start = last.Parents().Cids()
}

return validRes.tipsets, nil
return ret, nil
}

// GetFullTipSet implements Client.GetFullTipSet(). Refer to the godocs there.
Expand All @@ -341,12 +361,16 @@ func (c *client) GetFullTipSet(ctx context.Context, peer peer.ID, tsk types.TipS

validRes, err := c.doRequest(ctx, req, &peer, nil)
if err != nil {
return nil, err
return nil, xerrors.Errorf("failed to doRequest: %w", err)
}

fullTipsets := validRes.toFullTipSets()

if len(fullTipsets) == 0 {
return nil, xerrors.New("unexpectedly got no tipsets in exchange")
}

return validRes.toFullTipSets()[0], nil
// If `doRequest` didn't fail we are guaranteed to have at least
// *one* tipset here, so it's safe to index directly.
return fullTipsets[0], nil
}

// GetChainMessages implements Client.GetChainMessages(). Refer to the godocs there.
Expand Down
4 changes: 2 additions & 2 deletions chain/exchange/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ type Server interface {
// used by the Syncer.
type Client interface {
// GetBlocks fetches block headers from the network, from the provided
// tipset *backwards*, returning as many tipsets as the count parameter,
// or less.
// tipset *backwards*, returning as many tipsets as the count parameter.
// The ONLY case in which we return fewer than `count` tipsets is if we hit genesis.
GetBlocks(ctx context.Context, tsk types.TipSetKey, count int) ([]*types.TipSet, error)

// GetChainMessages fetches messages from the network, starting from the first provided tipset
Expand Down