diff --git a/.circleci/config.yml b/.circleci/config.yml index c2f937a9d..9100e02cd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,7 +11,7 @@ executors: resource_class: 2xlarge ubuntu: docker: - - image: ubuntu:19.10 + - image: ubuntu:20.04 commands: install-deps: @@ -748,7 +748,7 @@ workflows: filters: tags: only: - - /^v\d+\.\d+\.\d+$/ + - /^v\d+\.\d+\.\d+(-rc\d+)?$/ - test-conformance: test-suite-name: conformance packages: "./conformance" @@ -769,28 +769,28 @@ workflows: filters: tags: only: - - /^v\d+\.\d+\.\d+$/ + - /^v\d+\.\d+\.\d+(-rc\d+)?$/ - build-ntwk-calibration: requires: - test-short filters: tags: only: - - /^v\d+\.\d+\.\d+$/ + - /^v\d+\.\d+\.\d+(-rc\d+)?$/ - build-ntwk-butterfly: requires: - test-short filters: tags: only: - - /^v\d+\.\d+\.\d+$/ + - /^v\d+\.\d+\.\d+(-rc\d+)?$/ - build-ntwk-nerpa: requires: - test-short filters: tags: only: - - /^v\d+\.\d+\.\d+$/ + - /^v\d+\.\d+\.\d+(-rc\d+)?$/ - build-lotus-soup - build-macos: requires: @@ -801,7 +801,7 @@ workflows: - /.*/ tags: only: - - /^v\d+\.\d+\.\d+$/ + - /^v\d+\.\d+\.\d+(-rc\d+)?$/ - publish: requires: - build-all @@ -812,7 +812,7 @@ workflows: - /.*/ tags: only: - - /^v\d+\.\d+\.\d+$/ + - /^v\d+\.\d+\.\d+(-rc\d+)?$/ - build-and-push-image: dockerfile: Dockerfile.lotus path: . @@ -827,7 +827,7 @@ workflows: - /.*/ tags: only: - - /^v\d+\.\d+\.\d+$/ + - /^v\d+\.\d+\.\d+(-rc\d+)?$/ - publish-packer-calibrationnet: requires: - build-ntwk-calibration @@ -837,7 +837,7 @@ workflows: - /.*/ tags: only: - - /^v\d+\.\d+\.\d+$/ + - /^v\d+\.\d+\.\d+(-rc\d+)?$/ - publish-packer-butterflynet: requires: - build-ntwk-butterfly @@ -847,7 +847,7 @@ workflows: - /.*/ tags: only: - - /^v\d+\.\d+\.\d+$/ + - /^v\d+\.\d+\.\d+(-rc\d+)?$/ - publish-packer-nerpanet: requires: - build-ntwk-nerpa @@ -857,4 +857,4 @@ workflows: - /.*/ tags: only: - - /^v\d+\.\d+\.\d+$/ + - /^v\d+\.\d+\.\d+(-rc\d+)?$/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 55534ff05..a2f127c90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,218 @@ # Lotus changelog -# 1.8.0 / 2021-04-27 + +# 1.9.0 / 2021-05-17 + +This is an optional Lotus release that introduces various improvements to the sealing, mining, and deal-making processes. + +## Highlights + +- OpenRPC Support (https://github.com/filecoin-project/lotus/pull/5843) +- Take latency into account when making interactive deals (https://github.com/filecoin-project/lotus/pull/5876) +- Update go-commp-utils for >10x faster client commp calculation (https://github.com/filecoin-project/lotus/pull/5892) +- add `lotus client cancel-retrieval` cmd to lotus CLI (https://github.com/filecoin-project/lotus/pull/5871) +- add `inspect-deal` command to `lotus client` (https://github.com/filecoin-project/lotus/pull/5833) +- Local retrieval support (https://github.com/filecoin-project/lotus/pull/5917) +- go-fil-markets v1.1.9 -> v1.2.5 + - For a detailed changelog see https://github.com/filecoin-project/go-fil-markets/blob/master/CHANGELOG.md +- rust-fil-proofs v5.4.1 -> v7.0.1 + - For a detailed changelog see https://github.com/filecoin-project/rust-fil-proofs/blob/master/CHANGELOG.md + +## Changes +- storagefsm: Apply global events even in broken states (https://github.com/filecoin-project/lotus/pull/5962) +- Default the AlwaysKeepUnsealedCopy flag to true (https://github.com/filecoin-project/lotus/pull/5743) +- splitstore: compact hotstore prior to garbage collection (https://github.com/filecoin-project/lotus/pull/5778) +- ipfs-force bootstrapper update (https://github.com/filecoin-project/lotus/pull/5799) +- better logging when unsealing fails (https://github.com/filecoin-project/lotus/pull/5851) +- perf: add cache for gas permium estimation (https://github.com/filecoin-project/lotus/pull/5709) +- backupds: Compact log on restart (https://github.com/filecoin-project/lotus/pull/5875) +- backupds: Improve truncated log handling (https://github.com/filecoin-project/lotus/pull/5891) +- State CLI improvements (State CLI improvements) +- API proxy struct codegen (https://github.com/filecoin-project/lotus/pull/5854) +- move DI stuff for paychmgr into modules (https://github.com/filecoin-project/lotus/pull/5791) +- Implement Event observer and Settings for 3rd party dep injection (https://github.com/filecoin-project/lotus/pull/5693) +- Export developer and network commands for consumption by derivatives of Lotus (https://github.com/filecoin-project/lotus/pull/5864) +- mock sealer: Simulate randomness sideeffects (https://github.com/filecoin-project/lotus/pull/5805) +- localstorage: Demote reservation stat error to debug (https://github.com/filecoin-project/lotus/pull/5976) +- shed command to unpack miner info dumps (https://github.com/filecoin-project/lotus/pull/5800) +- Add two utils to Lotus-shed (https://github.com/filecoin-project/lotus/pull/5867) +- add shed election estimate command (https://github.com/filecoin-project/lotus/pull/5092) +- Add --actor flag in lotus-shed sectors terminate (https://github.com/filecoin-project/lotus/pull/5819) +- Move lotus mpool clear to lotus-shed (https://github.com/filecoin-project/lotus/pull/5900) +- Centralize everything on ipfs/go-log/v2 (https://github.com/filecoin-project/lotus/pull/5974) +- expose NextID from nice market actor interface (https://github.com/filecoin-project/lotus/pull/5850) +- add available options for perm on error (https://github.com/filecoin-project/lotus/pull/5814) +- API docs clarification: Document StateSearchMsg replaced message behavior (https://github.com/filecoin-project/lotus/pull/5838) +- api: Document StateReplay replaced message behavior (https://github.com/filecoin-project/lotus/pull/5840) +- add godocs to miner objects (https://github.com/filecoin-project/lotus/pull/2184) +- Add description to the client deal CLI command (https://github.com/filecoin-project/lotus/pull/5999) +- lint: don't skip builtin (https://github.com/filecoin-project/lotus/pull/5881) +- use deal duration from actors (https://github.com/filecoin-project/lotus/pull/5270) +- remote calc winningpost proof (https://github.com/filecoin-project/lotus/pull/5884) +- packer: other network images (https://github.com/filecoin-project/lotus/pull/5930) +- Convert the chainstore lock to RW (https://github.com/filecoin-project/lotus/pull/5971) +- Remove CachedBlockstore (https://github.com/filecoin-project/lotus/pull/5972) +- remove messagepool CapGasFee duplicate code (https://github.com/filecoin-project/lotus/pull/5992) +- Add a mining-heartbeat INFO line at every epoch (https://github.com/filecoin-project/lotus/pull/6183) +- chore(ci): Enable build on RC tags (https://github.com/filecoin-project/lotus/pull/6245) +- Upgrade nerpa to actor v4 and bump the version to rc4 (https://github.com/filecoin-project/lotus/pull/6249) +## Fixes +- return buffers after canceling badger operation (https://github.com/filecoin-project/lotus/pull/5796) +- avoid holding a lock while calling the View callback (https://github.com/filecoin-project/lotus/pull/5792) +- storagefsm: Trigger input processing when below limits (https://github.com/filecoin-project/lotus/pull/5801) +- After importing a previously deleted key, be able to delete it again (https://github.com/filecoin-project/lotus/pull/4653) +- fix StateManager.Replay on reward actor (https://github.com/filecoin-project/lotus/pull/5804) +- make sure atomic 64bit fields are 64bit aligned (https://github.com/filecoin-project/lotus/pull/5794) +- Import secp sigs in paych tests (https://github.com/filecoin-project/lotus/pull/5879) +- fix ci build-macos (https://github.com/filecoin-project/lotus/pull/5934) +- Fix creation of remainder account when it's not a multisig (https://github.com/filecoin-project/lotus/pull/5807) +- Fix fallback chainstore (https://github.com/filecoin-project/lotus/pull/6003) +- fix 4857: show help for set-addrs (https://github.com/filecoin-project/lotus/pull/5943) +- fix health report (https://github.com/filecoin-project/lotus/pull/6011) +- fix(ci): Use recent ubuntu LTS release; Update release params ((https://github.com/filecoin-project/lotus/pull/6011)) + +# 1.9.0-rc4 / 2021-05-13 + +This is an optional Lotus release that introduces various improvements to the sealing, mining, and deal-making processes. + +## Highlights + +- OpenRPC Support (https://github.com/filecoin-project/lotus/pull/5843) +- Take latency into account when making interactive deals (https://github.com/filecoin-project/lotus/pull/5876) +- Update go-commp-utils for >10x faster client commp calculation (https://github.com/filecoin-project/lotus/pull/5892) +- add `lotus client cancel-retrieval` cmd to lotus CLI (https://github.com/filecoin-project/lotus/pull/5871) +- add `inspect-deal` command to `lotus client` (https://github.com/filecoin-project/lotus/pull/5833) +- Local retrieval support (https://github.com/filecoin-project/lotus/pull/5917) +- go-fil-markets v1.1.9 -> v1.2.5 + - For a detailed changelog see https://github.com/filecoin-project/go-fil-markets/blob/master/CHANGELOG.md +- rust-fil-proofs v5.4.1 -> v7.0.1 + - For a detailed changelog see https://github.com/filecoin-project/rust-fil-proofs/blob/master/CHANGELOG.md + +## Changes +- storagefsm: Apply global events even in broken states (https://github.com/filecoin-project/lotus/pull/5962) +- Default the AlwaysKeepUnsealedCopy flag to true (https://github.com/filecoin-project/lotus/pull/5743) +- splitstore: compact hotstore prior to garbage collection (https://github.com/filecoin-project/lotus/pull/5778) +- ipfs-force bootstrapper update (https://github.com/filecoin-project/lotus/pull/5799) +- better logging when unsealing fails (https://github.com/filecoin-project/lotus/pull/5851) +- perf: add cache for gas permium estimation (https://github.com/filecoin-project/lotus/pull/5709) +- backupds: Compact log on restart (https://github.com/filecoin-project/lotus/pull/5875) +- backupds: Improve truncated log handling (https://github.com/filecoin-project/lotus/pull/5891) +- State CLI improvements (State CLI improvements) +- API proxy struct codegen (https://github.com/filecoin-project/lotus/pull/5854) +- move DI stuff for paychmgr into modules (https://github.com/filecoin-project/lotus/pull/5791) +- Implement Event observer and Settings for 3rd party dep injection (https://github.com/filecoin-project/lotus/pull/5693) +- Export developer and network commands for consumption by derivatives of Lotus (https://github.com/filecoin-project/lotus/pull/5864) +- mock sealer: Simulate randomness sideeffects (https://github.com/filecoin-project/lotus/pull/5805) +- localstorage: Demote reservation stat error to debug (https://github.com/filecoin-project/lotus/pull/5976) +- shed command to unpack miner info dumps (https://github.com/filecoin-project/lotus/pull/5800) +- Add two utils to Lotus-shed (https://github.com/filecoin-project/lotus/pull/5867) +- add shed election estimate command (https://github.com/filecoin-project/lotus/pull/5092) +- Add --actor flag in lotus-shed sectors terminate (https://github.com/filecoin-project/lotus/pull/5819) +- Move lotus mpool clear to lotus-shed (https://github.com/filecoin-project/lotus/pull/5900) +- Centralize everything on ipfs/go-log/v2 (https://github.com/filecoin-project/lotus/pull/5974) +- expose NextID from nice market actor interface (https://github.com/filecoin-project/lotus/pull/5850) +- add available options for perm on error (https://github.com/filecoin-project/lotus/pull/5814) +- API docs clarification: Document StateSearchMsg replaced message behavior (https://github.com/filecoin-project/lotus/pull/5838) +- api: Document StateReplay replaced message behavior (https://github.com/filecoin-project/lotus/pull/5840) +- add godocs to miner objects (https://github.com/filecoin-project/lotus/pull/2184) +- Add description to the client deal CLI command (https://github.com/filecoin-project/lotus/pull/5999) +- lint: don't skip builtin (https://github.com/filecoin-project/lotus/pull/5881) +- use deal duration from actors (https://github.com/filecoin-project/lotus/pull/5270) +- remote calc winningpost proof (https://github.com/filecoin-project/lotus/pull/5884) +- packer: other network images (https://github.com/filecoin-project/lotus/pull/5930) +- Convert the chainstore lock to RW (https://github.com/filecoin-project/lotus/pull/5971) +- Remove CachedBlockstore (https://github.com/filecoin-project/lotus/pull/5972) +- remove messagepool CapGasFee duplicate code (https://github.com/filecoin-project/lotus/pull/5992) +- Add a mining-heartbeat INFO line at every epoch (https://github.com/filecoin-project/lotus/pull/6183) +- chore(ci): Enable build on RC tags (https://github.com/filecoin-project/lotus/pull/6245) +- Upgrade nerpa to actor v4 and bump the version to rc4 (https://github.com/filecoin-project/lotus/pull/6249) +## Fixes +- return buffers after canceling badger operation (https://github.com/filecoin-project/lotus/pull/5796) +- avoid holding a lock while calling the View callback (https://github.com/filecoin-project/lotus/pull/5792) +- storagefsm: Trigger input processing when below limits (https://github.com/filecoin-project/lotus/pull/5801) +- After importing a previously deleted key, be able to delete it again (https://github.com/filecoin-project/lotus/pull/4653) +- fix StateManager.Replay on reward actor (https://github.com/filecoin-project/lotus/pull/5804) +- make sure atomic 64bit fields are 64bit aligned (https://github.com/filecoin-project/lotus/pull/5794) +- Import secp sigs in paych tests (https://github.com/filecoin-project/lotus/pull/5879) +- fix ci build-macos (https://github.com/filecoin-project/lotus/pull/5934) +- Fix creation of remainder account when it's not a multisig (https://github.com/filecoin-project/lotus/pull/5807) +- Fix fallback chainstore (https://github.com/filecoin-project/lotus/pull/6003) +- fix 4857: show help for set-addrs (https://github.com/filecoin-project/lotus/pull/5943) +- fix health report (https://github.com/filecoin-project/lotus/pull/6011) + + +# 1.9.0-rc2 / 2021-04-30 + +This is an optional Lotus release that introduces various improvements to the sealing, mining, and deal-making processes. + +## Highlights + +- OpenRPC Support (https://github.com/filecoin-project/lotus/pull/5843) +- Take latency into account when making interactive deals (https://github.com/filecoin-project/lotus/pull/5876) +- Update go-commp-utils for >10x faster client commp calculation (https://github.com/filecoin-project/lotus/pull/5892) +- add `lotus client cancel-retrieval` cmd to lotus CLI (https://github.com/filecoin-project/lotus/pull/5871) +- add `inspect-deal` command to `lotus client` (https://github.com/filecoin-project/lotus/pull/5833) +- Local retrieval support (https://github.com/filecoin-project/lotus/pull/5917) +- go-fil-markets v1.1.9 -> v1.2.5 + - For a detailed changelog see https://github.com/filecoin-project/go-fil-markets/blob/master/CHANGELOG.md +- rust-fil-proofs v5.4.1 -> v7 + - For a detailed changelog see https://github.com/filecoin-project/rust-fil-proofs/blob/master/CHANGELOG.md + +## Changes +- storagefsm: Apply global events even in broken states (https://github.com/filecoin-project/lotus/pull/5962) +- Default the AlwaysKeepUnsealedCopy flag to true (https://github.com/filecoin-project/lotus/pull/5743) +- splitstore: compact hotstore prior to garbage collection (https://github.com/filecoin-project/lotus/pull/5778) +- ipfs-force bootstrapper update (https://github.com/filecoin-project/lotus/pull/5799) +- better logging when unsealing fails (https://github.com/filecoin-project/lotus/pull/5851) +- perf: add cache for gas permium estimation (https://github.com/filecoin-project/lotus/pull/5709) +- backupds: Compact log on restart (https://github.com/filecoin-project/lotus/pull/5875) +- backupds: Improve truncated log handling (https://github.com/filecoin-project/lotus/pull/5891) +- State CLI improvements (State CLI improvements) +- API proxy struct codegen (https://github.com/filecoin-project/lotus/pull/5854) +- move DI stuff for paychmgr into modules (https://github.com/filecoin-project/lotus/pull/5791) +- Implement Event observer and Settings for 3rd party dep injection (https://github.com/filecoin-project/lotus/pull/5693) +- Export developer and network commands for consumption by derivatives of Lotus (https://github.com/filecoin-project/lotus/pull/5864) +- mock sealer: Simulate randomness sideeffects (https://github.com/filecoin-project/lotus/pull/5805) +- localstorage: Demote reservation stat error to debug (https://github.com/filecoin-project/lotus/pull/5976) +- shed command to unpack miner info dumps (https://github.com/filecoin-project/lotus/pull/5800) +- Add two utils to Lotus-shed (https://github.com/filecoin-project/lotus/pull/5867) +- add shed election estimate command (https://github.com/filecoin-project/lotus/pull/5092) +- Add --actor flag in lotus-shed sectors terminate (https://github.com/filecoin-project/lotus/pull/5819) +- Move lotus mpool clear to lotus-shed (https://github.com/filecoin-project/lotus/pull/5900) +- Centralize everything on ipfs/go-log/v2 (https://github.com/filecoin-project/lotus/pull/5974) +- expose NextID from nice market actor interface (https://github.com/filecoin-project/lotus/pull/5850) +- add available options for perm on error (https://github.com/filecoin-project/lotus/pull/5814) +- API docs clarification: Document StateSearchMsg replaced message behavior (https://github.com/filecoin-project/lotus/pull/5838) +- api: Document StateReplay replaced message behavior (https://github.com/filecoin-project/lotus/pull/5840) +- add godocs to miner objects (https://github.com/filecoin-project/lotus/pull/2184) +- Add description to the client deal CLI command (https://github.com/filecoin-project/lotus/pull/5999) +- lint: don't skip builtin (https://github.com/filecoin-project/lotus/pull/5881) +- use deal duration from actors (https://github.com/filecoin-project/lotus/pull/5270) +- remote calc winningpost proof (https://github.com/filecoin-project/lotus/pull/5884) +- packer: other network images (https://github.com/filecoin-project/lotus/pull/5930) +- Convert the chainstore lock to RW (https://github.com/filecoin-project/lotus/pull/5971) +- Remove CachedBlockstore (https://github.com/filecoin-project/lotus/pull/5972) +- remove messagepool CapGasFee duplicate code (https://github.com/filecoin-project/lotus/pull/5992) + +## Fixes +- return buffers after canceling badger operation (https://github.com/filecoin-project/lotus/pull/5796) +- avoid holding a lock while calling the View callback (https://github.com/filecoin-project/lotus/pull/5792) +- storagefsm: Trigger input processing when below limits (https://github.com/filecoin-project/lotus/pull/5801) +- After importing a previously deleted key, be able to delete it again (https://github.com/filecoin-project/lotus/pull/4653) +- fix StateManager.Replay on reward actor (https://github.com/filecoin-project/lotus/pull/5804) +- make sure atomic 64bit fields are 64bit aligned (https://github.com/filecoin-project/lotus/pull/5794) +- Import secp sigs in paych tests (https://github.com/filecoin-project/lotus/pull/5879) +- fix ci build-macos (https://github.com/filecoin-project/lotus/pull/5934) +- Fix creation of remainder account when it's not a multisig (https://github.com/filecoin-project/lotus/pull/5807) +- Fix fallback chainstore (https://github.com/filecoin-project/lotus/pull/6003) +- fix 4857: show help for set-addrs (https://github.com/filecoin-project/lotus/pull/5943) +- fix health report (https://github.com/filecoin-project/lotus/pull/6011) + +# 1.8.0 / 2021-04-05 This is a mandatory release of Lotus that upgrades the network to version 12, which introduces various performance improvements to the cron processing of the power actor. The network will upgrade at height 712320, which is 2021-04-29T06:00:00Z. -## Changes +## Changes - v4 specs-actors integration, nv12 migration (https://github.com/filecoin-project/lotus/pull/6116) diff --git a/build/params_nerpanet.go b/build/params_nerpanet.go index fb6cfc47a..4587e81f8 100644 --- a/build/params_nerpanet.go +++ b/build/params_nerpanet.go @@ -40,8 +40,8 @@ const UpgradeClausHeight = 250 const UpgradeOrangeHeight = 300 const UpgradeActorsV3Height = 600 -const UpgradeNorwegianHeight = 999999 -const UpgradeActorsV4Height = 99999999 +const UpgradeNorwegianHeight = 201000 +const UpgradeActorsV4Height = 203000 func init() { // Minimum block production power is set to 4 TiB diff --git a/build/version.go b/build/version.go index 84f49ead8..e66f3f842 100644 --- a/build/version.go +++ b/build/version.go @@ -29,7 +29,8 @@ func buildType() string { } // BuildVersion is the local build version, set by build system -const BuildVersion = "1.11.0-dev" +const BuildVersion = "1.9.0" + func UserVersion() string { return BuildVersion + buildType() + CurrentCommit diff --git a/chain/actors/policy/policy.go b/chain/actors/policy/policy.go index f210b8d94..07f489b11 100644 --- a/chain/actors/policy/policy.go +++ b/chain/actors/policy/policy.go @@ -187,6 +187,7 @@ func GetWinningPoStSectorSetLookback(nwVer network.Version) abi.ChainEpoch { return 10 } + // NOTE: if this ever changes, adjust it in a (*Miner).mineOne() logline as well return ChainFinality } diff --git a/chain/gen/gen.go b/chain/gen/gen.go index d06c755fa..b4e04424c 100644 --- a/chain/gen/gen.go +++ b/chain/gen/gen.go @@ -3,6 +3,7 @@ package gen import ( "bytes" "context" + "encoding/base64" "fmt" "io" "io/ioutil" @@ -610,6 +611,8 @@ func (wpp *wppProvider) ComputeProof(context.Context, []proof2.SectorInfo, abi.P return ValidWpostForTesting, nil } +var b64 = base64.URLEncoding.WithPadding(base64.NoPadding) + func IsRoundWinner(ctx context.Context, ts *types.TipSet, round abi.ChainEpoch, miner address.Address, brand types.BeaconEntry, mbi *api.MiningBaseInfo, a MiningCheckAPI) (*types.ElectionProof, error) { @@ -631,6 +634,15 @@ func IsRoundWinner(ctx context.Context, ts *types.TipSet, round abi.ChainEpoch, ep := &types.ElectionProof{VRFProof: vrfout} j := ep.ComputeWinCount(mbi.MinerPower, mbi.NetworkPower) ep.WinCount = j + + log.Infow("completed winAttemptVRF", + "beaconRound", brand.Round, + "beaconDataB64", b64.EncodeToString(brand.Data), + "electionRandB64", b64.EncodeToString(electionRand), + "vrfB64", b64.EncodeToString(vrfout), + "winCount", j, + ) + if j < 1 { return nil, nil } diff --git a/extern/filecoin-ffi b/extern/filecoin-ffi index d82899449..dc4e4e8dc 160000 --- a/extern/filecoin-ffi +++ b/extern/filecoin-ffi @@ -1 +1 @@ -Subproject commit d82899449741ce190e950a3582ebe33806f018a9 +Subproject commit dc4e4e8dc9554dedb6f48304f7f0c6328331f9ec diff --git a/miner/miner.go b/miner/miner.go index e7e012d7c..a77e1c18b 100644 --- a/miner/miner.go +++ b/miner/miner.go @@ -13,6 +13,7 @@ import ( proof2 "github.com/filecoin-project/specs-actors/v2/actors/runtime/proof" + "github.com/filecoin-project/lotus/chain/actors/policy" "github.com/filecoin-project/lotus/chain/gen/slashfilter" "github.com/filecoin-project/go-address" @@ -425,8 +426,25 @@ func (m *Miner) mineOne(ctx context.Context, base *MiningBase) (*types.BlockMsg, return nil, xerrors.Errorf("failed to get mining base info: %w", err) } if mbi == nil { + log.Warnf("mineOne: unexpectedly nil MiningBaseInfo for round %d, off tipset %d/%s", round, base.TipSet.Height(), base.TipSet.Key().String()) return nil, nil } + + // always write out a log from this point out + var winner *types.ElectionProof + defer func() { + log.Infow( + "completed mineOne", + "forRound", int64(round), + "baseEpoch", int64(base.TipSet.Height()), + "lookbackEpochs", int64(policy.ChainFinality), // hardcoded as it is unlikely to change again: https://github.com/filecoin-project/lotus/blob/v1.8.0/chain/actors/policy/policy.go#L180-L186 + "networkPowerAtLookback", mbi.NetworkPower.String(), + "minerPowerAtLookback", mbi.MinerPower.String(), + "isEligible", mbi.EligibleForMining, + "isWinner", (winner != nil), + ) + }() + if !mbi.EligibleForMining { // slashed or just have no power yet return nil, nil @@ -453,7 +471,7 @@ func (m *Miner) mineOne(ctx context.Context, base *MiningBase) (*types.BlockMsg, return nil, xerrors.Errorf("scratching ticket failed: %w", err) } - winner, err := gen.IsRoundWinner(ctx, base.TipSet, round, m.address, rbase, mbi, m.api) + winner, err = gen.IsRoundWinner(ctx, base.TipSet, round, m.address, rbase, mbi, m.api) if err != nil { return nil, xerrors.Errorf("failed to check if we win next round: %w", err) } @@ -505,7 +523,7 @@ func (m *Miner) mineOne(ctx context.Context, base *MiningBase) (*types.BlockMsg, for i, header := range base.TipSet.Blocks() { parentMiners[i] = header.Miner } - log.Infow("mined new block", "cid", b.Cid(), "height", b.Header.Height, "miner", b.Header.Miner, "parents", parentMiners, "took", dur) + log.Infow("mined new block", "cid", b.Cid(), "height", int64(b.Header.Height), "miner", b.Header.Miner, "parents", parentMiners, "parentTipset", base.TipSet.Key().String(), "took", dur) if dur > time.Second*time.Duration(build.BlockDelaySecs) { log.Warnw("CAUTION: block production took longer than the block delay. Your computer may not be fast enough to keep up", "tMinerBaseInfo ", tMBI.Sub(start), diff --git a/scripts/publish-release.sh b/scripts/publish-release.sh index 103de1f0f..e77a6a949 100755 --- a/scripts/publish-release.sh +++ b/scripts/publish-release.sh @@ -32,6 +32,7 @@ if [ "${RELEASE_ID}" = "null" ]; then RELEASE_DATA="{ \"tag_name\": \"${CIRCLE_TAG}\", \"target_commitish\": \"${CIRCLE_SHA1}\", + \"discussion_category_name\": \"announcement\", \"name\": \"${CIRCLE_TAG}\", \"body\": \"\", \"prerelease\": false @@ -51,8 +52,9 @@ else fi RELEASE_UPLOAD_URL=`echo "${RELEASE_RESPONSE}" | jq -r '.upload_url' | cut -d'{' -f1` +echo "Preparing to send artifacts to ${RELEASE_UPLOAD_URL}" -bundles=( +artifacts=( "lotus_${CIRCLE_TAG}_linux-amd64.tar.gz" "lotus_${CIRCLE_TAG}_linux-amd64.tar.gz.cid" "lotus_${CIRCLE_TAG}_linux-amd64.tar.gz.sha512" @@ -60,9 +62,10 @@ bundles=( "lotus_${CIRCLE_TAG}_darwin-amd64.tar.gz.cid" "lotus_${CIRCLE_TAG}_darwin-amd64.tar.gz.sha512" ) -for RELEASE_FILE in "${bundles[@]}" + +for RELEASE_FILE in "${artifacts[@]}" do - echo "Uploading release bundle: ${RELEASE_FILE}" + echo "Uploading ${RELEASE_FILE}..." curl \ --request POST \ --header "Authorization: token ${GITHUB_TOKEN}" \ @@ -70,7 +73,7 @@ do --data-binary "@${RELEASE_FILE}" \ "$RELEASE_UPLOAD_URL?name=$(basename "${RELEASE_FILE}")" - echo "Release bundle uploaded: ${RELEASE_FILE}" + echo "Uploaded ${RELEASE_FILE}" done popd