Skip to content

Commit

Permalink
Merge pull request #5503 from simlecode/release/v1.8.1
Browse files Browse the repository at this point in the history
Release v1.8.1
  • Loading branch information
hunjixin authored Nov 23, 2022
2 parents 343fb68 + e5f36a6 commit ea1ee8b
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# venus changelog

## v1.8.1

- 修复导入快照时写入到内存的ts root不够导致同步失败问题 [#5501](https://github.com/filecoin-project/venus/issues/5501)
12 changes: 8 additions & 4 deletions pkg/chain/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -936,14 +936,13 @@ func (store *Store) Import(ctx context.Context, r io.Reader) (*types.TipSet, err
// but in venus the head tipset is computed, so here we will fallback a pre tipset
// and the chain store must has a metadata for each tipset, below code is to build the tipset metadata

// Todo What to do if it is less than 900
var (
loopBack = 900
curTipset = root
startHeight = root.Height()
curTipset = root
)

log.Info("import height: ", root.Height(), " root: ", root.String(), " parents: ", root.At(0).Parents)
for i := 0; i < loopBack; i++ {
for {
if curTipset.Height() <= 0 {
break
}
Expand All @@ -957,6 +956,11 @@ func (store *Store) Import(ctx context.Context, r io.Reader) (*types.TipSet, err
break
}

if _, err := tree.LoadState(ctx, store.stateAndBlockSource, curTipset.At(0).ParentStateRoot); err != nil {
log.Infof("last ts height: %d, cids: %s, total import: %d", curTipset.Height(), curTipset.Key(), startHeight-curTipset.Height())
break
}

// save fake root
err = store.PutTipSetMetadata(context.Background(), &TipSetMetadata{
TipSetStateRoot: curTipset.At(0).ParentStateRoot,
Expand Down
2 changes: 1 addition & 1 deletion pkg/constants/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
)

// BuildVersion is the local build version, set by build system
const BuildVersion = "1.8.0"
const BuildVersion = "1.8.1"

var CurrentCommit string

Expand Down
2 changes: 1 addition & 1 deletion venus-devtool/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/filecoin-project/go-fil-markets v1.24.1-rc1
github.com/filecoin-project/go-jsonrpc v0.1.8
github.com/filecoin-project/go-state-types v0.9.8
github.com/filecoin-project/lotus v1.18.0-rc3.0.20221019204926-84050170b922
github.com/filecoin-project/lotus v1.18.0
github.com/filecoin-project/venus v0.0.0-00010101000000-000000000000
github.com/ipfs/go-block-format v0.0.3
github.com/ipfs/go-cid v0.2.0
Expand Down
4 changes: 2 additions & 2 deletions venus-devtool/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,8 @@ github.com/filecoin-project/go-statemachine v1.0.2 h1:421SSWBk8GIoCoWYYTE/d+qCWc
github.com/filecoin-project/go-statestore v0.2.0 h1:cRRO0aPLrxKQCZ2UOQbzFGn4WDNdofHZoGPjfNaAo5Q=
github.com/filecoin-project/go-statestore v0.2.0/go.mod h1:8sjBYbS35HwPzct7iT4lIXjLlYyPor80aU7t7a/Kspo=
github.com/filecoin-project/index-provider v0.8.1 h1:ggoBWvMSWR91HZQCWfv8SZjoTGNyJBwNMLuN9bJZrbU=
github.com/filecoin-project/lotus v1.18.0-rc3.0.20221019204926-84050170b922 h1:kI8N7+iIqpfOjhImNaZJT6MHIB66NcK6qQteNF8E8t8=
github.com/filecoin-project/lotus v1.18.0-rc3.0.20221019204926-84050170b922/go.mod h1:/kWfuN/hzqOvdzbYxaBrvN82HAQ85nRMli7KcnoSE6E=
github.com/filecoin-project/lotus v1.18.0 h1:HxdShHMEZT703n9KlQTgPVoUF/ocidMC/d3TzwxzTP8=
github.com/filecoin-project/lotus v1.18.0/go.mod h1:jJih5ApnJZssc/wWsLJm+IWnfy8YaCyaDbvs/wTIVDk=
github.com/filecoin-project/pubsub v1.0.0 h1:ZTmT27U07e54qV1mMiQo4HDr0buo8I1LDHBYLXlsNXM=
github.com/filecoin-project/pubsub v1.0.0/go.mod h1:GkpB33CcUtUNrLPhJgfdy4FDx4OMNR9k+46DHx/Lqrg=
github.com/filecoin-project/specs-actors v0.9.13/go.mod h1:TS1AW/7LbG+615j4NsjMK1qlpAwaFsG9w0V2tg2gSao=
Expand Down
4 changes: 2 additions & 2 deletions venus-shared/compatible-checks/api-diff.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ github.com/filecoin-project/venus/venus-shared/api/chain/v0.FullNode <> github.c
- StateChangedActors
- StateCompute
- StateDecodeParams
> StateGetNetworkParams {[func(context.Context) (*types.NetworkParams, error) <> func(context.Context) (*api.NetworkParams, error)] base=func out type: #0 input; nested={[*types.NetworkParams <> *api.NetworkParams] base=pointed type; nested={[types.NetworkParams <> api.NetworkParams] base=struct field; nested={[types.NetworkParams <> api.NetworkParams] base=exported field type: #5 field named ForkUpgradeParams; nested={[types.ForkUpgradeParams <> api.ForkUpgradeParams] base=struct field; nested={[types.ForkUpgradeParams <> api.ForkUpgradeParams] base=exported fields count: 21 != 20; nested=nil}}}}}}
> StateGetNetworkParams {[func(context.Context) (*types.NetworkParams, error) <> func(context.Context) (*api.NetworkParams, error)] base=func out type: #0 input; nested={[*types.NetworkParams <> *api.NetworkParams] base=pointed type; nested={[types.NetworkParams <> api.NetworkParams] base=struct field; nested={[types.NetworkParams <> api.NetworkParams] base=exported field type: #5 field named ForkUpgradeParams; nested={[types.ForkUpgradeParams <> api.ForkUpgradeParams] base=struct field; nested={[types.ForkUpgradeParams <> api.ForkUpgradeParams] base=exported fields count: 21 != 22; nested=nil}}}}}}
- StateGetRandomnessFromBeacon
- StateGetRandomnessFromTickets
- StateListMessages
Expand Down Expand Up @@ -199,7 +199,7 @@ github.com/filecoin-project/venus/venus-shared/api/chain/v1.FullNode <> github.c
+ SetPassword
- Shutdown
- StateCompute
> StateGetNetworkParams {[func(context.Context) (*types.NetworkParams, error) <> func(context.Context) (*api.NetworkParams, error)] base=func out type: #0 input; nested={[*types.NetworkParams <> *api.NetworkParams] base=pointed type; nested={[types.NetworkParams <> api.NetworkParams] base=struct field; nested={[types.NetworkParams <> api.NetworkParams] base=exported field type: #5 field named ForkUpgradeParams; nested={[types.ForkUpgradeParams <> api.ForkUpgradeParams] base=struct field; nested={[types.ForkUpgradeParams <> api.ForkUpgradeParams] base=exported fields count: 21 != 20; nested=nil}}}}}}
> StateGetNetworkParams {[func(context.Context) (*types.NetworkParams, error) <> func(context.Context) (*api.NetworkParams, error)] base=func out type: #0 input; nested={[*types.NetworkParams <> *api.NetworkParams] base=pointed type; nested={[types.NetworkParams <> api.NetworkParams] base=struct field; nested={[types.NetworkParams <> api.NetworkParams] base=exported field type: #5 field named ForkUpgradeParams; nested={[types.ForkUpgradeParams <> api.ForkUpgradeParams] base=struct field; nested={[types.ForkUpgradeParams <> api.ForkUpgradeParams] base=exported fields count: 21 != 22; nested=nil}}}}}}
+ StateMinerSectorSize
+ StateMinerWorkerAddress
- StateReplay
Expand Down

0 comments on commit ea1ee8b

Please sign in to comment.