diff --git a/CHANGELOG.md b/CHANGELOG.md index c523ab4694..fc2d347840 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ # venus changelog +## v1.14.0 + +* chore: update sophon-auth + +## v1.14.0-rc6 + +* opt: migration: set premigration to 90 minute [[#6217](https://github.com/filecoin-project/venus/pull/6217)] +* fix: light-weight patch to fix calibrationnet again by removing move_partitions from built-in actors [[#6223](https://github.com/filecoin-project/venus/pull/6223)] + +## v1.14.0-rc5 + +fix: nv21fix migration: correctly upgrade system actor [[#6215](https://github.com/filecoin-project/venus/pull/6215)] + +## v1.14.0-rc4 + +chore: update to builtin-actors v12.0.0-rc.2 [[#6207](https://github.com/filecoin-project/venus/pull/6207)] + ## v1.14.0-rc3 * chore: reset butterflynet [[#6191](https://github.com/filecoin-project/venus/pull/6191)] diff --git a/app/submodule/eth/eth_api.go b/app/submodule/eth/eth_api.go index 4aebd3b0df..77f5cec73d 100644 --- a/app/submodule/eth/eth_api.go +++ b/app/submodule/eth/eth_api.go @@ -711,10 +711,12 @@ func (a *ethAPI) EthFeeHistory(ctx context.Context, p jsonrpc.RawParams) (types. } rewards, totalGasUsed := calculateRewardsAndGasUsed(rewardPercentiles, txGasRewards) + maxGas := constants.BlockGasLimit * int64(len(ts.Blocks())) // arrays should be reversed at the end baseFeeArray = append(baseFeeArray, types.EthBigInt(basefee)) - gasUsedRatioArray = append(gasUsedRatioArray, float64(totalGasUsed)/float64(constants.BlockGasLimit)) + gasUsedRatioArray = append(gasUsedRatioArray, float64(totalGasUsed)/float64(maxGas)) + rewardsArray = append(rewardsArray, rewards) oldestBlkHeight = uint64(ts.Height()) blocksIncluded++ diff --git a/app/submodule/eth/eth_utils.go b/app/submodule/eth/eth_utils.go index b3e605f1d9..660e7b6aee 100644 --- a/app/submodule/eth/eth_utils.go +++ b/app/submodule/eth/eth_utils.go @@ -610,7 +610,13 @@ func newEthTxReceipt(ctx context.Context, tx types.EthTx, lookup *types.MsgLooku return types.EthTxReceipt{}, fmt.Errorf("failed to lookup tipset %s when constructing the eth txn receipt: %w", lookup.TipSet, err) } - baseFee := ts.Blocks()[0].ParentBaseFee + // The tx is located in the parent tipset + parentTS, err := ca.ChainGetTipSet(ctx, ts.Parents()) + if err != nil { + return types.EthTxReceipt{}, fmt.Errorf("failed to lookup tipset %s when constructing the eth txn receipt: %w", ts.Parents(), err) + } + + baseFee := parentTS.Blocks()[0].ParentBaseFee gasOutputs := gas.ComputeGasOutputs(lookup.Receipt.GasUsed, int64(tx.Gas), baseFee, big.Int(tx.MaxFeePerGas), big.Int(tx.MaxPriorityFeePerGas), true) totalSpent := big.Sum(gasOutputs.BaseFeeBurn, gasOutputs.MinerTip, gasOutputs.OverEstimationBurn) diff --git a/fixtures/networks/butterfly.go b/fixtures/networks/butterfly.go index 5ebd61cd0c..2ac8a71e5f 100644 --- a/fixtures/networks/butterfly.go +++ b/fixtures/networks/butterfly.go @@ -31,31 +31,33 @@ func ButterflySnapNet() *NetworkConf { MinVerifiedDealSize: 1 << 20, PreCommitChallengeDelay: abi.ChainEpoch(150), ForkUpgradeParam: &config.ForkUpgradeConfig{ - BreezeGasTampingDuration: 120, - UpgradeBreezeHeight: -1, - UpgradeSmokeHeight: -2, - UpgradeIgnitionHeight: -3, - UpgradeRefuelHeight: -4, - UpgradeAssemblyHeight: -5, - UpgradeTapeHeight: -6, - UpgradeLiftoffHeight: -7, - UpgradeKumquatHeight: -8, - UpgradeCalicoHeight: -9, - UpgradePersianHeight: -10, - UpgradeOrangeHeight: -11, - UpgradeClausHeight: -12, - UpgradeTrustHeight: -13, - UpgradeNorwegianHeight: -14, - UpgradeTurboHeight: -15, - UpgradeHyperdriveHeight: -16, - UpgradeChocolateHeight: -17, - UpgradeOhSnapHeight: -18, - UpgradeSkyrHeight: -19, - UpgradeSharkHeight: -20, - UpgradeHyggeHeight: -21, - UpgradeLightningHeight: -22, - UpgradeThunderHeight: -23, - UpgradeWatermelonHeight: 400, + BreezeGasTampingDuration: 120, + UpgradeBreezeHeight: -1, + UpgradeSmokeHeight: -2, + UpgradeIgnitionHeight: -3, + UpgradeRefuelHeight: -4, + UpgradeAssemblyHeight: -5, + UpgradeTapeHeight: -6, + UpgradeLiftoffHeight: -7, + UpgradeKumquatHeight: -8, + UpgradeCalicoHeight: -9, + UpgradePersianHeight: -10, + UpgradeOrangeHeight: -11, + UpgradeClausHeight: -12, + UpgradeTrustHeight: -13, + UpgradeNorwegianHeight: -14, + UpgradeTurboHeight: -15, + UpgradeHyperdriveHeight: -16, + UpgradeChocolateHeight: -17, + UpgradeOhSnapHeight: -18, + UpgradeSkyrHeight: -19, + UpgradeSharkHeight: -20, + UpgradeHyggeHeight: -21, + UpgradeLightningHeight: -22, + UpgradeThunderHeight: -23, + UpgradeWatermelonHeight: 400, + UpgradeWatermelonFixHeight: -100, // This fix upgrade only ran on calibrationnet + UpgradeWatermelonFix2Height: -101, // This fix upgrade only ran on calibrationnet }, DrandSchedule: map[abi.ChainEpoch]config.DrandEnum{0: 1}, AddressNetwork: address.Testnet, diff --git a/fixtures/networks/calibration.go b/fixtures/networks/calibration.go index b8cf197299..bd3d25b783 100644 --- a/fixtures/networks/calibration.go +++ b/fixtures/networks/calibration.go @@ -22,6 +22,7 @@ func Calibration() *NetworkConf { "/dns4/bootstrap-1.calibration.fildev.network/tcp/1347/p2p/12D3KooWDTayrBojBn9jWNNUih4nNQQBGJD7Zo3gQCKgBkUsS6dp", "/dns4/bootstrap-2.calibration.fildev.network/tcp/1347/p2p/12D3KooWNRxTHUn8bf7jz1KEUPMc2dMgGfa4f8ZJTsquVSn3vHCG", "/dns4/bootstrap-3.calibration.fildev.network/tcp/1347/p2p/12D3KooWFWUqE9jgXvcKHWieYs9nhyp6NF4ftwLGAHm4sCv73jjK", + "/dns4/calibration.node.glif.io/tcp/1237/p2p/12D3KooWQPYouEAsUQKzvFUA9sQ8tz4rfpqtTzh2eL6USd9bwg7x", }, Period: "30s", }, @@ -38,31 +39,33 @@ func Calibration() *NetworkConf { MinVerifiedDealSize: 1 << 20, PreCommitChallengeDelay: abi.ChainEpoch(150), ForkUpgradeParam: &config.ForkUpgradeConfig{ - BreezeGasTampingDuration: 120, - UpgradeBreezeHeight: -1, - UpgradeSmokeHeight: -2, - UpgradeIgnitionHeight: -3, - UpgradeRefuelHeight: -4, - UpgradeAssemblyHeight: 30, - UpgradeTapeHeight: 60, - UpgradeLiftoffHeight: -5, - UpgradeKumquatHeight: 90, - UpgradeCalicoHeight: 120, - UpgradePersianHeight: 120 + (builtin2.EpochsInHour * 1), - UpgradeClausHeight: 270, - UpgradeOrangeHeight: 300, - UpgradeTrustHeight: 330, - UpgradeNorwegianHeight: 360, - UpgradeTurboHeight: 390, - UpgradeHyperdriveHeight: 420, - UpgradeChocolateHeight: 450, - UpgradeOhSnapHeight: 480, - UpgradeSkyrHeight: 510, - UpgradeSharkHeight: 16800, - UpgradeHyggeHeight: 322354, // 2023-02-21T16:30:00Z - UpgradeLightningHeight: 489094, // 2023-04-20T14:00:00Z - UpgradeThunderHeight: 489094 + 3120, // 2023-04-21T16:00:00Z - UpgradeWatermelonHeight: 1013134, // 2023-10-19T13:00:00Z + BreezeGasTampingDuration: 120, + UpgradeBreezeHeight: -1, + UpgradeSmokeHeight: -2, + UpgradeIgnitionHeight: -3, + UpgradeRefuelHeight: -4, + UpgradeAssemblyHeight: 30, + UpgradeTapeHeight: 60, + UpgradeLiftoffHeight: -5, + UpgradeKumquatHeight: 90, + UpgradeCalicoHeight: 120, + UpgradePersianHeight: 120 + (builtin2.EpochsInHour * 1), + UpgradeClausHeight: 270, + UpgradeOrangeHeight: 300, + UpgradeTrustHeight: 330, + UpgradeNorwegianHeight: 360, + UpgradeTurboHeight: 390, + UpgradeHyperdriveHeight: 420, + UpgradeChocolateHeight: 450, + UpgradeOhSnapHeight: 480, + UpgradeSkyrHeight: 510, + UpgradeSharkHeight: 16800, + UpgradeHyggeHeight: 322354, // 2023-02-21T16:30:00Z + UpgradeLightningHeight: 489094, // 2023-04-20T14:00:00Z + UpgradeThunderHeight: 489094 + 3120, // 2023-04-21T16:00:00Z + UpgradeWatermelonHeight: 1013134, // 2023-10-19T13:00:00Z + UpgradeWatermelonFixHeight: 1070494, // 2023-11-07T13:00:00Z + UpgradeWatermelonFix2Height: 1108174, // 2023-11-21T13:00:00Z }, DrandSchedule: map[abi.ChainEpoch]config.DrandEnum{0: 1}, AddressNetwork: address.Testnet, diff --git a/fixtures/networks/forcenet.go b/fixtures/networks/forcenet.go index 441b27c6ee..0210179d2a 100644 --- a/fixtures/networks/forcenet.go +++ b/fixtures/networks/forcenet.go @@ -40,24 +40,26 @@ func ForceNet() *NetworkConf { // Miners, clients, developers, custodians all need time to prepare. // We still have upgrades and state changes to do, but can happen after signaling timing here. - UpgradeAssemblyHeight: -7, // critical: the network can bootstrap from v1 only - UpgradeKumquatHeight: -8, - UpgradeCalicoHeight: -9, - UpgradePersianHeight: -10, - UpgradeOrangeHeight: -11, - UpgradeClausHeight: -12, - UpgradeTrustHeight: -13, - UpgradeNorwegianHeight: -14, - UpgradeTurboHeight: -15, - UpgradeHyperdriveHeight: -16, - UpgradeChocolateHeight: -17, - UpgradeOhSnapHeight: -18, - UpgradeSkyrHeight: -19, - UpgradeSharkHeight: -20, - UpgradeHyggeHeight: -21, - UpgradeLightningHeight: -22, - UpgradeThunderHeight: -23, - UpgradeWatermelonHeight: 200, + UpgradeAssemblyHeight: -7, // critical: the network can bootstrap from v1 only + UpgradeKumquatHeight: -8, + UpgradeCalicoHeight: -9, + UpgradePersianHeight: -10, + UpgradeOrangeHeight: -11, + UpgradeClausHeight: -12, + UpgradeTrustHeight: -13, + UpgradeNorwegianHeight: -14, + UpgradeTurboHeight: -15, + UpgradeHyperdriveHeight: -16, + UpgradeChocolateHeight: -17, + UpgradeOhSnapHeight: -18, + UpgradeSkyrHeight: -19, + UpgradeSharkHeight: -20, + UpgradeHyggeHeight: -21, + UpgradeLightningHeight: -22, + UpgradeThunderHeight: -23, + UpgradeWatermelonHeight: 200, + UpgradeWatermelonFixHeight: -100, // This fix upgrade only ran on calibrationnet + UpgradeWatermelonFix2Height: -101, // This fix upgrade only ran on calibrationnet }, DrandSchedule: map[abi.ChainEpoch]config.DrandEnum{0: config.DrandMainnet}, AddressNetwork: address.Testnet, diff --git a/fixtures/networks/hyperspace.go b/fixtures/networks/hyperspace.go index 3bdb156073..2a65dbfe3b 100644 --- a/fixtures/networks/hyperspace.go +++ b/fixtures/networks/hyperspace.go @@ -34,28 +34,33 @@ func HyperspaceNet() *NetworkConf { MinVerifiedDealSize: 1 << 20, PreCommitChallengeDelay: abi.ChainEpoch(10), ForkUpgradeParam: &config.ForkUpgradeConfig{ - BreezeGasTampingDuration: 120, - UpgradeBreezeHeight: -1, - UpgradeSmokeHeight: -2, - UpgradeIgnitionHeight: -3, - UpgradeRefuelHeight: -4, - UpgradeAssemblyHeight: -5, - UpgradeTapeHeight: -6, - UpgradeLiftoffHeight: -7, - UpgradeKumquatHeight: -8, - UpgradeCalicoHeight: -9, - UpgradePersianHeight: -10, - UpgradeOrangeHeight: -11, - UpgradeClausHeight: -12, - UpgradeTrustHeight: -13, - UpgradeNorwegianHeight: -14, - UpgradeTurboHeight: -15, - UpgradeHyperdriveHeight: -16, - UpgradeChocolateHeight: -17, - UpgradeOhSnapHeight: -18, - UpgradeSkyrHeight: -19, - UpgradeSharkHeight: -20, - UpgradeHyggeHeight: -21, + BreezeGasTampingDuration: 120, + UpgradeBreezeHeight: -1, + UpgradeSmokeHeight: -2, + UpgradeIgnitionHeight: -3, + UpgradeRefuelHeight: -4, + UpgradeAssemblyHeight: -5, + UpgradeTapeHeight: -6, + UpgradeLiftoffHeight: -7, + UpgradeKumquatHeight: -8, + UpgradeCalicoHeight: -9, + UpgradePersianHeight: -10, + UpgradeOrangeHeight: -11, + UpgradeClausHeight: -12, + UpgradeTrustHeight: -13, + UpgradeNorwegianHeight: -14, + UpgradeTurboHeight: -15, + UpgradeHyperdriveHeight: -16, + UpgradeChocolateHeight: -17, + UpgradeOhSnapHeight: -18, + UpgradeSkyrHeight: -19, + UpgradeSharkHeight: -20, + UpgradeHyggeHeight: -21, + UpgradeLightningHeight: -22, + UpgradeThunderHeight: -23, + UpgradeWatermelonHeight: 200, + UpgradeWatermelonFixHeight: -100, // This fix upgrade only ran on calibrationnet + UpgradeWatermelonFix2Height: -101, // This fix upgrade only ran on calibrationnet }, DrandSchedule: map[abi.ChainEpoch]config.DrandEnum{0: 1}, AddressNetwork: address.Testnet, diff --git a/fixtures/networks/integrationtestnet.go b/fixtures/networks/integrationtestnet.go index 60e14c8ab8..ffd8d6aa80 100644 --- a/fixtures/networks/integrationtestnet.go +++ b/fixtures/networks/integrationtestnet.go @@ -26,31 +26,33 @@ func IntegrationNet() *NetworkConf { MinVerifiedDealSize: 1 << 20, PreCommitChallengeDelay: abi.ChainEpoch(150), ForkUpgradeParam: &config.ForkUpgradeConfig{ - BreezeGasTampingDuration: 120, - UpgradeBreezeHeight: 41280, - UpgradeSmokeHeight: 51000, - UpgradeIgnitionHeight: 94000, - UpgradeRefuelHeight: 130800, - UpgradeAssemblyHeight: 138720, - UpgradeTapeHeight: 140760, - UpgradeLiftoffHeight: 148888, - UpgradeKumquatHeight: 170000, - UpgradeCalicoHeight: 265200, - UpgradePersianHeight: 265200 + (120 * 60), - UpgradeOrangeHeight: 336458, - UpgradeClausHeight: 343200, - UpgradeTrustHeight: 550321, - UpgradeNorwegianHeight: 665280, - UpgradeTurboHeight: 712320, - UpgradeHyperdriveHeight: 892800, - UpgradeChocolateHeight: 1231620, - UpgradeOhSnapHeight: 1594680, - UpgradeSkyrHeight: 1960320, - UpgradeSharkHeight: 2383680, - UpgradeHyggeHeight: 2683348, - UpgradeLightningHeight: 2809800, - UpgradeThunderHeight: 2809800 + 2880*21, - UpgradeWatermelonHeight: 999999999999999, + BreezeGasTampingDuration: 120, + UpgradeBreezeHeight: 41280, + UpgradeSmokeHeight: 51000, + UpgradeIgnitionHeight: 94000, + UpgradeRefuelHeight: 130800, + UpgradeAssemblyHeight: 138720, + UpgradeTapeHeight: 140760, + UpgradeLiftoffHeight: 148888, + UpgradeKumquatHeight: 170000, + UpgradeCalicoHeight: 265200, + UpgradePersianHeight: 265200 + (120 * 60), + UpgradeOrangeHeight: 336458, + UpgradeClausHeight: 343200, + UpgradeTrustHeight: 550321, + UpgradeNorwegianHeight: 665280, + UpgradeTurboHeight: 712320, + UpgradeHyperdriveHeight: 892800, + UpgradeChocolateHeight: 1231620, + UpgradeOhSnapHeight: 1594680, + UpgradeSkyrHeight: 1960320, + UpgradeSharkHeight: 2383680, + UpgradeHyggeHeight: 2683348, + UpgradeLightningHeight: 2809800, + UpgradeThunderHeight: 2809800 + 2880*21, + UpgradeWatermelonHeight: 3431940, + UpgradeWatermelonFixHeight: -100, // This fix upgrade only ran on calibrationnet + UpgradeWatermelonFix2Height: -101, // This fix upgrade only ran on calibrationnet }, DrandSchedule: map[abi.ChainEpoch]config.DrandEnum{0: 5, 51000: 1}, AddressNetwork: address.Testnet, diff --git a/fixtures/networks/interopnet.go b/fixtures/networks/interopnet.go index bd46b9d648..bae776d8b0 100644 --- a/fixtures/networks/interopnet.go +++ b/fixtures/networks/interopnet.go @@ -31,31 +31,33 @@ func InteropNet() *NetworkConf { MinVerifiedDealSize: 256, PreCommitChallengeDelay: abi.ChainEpoch(10), ForkUpgradeParam: &config.ForkUpgradeConfig{ - BreezeGasTampingDuration: 0, - UpgradeBreezeHeight: -1, - UpgradeSmokeHeight: -2, - UpgradeIgnitionHeight: -3, - UpgradeRefuelHeight: -4, - UpgradeAssemblyHeight: -5, - UpgradeTapeHeight: -6, - UpgradeLiftoffHeight: -7, - UpgradeKumquatHeight: -8, - UpgradeCalicoHeight: -9, - UpgradePersianHeight: -10, - UpgradeOrangeHeight: -11, - UpgradeClausHeight: -12, - UpgradeTrustHeight: -13, - UpgradeNorwegianHeight: -14, - UpgradeTurboHeight: -15, - UpgradeHyperdriveHeight: -16, - UpgradeChocolateHeight: -17, - UpgradeOhSnapHeight: -18, - UpgradeSkyrHeight: -19, - UpgradeSharkHeight: -20, - UpgradeHyggeHeight: -21, - UpgradeLightningHeight: -22, - UpgradeThunderHeight: -23, - UpgradeWatermelonHeight: 50, + BreezeGasTampingDuration: 0, + UpgradeBreezeHeight: -1, + UpgradeSmokeHeight: -2, + UpgradeIgnitionHeight: -3, + UpgradeRefuelHeight: -4, + UpgradeAssemblyHeight: -5, + UpgradeTapeHeight: -6, + UpgradeLiftoffHeight: -7, + UpgradeKumquatHeight: -8, + UpgradeCalicoHeight: -9, + UpgradePersianHeight: -10, + UpgradeOrangeHeight: -11, + UpgradeClausHeight: -12, + UpgradeTrustHeight: -13, + UpgradeNorwegianHeight: -14, + UpgradeTurboHeight: -15, + UpgradeHyperdriveHeight: -16, + UpgradeChocolateHeight: -17, + UpgradeOhSnapHeight: -18, + UpgradeSkyrHeight: -19, + UpgradeSharkHeight: -20, + UpgradeHyggeHeight: -21, + UpgradeLightningHeight: -22, + UpgradeThunderHeight: -23, + UpgradeWatermelonHeight: 50, + UpgradeWatermelonFixHeight: -100, // This fix upgrade only ran on calibrationnet + UpgradeWatermelonFix2Height: -101, // This fix upgrade only ran on calibrationnet }, DrandSchedule: map[abi.ChainEpoch]config.DrandEnum{0: 1}, AddressNetwork: address.Testnet, diff --git a/fixtures/networks/mainnet.go b/fixtures/networks/mainnet.go index 1c861180ea..e4b6ee2fbf 100644 --- a/fixtures/networks/mainnet.go +++ b/fixtures/networks/mainnet.go @@ -54,23 +54,25 @@ func Mainnet() *NetworkConf { // This signals our tentative epoch for mainnet launch. Can make it later, but not earlier. // Miners, clients, developers, custodians all need time to prepare. // We still have upgrades and state changes to do, but can happen after signaling timing here. - UpgradeKumquatHeight: 170000, - UpgradeCalicoHeight: 265200, - UpgradePersianHeight: 265200 + (builtin2.EpochsInHour * 60), - UpgradeOrangeHeight: 336458, - UpgradeClausHeight: 343200, // 2020-12-22T02:00:00Z - UpgradeTrustHeight: 550321, // 2021-03-04T00:00:30Z - UpgradeNorwegianHeight: 665280, // 2021-04-12T22:00:00Z - UpgradeTurboHeight: 712320, // 2021-04-29T06:00:00Z - UpgradeHyperdriveHeight: 892800, // 2021-06-30T22:00:00Z - UpgradeChocolateHeight: 1231620, - UpgradeOhSnapHeight: 1594680, // 2022-03-01T15:00:00Z - UpgradeSkyrHeight: 1960320, // 2022-07-06T14:00:00Z - UpgradeSharkHeight: 2383680, // 2022-11-30T14:00:00Z - UpgradeHyggeHeight: 2683348, // 2023-03-14T15:14:00Z - UpgradeLightningHeight: 2809800, // 2023-04-27T13:00:00Z - UpgradeThunderHeight: 2809800 + 2880*21, // 2023-05-18T13:00:00Z - UpgradeWatermelonHeight: 999999999999999, + UpgradeKumquatHeight: 170000, + UpgradeCalicoHeight: 265200, + UpgradePersianHeight: 265200 + (builtin2.EpochsInHour * 60), + UpgradeOrangeHeight: 336458, + UpgradeClausHeight: 343200, // 2020-12-22T02:00:00Z + UpgradeTrustHeight: 550321, // 2021-03-04T00:00:30Z + UpgradeNorwegianHeight: 665280, // 2021-04-12T22:00:00Z + UpgradeTurboHeight: 712320, // 2021-04-29T06:00:00Z + UpgradeHyperdriveHeight: 892800, // 2021-06-30T22:00:00Z + UpgradeChocolateHeight: 1231620, + UpgradeOhSnapHeight: 1594680, // 2022-03-01T15:00:00Z + UpgradeSkyrHeight: 1960320, // 2022-07-06T14:00:00Z + UpgradeSharkHeight: 2383680, // 2022-11-30T14:00:00Z + UpgradeHyggeHeight: 2683348, // 2023-03-14T15:14:00Z + UpgradeLightningHeight: 2809800, // 2023-04-27T13:00:00Z + UpgradeThunderHeight: 2809800 + 2880*21, // 2023-05-18T13:00:00Z + UpgradeWatermelonHeight: 3469380, // 2023-12-12T13:30:00Z + UpgradeWatermelonFixHeight: -100, // This fix upgrade only ran on calibrationnet + UpgradeWatermelonFix2Height: -101, // This fix upgrade only ran on calibrationnet }, DrandSchedule: map[abi.ChainEpoch]config.DrandEnum{0: 5, 51000: 1}, AddressNetwork: address.Mainnet, diff --git a/fixtures/networks/net_2k.go b/fixtures/networks/net_2k.go index 765398e986..5d586120c9 100644 --- a/fixtures/networks/net_2k.go +++ b/fixtures/networks/net_2k.go @@ -27,31 +27,33 @@ func Net2k() *NetworkConf { MinVerifiedDealSize: 256, PreCommitChallengeDelay: abi.ChainEpoch(10), ForkUpgradeParam: &config.ForkUpgradeConfig{ - BreezeGasTampingDuration: 0, - UpgradeBreezeHeight: -1, - UpgradeSmokeHeight: -2, - UpgradeIgnitionHeight: -3, - UpgradeRefuelHeight: -4, - UpgradeTapeHeight: -5, - UpgradeAssemblyHeight: -6, - UpgradeLiftoffHeight: -7, - UpgradeKumquatHeight: -8, - UpgradeCalicoHeight: -9, - UpgradePersianHeight: -10, - UpgradeOrangeHeight: -11, - UpgradeClausHeight: -12, - UpgradeTrustHeight: -13, - UpgradeNorwegianHeight: -14, - UpgradeTurboHeight: -15, - UpgradeHyperdriveHeight: -16, - UpgradeChocolateHeight: -17, - UpgradeOhSnapHeight: -18, - UpgradeSkyrHeight: -19, - UpgradeSharkHeight: -20, - UpgradeHyggeHeight: -21, - UpgradeLightningHeight: -22, - UpgradeThunderHeight: -23, - UpgradeWatermelonHeight: 200, + BreezeGasTampingDuration: 0, + UpgradeBreezeHeight: -1, + UpgradeSmokeHeight: -2, + UpgradeIgnitionHeight: -3, + UpgradeRefuelHeight: -4, + UpgradeTapeHeight: -5, + UpgradeAssemblyHeight: -6, + UpgradeLiftoffHeight: -7, + UpgradeKumquatHeight: -8, + UpgradeCalicoHeight: -9, + UpgradePersianHeight: -10, + UpgradeOrangeHeight: -11, + UpgradeClausHeight: -12, + UpgradeTrustHeight: -13, + UpgradeNorwegianHeight: -14, + UpgradeTurboHeight: -15, + UpgradeHyperdriveHeight: -16, + UpgradeChocolateHeight: -17, + UpgradeOhSnapHeight: -18, + UpgradeSkyrHeight: -19, + UpgradeSharkHeight: -20, + UpgradeHyggeHeight: -21, + UpgradeLightningHeight: -22, + UpgradeThunderHeight: -23, + UpgradeWatermelonHeight: 200, + UpgradeWatermelonFixHeight: -100, // This fix upgrade only ran on calibrationnet + UpgradeWatermelonFix2Height: -101, // This fix upgrade only ran on calibrationnet }, DrandSchedule: map[abi.ChainEpoch]config.DrandEnum{0: 1}, AddressNetwork: address.Testnet, diff --git a/fixtures/networks/wallaby.go b/fixtures/networks/wallaby.go index ddc7e1d52b..856b90a27f 100644 --- a/fixtures/networks/wallaby.go +++ b/fixtures/networks/wallaby.go @@ -34,28 +34,33 @@ func WallabyNet() *NetworkConf { MinVerifiedDealSize: 1 << 20, PreCommitChallengeDelay: abi.ChainEpoch(10), ForkUpgradeParam: &config.ForkUpgradeConfig{ - BreezeGasTampingDuration: 120, - UpgradeBreezeHeight: -1, - UpgradeSmokeHeight: -2, - UpgradeIgnitionHeight: -3, - UpgradeRefuelHeight: -4, - UpgradeAssemblyHeight: -5, - UpgradeTapeHeight: -6, - UpgradeLiftoffHeight: -7, - UpgradeKumquatHeight: -8, - UpgradeCalicoHeight: -9, - UpgradePersianHeight: -10, - UpgradeOrangeHeight: -11, - UpgradeClausHeight: -12, - UpgradeTrustHeight: -13, - UpgradeNorwegianHeight: -14, - UpgradeTurboHeight: -15, - UpgradeHyperdriveHeight: -16, - UpgradeChocolateHeight: -17, - UpgradeOhSnapHeight: -18, - UpgradeSkyrHeight: -19, - UpgradeSharkHeight: -20, - UpgradeHyggeHeight: -21, + BreezeGasTampingDuration: 120, + UpgradeBreezeHeight: -1, + UpgradeSmokeHeight: -2, + UpgradeIgnitionHeight: -3, + UpgradeRefuelHeight: -4, + UpgradeAssemblyHeight: -5, + UpgradeTapeHeight: -6, + UpgradeLiftoffHeight: -7, + UpgradeKumquatHeight: -8, + UpgradeCalicoHeight: -9, + UpgradePersianHeight: -10, + UpgradeOrangeHeight: -11, + UpgradeClausHeight: -12, + UpgradeTrustHeight: -13, + UpgradeNorwegianHeight: -14, + UpgradeTurboHeight: -15, + UpgradeHyperdriveHeight: -16, + UpgradeChocolateHeight: -17, + UpgradeOhSnapHeight: -18, + UpgradeSkyrHeight: -19, + UpgradeSharkHeight: -20, + UpgradeHyggeHeight: -21, + UpgradeLightningHeight: -22, + UpgradeThunderHeight: -23, + UpgradeWatermelonHeight: 200, + UpgradeWatermelonFixHeight: -100, // This fix upgrade only ran on calibrationnet + UpgradeWatermelonFix2Height: -101, // This fix upgrade only ran on calibrationnet }, DrandSchedule: map[abi.ChainEpoch]config.DrandEnum{0: 1}, AddressNetwork: address.Testnet, diff --git a/go.mod b/go.mod index db87d85cad..c25e3d853d 100644 --- a/go.mod +++ b/go.mod @@ -32,7 +32,7 @@ require ( github.com/filecoin-project/go-fil-markets v1.28.2 github.com/filecoin-project/go-jsonrpc v0.1.5 github.com/filecoin-project/go-paramfetch v0.0.4 - github.com/filecoin-project/go-state-types v0.12.5 + github.com/filecoin-project/go-state-types v0.12.8 github.com/filecoin-project/pubsub v1.0.0 github.com/filecoin-project/specs-actors v0.9.15 github.com/filecoin-project/specs-actors/v2 v2.3.6 @@ -53,10 +53,11 @@ require ( github.com/hako/durafmt v0.0.0-20200710122514-c0fb7b4da026 github.com/hannahhoward/go-pubsub v0.0.0-20200423002714-8d62886cc36e github.com/hashicorp/go-multierror v1.1.1 - github.com/hashicorp/golang-lru/v2 v2.0.2 + github.com/hashicorp/golang-lru/arc/v2 v2.0.7 + github.com/hashicorp/golang-lru/v2 v2.0.7 github.com/howeyc/gopass v0.0.0-20190910152052-7cb4b85ec19c github.com/ipfs-force-community/metrics v1.0.1-0.20231011024528-8c881d456601 - github.com/ipfs-force-community/sophon-auth v1.14.0-rc1 + github.com/ipfs-force-community/sophon-auth v1.14.0 github.com/ipfs/boxo v0.10.1 github.com/ipfs/go-cid v0.4.1 github.com/ipfs/go-datastore v0.6.0 @@ -330,6 +331,6 @@ require ( replace ( github.com/filecoin-project/filecoin-ffi => ./extern/filecoin-ffi - github.com/filecoin-project/go-jsonrpc => github.com/ipfs-force-community/go-jsonrpc v0.1.8 + github.com/filecoin-project/go-jsonrpc => github.com/ipfs-force-community/go-jsonrpc v0.1.9 github.com/filecoin-project/test-vectors => ./extern/test-vectors ) diff --git a/go.sum b/go.sum index 8f90e69c95..dc2f31650c 100644 --- a/go.sum +++ b/go.sum @@ -298,8 +298,8 @@ github.com/filecoin-project/go-state-types v0.1.4/go.mod h1:xCA/WfKlC2zcn3fUmDv4 github.com/filecoin-project/go-state-types v0.1.6/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= github.com/filecoin-project/go-state-types v0.1.10/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= github.com/filecoin-project/go-state-types v0.11.2-0.20230712101859-8f37624fa540/go.mod h1:SyNPwTsU7I22gL2r0OAPcImvLoTVfgRwdK/Y5rR1zz8= -github.com/filecoin-project/go-state-types v0.12.5 h1:VQ2N2T3JeUDdIHEo/xhjnT7Q218Wl0UYIyglqT7Z9Ck= -github.com/filecoin-project/go-state-types v0.12.5/go.mod h1:iJTqGdWDvzXhuVf64Lw0hzt4TIoitMo0VgHdxdjNDZI= +github.com/filecoin-project/go-state-types v0.12.8 h1:W/UObdAsv+LbB9EfyLg92DSYoatzUWmlfV8FGyh30VA= +github.com/filecoin-project/go-state-types v0.12.8/go.mod h1:gR2NV0CSGSQwopxF+3In9nDh1sqvoYukLcs5vK0AHCA= github.com/filecoin-project/go-statemachine v0.0.0-20200925024713-05bd7c71fbfe/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= github.com/filecoin-project/go-statemachine v1.0.3 h1:N07o6alys+V1tNoSTi4WuuoeNC4erS/6jE74+NsgQuk= github.com/filecoin-project/go-statemachine v1.0.3/go.mod h1:jZdXXiHa61n4NmgWFG4w8tnqgvZVHYbJ3yW7+y8bF54= @@ -570,8 +570,10 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/golang-lru/v2 v2.0.2 h1:Dwmkdr5Nc/oBiXgJS3CDHNhJtIHkuZ3DZF5twqnfBdU= -github.com/hashicorp/golang-lru/v2 v2.0.2/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= +github.com/hashicorp/golang-lru/arc/v2 v2.0.7 h1:QxkVTxwColcduO+LP7eJO56r2hFiG8zEbfAAzRv52KQ= +github.com/hashicorp/golang-lru/arc/v2 v2.0.7/go.mod h1:Pe7gBlGdc8clY5LJ0LpJXMt5AmgmWNH1g+oFFVUHOEc= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/howeyc/gopass v0.0.0-20190910152052-7cb4b85ec19c h1:aY2hhxLhjEAbfXOx2nRJxCXezC6CO2V/yN+OCr1srtk= @@ -588,12 +590,12 @@ github.com/influxdata/influxdb-client-go/v2 v2.2.2 h1:O0CGIuIwQafvAxttAJ/VqMKfbW github.com/influxdata/influxdb-client-go/v2 v2.2.2/go.mod h1:fa/d1lAdUHxuc1jedx30ZfNG573oQTQmUni3N6pcW+0= github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839 h1:W9WBk7wlPfJLvMCdtV4zPulc4uCPrlywQOmbFOhgQNU= github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= -github.com/ipfs-force-community/go-jsonrpc v0.1.8 h1:w7CWlLveL+aXD3gLg8Z7I1RcktCiMY0sp8dgJG37uWE= -github.com/ipfs-force-community/go-jsonrpc v0.1.8/go.mod h1:jBSvPTl8V1N7gSTuCR4bis8wnQnIjHbRPpROol6iQKM= +github.com/ipfs-force-community/go-jsonrpc v0.1.9 h1:5QavBltfvV6fz/+EbYsCkVxJ1MSJncZm6YuPs1SLdZU= +github.com/ipfs-force-community/go-jsonrpc v0.1.9/go.mod h1:jBSvPTl8V1N7gSTuCR4bis8wnQnIjHbRPpROol6iQKM= github.com/ipfs-force-community/metrics v1.0.1-0.20231011024528-8c881d456601 h1:zxKQ30KAD6KfvSFAx9tuqQXLDsEHyF+eVaUBXXYC2bU= github.com/ipfs-force-community/metrics v1.0.1-0.20231011024528-8c881d456601/go.mod h1:wM6EmkEcnJgWOFcVytgvK0u15awEmt8He0f2kAdsFDA= -github.com/ipfs-force-community/sophon-auth v1.14.0-rc1 h1:r+TSz2r6H7K0ZtsiyS4Hmmf1bM62e5vQiHA8SYPIBz4= -github.com/ipfs-force-community/sophon-auth v1.14.0-rc1/go.mod h1:d6J6u3zyIwcEajRho5BhVBcoIChEf0K76wP4yJEfEhc= +github.com/ipfs-force-community/sophon-auth v1.14.0 h1:ctBJ6UHkcytEzfVPgiiHo0cW4FGQrE7r1H3Um0FcHbo= +github.com/ipfs-force-community/sophon-auth v1.14.0/go.mod h1:d6J6u3zyIwcEajRho5BhVBcoIChEf0K76wP4yJEfEhc= github.com/ipfs/bbloom v0.0.1/go.mod h1:oqo8CVWsJFMOZqTglBG4wydCE4IQA/G2/SEofB0rjUI= github.com/ipfs/bbloom v0.0.4 h1:Gi+8EGJ2y5qiD5FbsbpX/TMNcJw8gSqr7eyjHa4Fhvs= github.com/ipfs/bbloom v0.0.4/go.mod h1:cS9YprKXpoZ9lT0n/Mw/a6/aFV6DTjTLYHeA+gyqMG0= diff --git a/pkg/chain/store.go b/pkg/chain/store.go index f240da86f9..fe8a86ec8f 100644 --- a/pkg/chain/store.go +++ b/pkg/chain/store.go @@ -10,7 +10,7 @@ import ( "runtime/debug" "sync" - lru "github.com/hashicorp/golang-lru/v2" + "github.com/hashicorp/golang-lru/arc/v2" "github.com/ipld/go-car" carutil "github.com/ipld/go-car/util" carv2 "github.com/ipld/go-car/v2" @@ -128,7 +128,7 @@ type Store struct { reorgCh chan reorg reorgNotifeeCh chan ReorgNotifee - tsCache *lru.ARCCache[types.TipSetKey, *types.TipSet] + tsCache *arc.ARCCache[types.TipSetKey, *types.TipSet] } // NewStore constructs a new default store. @@ -137,7 +137,7 @@ func NewStore(chainDs repo.Datastore, genesisCid cid.Cid, circulatiingSupplyCalculator ICirculatingSupplyCalcualtor, ) *Store { - tsCache, _ := lru.NewARC[types.TipSetKey, *types.TipSet](DefaultTipsetLruCacheSize) + tsCache, _ := arc.NewARC[types.TipSetKey, *types.TipSet](DefaultTipsetLruCacheSize) store := &Store{ stateAndBlockSource: cbor.NewCborStore(bsstore), ds: chainDs, diff --git a/pkg/chainsync/syncer/syncer.go b/pkg/chainsync/syncer/syncer.go index d3dfb0db36..3a08e5a9f2 100644 --- a/pkg/chainsync/syncer/syncer.go +++ b/pkg/chainsync/syncer/syncer.go @@ -542,7 +542,8 @@ func (syncer *Syncer) fetchSegMessage(ctx context.Context, segTipset []*types.Ti return nil, err } - for index, tip := range leftChain { + for index := range messages { + tip := leftChain[index] fts, err := zipTipSetAndMessages(bs, tip, messages[index].Bls, messages[index].Secpk, messages[index].BlsIncludes, messages[index].SecpkIncludes) if err != nil { return nil, fmt.Errorf("message processing failed: %w", err) diff --git a/pkg/config/config.go b/pkg/config/config.go index 285d975d86..a747ab9f83 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -309,32 +309,34 @@ type NetworkParamsConfig struct { // ForkUpgradeConfig record upgrade parameters type ForkUpgradeConfig struct { - UpgradeSmokeHeight abi.ChainEpoch `json:"upgradeSmokeHeight"` - UpgradeBreezeHeight abi.ChainEpoch `json:"upgradeBreezeHeight"` - UpgradeIgnitionHeight abi.ChainEpoch `json:"upgradeIgnitionHeight"` - UpgradeLiftoffHeight abi.ChainEpoch `json:"upgradeLiftoffHeight"` - UpgradeAssemblyHeight abi.ChainEpoch `json:"upgradeActorsV2Height"` - UpgradeRefuelHeight abi.ChainEpoch `json:"upgradeRefuelHeight"` - UpgradeTapeHeight abi.ChainEpoch `json:"upgradeTapeHeight"` - UpgradeKumquatHeight abi.ChainEpoch `json:"upgradeKumquatHeight"` - UpgradePriceListOopsHeight abi.ChainEpoch `json:"upgradePriceListOopsHeight"` - BreezeGasTampingDuration abi.ChainEpoch `json:"breezeGasTampingDuration"` - UpgradeCalicoHeight abi.ChainEpoch `json:"upgradeCalicoHeight"` - UpgradePersianHeight abi.ChainEpoch `json:"upgradePersianHeight"` - UpgradeOrangeHeight abi.ChainEpoch `json:"upgradeOrangeHeight"` - UpgradeClausHeight abi.ChainEpoch `json:"upgradeClausHeight"` - UpgradeTrustHeight abi.ChainEpoch `json:"upgradeActorsV3Height"` - UpgradeNorwegianHeight abi.ChainEpoch `json:"upgradeNorwegianHeight"` - UpgradeTurboHeight abi.ChainEpoch `json:"upgradeActorsV4Height"` - UpgradeHyperdriveHeight abi.ChainEpoch `json:"upgradeHyperdriveHeight"` - UpgradeChocolateHeight abi.ChainEpoch `json:"upgradeChocolateHeight"` - UpgradeOhSnapHeight abi.ChainEpoch `json:"upgradeOhSnapHeight"` - UpgradeSkyrHeight abi.ChainEpoch `json:"upgradeSkyrHeight"` - UpgradeSharkHeight abi.ChainEpoch `json:"upgradeSharkHeight"` - UpgradeHyggeHeight abi.ChainEpoch `json:"upgradeHyggeHeight"` - UpgradeLightningHeight abi.ChainEpoch `json:"upgradeLightningHeight"` - UpgradeThunderHeight abi.ChainEpoch `json:"upgradeThunderHeight"` - UpgradeWatermelonHeight abi.ChainEpoch `json:"upgradeWatermelonHeight"` + UpgradeSmokeHeight abi.ChainEpoch `json:"upgradeSmokeHeight"` + UpgradeBreezeHeight abi.ChainEpoch `json:"upgradeBreezeHeight"` + UpgradeIgnitionHeight abi.ChainEpoch `json:"upgradeIgnitionHeight"` + UpgradeLiftoffHeight abi.ChainEpoch `json:"upgradeLiftoffHeight"` + UpgradeAssemblyHeight abi.ChainEpoch `json:"upgradeActorsV2Height"` + UpgradeRefuelHeight abi.ChainEpoch `json:"upgradeRefuelHeight"` + UpgradeTapeHeight abi.ChainEpoch `json:"upgradeTapeHeight"` + UpgradeKumquatHeight abi.ChainEpoch `json:"upgradeKumquatHeight"` + UpgradePriceListOopsHeight abi.ChainEpoch `json:"upgradePriceListOopsHeight"` + BreezeGasTampingDuration abi.ChainEpoch `json:"breezeGasTampingDuration"` + UpgradeCalicoHeight abi.ChainEpoch `json:"upgradeCalicoHeight"` + UpgradePersianHeight abi.ChainEpoch `json:"upgradePersianHeight"` + UpgradeOrangeHeight abi.ChainEpoch `json:"upgradeOrangeHeight"` + UpgradeClausHeight abi.ChainEpoch `json:"upgradeClausHeight"` + UpgradeTrustHeight abi.ChainEpoch `json:"upgradeActorsV3Height"` + UpgradeNorwegianHeight abi.ChainEpoch `json:"upgradeNorwegianHeight"` + UpgradeTurboHeight abi.ChainEpoch `json:"upgradeActorsV4Height"` + UpgradeHyperdriveHeight abi.ChainEpoch `json:"upgradeHyperdriveHeight"` + UpgradeChocolateHeight abi.ChainEpoch `json:"upgradeChocolateHeight"` + UpgradeOhSnapHeight abi.ChainEpoch `json:"upgradeOhSnapHeight"` + UpgradeSkyrHeight abi.ChainEpoch `json:"upgradeSkyrHeight"` + UpgradeSharkHeight abi.ChainEpoch `json:"upgradeSharkHeight"` + UpgradeHyggeHeight abi.ChainEpoch `json:"upgradeHyggeHeight"` + UpgradeLightningHeight abi.ChainEpoch `json:"upgradeLightningHeight"` + UpgradeThunderHeight abi.ChainEpoch `json:"upgradeThunderHeight"` + UpgradeWatermelonHeight abi.ChainEpoch `json:"upgradeWatermelonHeight"` + UpgradeWatermelonFixHeight abi.ChainEpoch `json:"upgradeWatermelonFixHeight"` + UpgradeWatermelonFix2Height abi.ChainEpoch `json:"upgradeWatermelonFix2Height"` } func IsNearUpgrade(epoch, upgradeEpoch abi.ChainEpoch) bool { @@ -366,7 +368,11 @@ var DefaultForkUpgradeParam = &ForkUpgradeConfig{ UpgradeHyggeHeight: 2683348, UpgradeLightningHeight: 2809800, UpgradeThunderHeight: 2809800 + 2880*21, - UpgradeWatermelonHeight: 999999999999999, + UpgradeWatermelonHeight: 3431940, + // This fix upgrade only ran on calibrationnet + UpgradeWatermelonFixHeight: -1, + // This fix upgrade only ran on calibrationnet + UpgradeWatermelonFix2Height: -2, } func newDefaultNetworkParamsConfig() *NetworkParamsConfig { diff --git a/pkg/consensus/block_validator.go b/pkg/consensus/block_validator.go index 0775b38981..692016e2e0 100644 --- a/pkg/consensus/block_validator.go +++ b/pkg/consensus/block_validator.go @@ -10,7 +10,7 @@ import ( "github.com/Gurpartap/async" "github.com/hashicorp/go-multierror" - lru "github.com/hashicorp/golang-lru/v2" + "github.com/hashicorp/golang-lru/arc/v2" "github.com/ipfs/go-cid" cbor "github.com/ipfs/go-ipld-cbor" pubsub "github.com/libp2p/go-libp2p-pubsub" @@ -78,7 +78,7 @@ type BlockValidator struct { // gasprice for vm gasPirceSchedule *gas.PricesSchedule // cache for validate block - validateBlockCache *lru.ARCCache[cid.Cid, struct{}] + validateBlockCache *arc.ARCCache[cid.Cid, struct{}] Stmgr StateTransformer } @@ -97,7 +97,7 @@ func NewBlockValidator(tv TicketValidator, config *config.NetworkParamsConfig, gasPirceSchedule *gas.PricesSchedule, ) *BlockValidator { - validateBlockCache, _ := lru.NewARC[cid.Cid, struct{}](2048) + validateBlockCache, _ := arc.NewARC[cid.Cid, struct{}](2048) return &BlockValidator{ tv: tv, bstore: bstore, diff --git a/pkg/constants/version.go b/pkg/constants/version.go index b93be34c8c..a714c2fa1d 100644 --- a/pkg/constants/version.go +++ b/pkg/constants/version.go @@ -5,7 +5,7 @@ import ( ) // BuildVersion is the local build version, set by build system -const BuildVersion = "1.14.0-rc3" +const BuildVersion = "1.14.0" var CurrentCommit string diff --git a/pkg/events/message_cache.go b/pkg/events/message_cache.go index e2abf2acbb..ba355b3f8a 100644 --- a/pkg/events/message_cache.go +++ b/pkg/events/message_cache.go @@ -4,7 +4,7 @@ import ( "context" "sync" - lru "github.com/hashicorp/golang-lru/v2" + "github.com/hashicorp/golang-lru/arc/v2" "github.com/ipfs/go-cid" "github.com/filecoin-project/venus/venus-shared/types" @@ -14,11 +14,11 @@ type messageCache struct { api IEvent blockMsgLk sync.Mutex - blockMsgCache *lru.ARCCache[cid.Cid, *types.BlockMessages] + blockMsgCache *arc.ARCCache[cid.Cid, *types.BlockMessages] } func newMessageCache(api IEvent) *messageCache { - blsMsgCache, _ := lru.NewARC[cid.Cid, *types.BlockMessages](500) + blsMsgCache, _ := arc.NewARC[cid.Cid, *types.BlockMessages](500) return &messageCache{ api: api, diff --git a/pkg/fork/fork.go b/pkg/fork/fork.go index 870cf9133f..390c309e43 100644 --- a/pkg/fork/fork.go +++ b/pkg/fork/fork.go @@ -50,6 +50,8 @@ import ( "github.com/filecoin-project/specs-actors/v7/actors/migration/nv15" "github.com/filecoin-project/specs-actors/v8/actors/migration/nv16" + init11 "github.com/filecoin-project/go-state-types/builtin/v11/init" + system11 "github.com/filecoin-project/go-state-types/builtin/v11/system" builtin0 "github.com/filecoin-project/specs-actors/actors/builtin" miner0 "github.com/filecoin-project/specs-actors/actors/builtin/miner" multisig0 "github.com/filecoin-project/specs-actors/actors/builtin/multisig" @@ -395,11 +397,20 @@ func DefaultUpgradeSchedule(cf *ChainFork, upgradeHeight *config.ForkUpgradeConf Migration: cf.UpgradeActorsV12, PreMigrations: []PreMigration{{ PreMigration: cf.PreUpgradeActorsV12, - StartWithin: 120, + StartWithin: 180, DontStartWithin: 15, StopWithin: 10, }}, Expensive: true, + }, { + Height: upgradeHeight.UpgradeWatermelonFixHeight, + Network: network.Version21, + Migration: cf.buildUpgradeActorsV12MinerFix(calibnetv12BuggyMinerCID1, calibnetv12BuggyManifestCID2), + }, + { + Height: upgradeHeight.UpgradeWatermelonFix2Height, + Network: network.Version21, + Migration: cf.buildUpgradeActorsV12MinerFix(calibnetv12BuggyMinerCID2, calibnetv12CorrectManifestCID1), }, } @@ -637,14 +648,19 @@ func (c *ChainFork) HandleStateForks(ctx context.Context, root cid.Cid, height a retCid := root u := c.stateMigrations[height] if u != nil && u.upgrade != nil { - migCid, ok, err := u.migrationResultCache.Get(ctx, root) - if err == nil && ok && !constants.NoMigrationResultCache { - log.Infow("CACHED migration", "height", height, "from", root, "to", migCid) - return migCid, nil - } else if err != nil { - log.Errorw("failed to lookup previous migration result", "err", err) + if height != c.forkUpgrade.UpgradeWatermelonFixHeight { + migCid, ok, err := u.migrationResultCache.Get(ctx, root) + if err == nil && ok && !constants.NoMigrationResultCache { + log.Infow("CACHED migration", "height", height, "from", root, "to", migCid) + return migCid, nil + } else if !errors.Is(err, dstore.ErrNotFound) { + log.Errorw("failed to lookup previous migration result", "err", err) + } else { + log.Debug("no cached migration found, migrating from scratch") + } } + var err error startTime := time.Now() log.Warnw("STARTING migration", "height", height, "from", root) // Yes, we clone the cache, even for the final upgrade epoch. Why? Reverts. We may @@ -2693,6 +2709,18 @@ func (c *ChainFork) UpgradeActorsV12(ctx context.Context, return newRoot, nil } +var ( + calibnetv12BuggyMinerCID1 = cid.MustParse("bafk2bzacecnh2ouohmonvebq7uughh4h3ppmg4cjsk74dzxlbbtlcij4xbzxq") + calibnetv12BuggyMinerCID2 = cid.MustParse("bafk2bzaced7emkbbnrewv5uvrokxpf5tlm4jslu2jsv77ofw2yqdglg657uie") + + calibnetv12BuggyBundleSuffix1 = "calibrationnet-12-rc1" + calibnetv12BuggyBundleSuffix2 = "calibrationnet-12-rc2" + + calibnetv12BuggyManifestCID1 = cid.MustParse("bafy2bzacedrunxfqta5skb7q7x32lnp4efz2oq7fn226ffm7fu5iqs62jkmvs") + calibnetv12BuggyManifestCID2 = cid.MustParse("bafy2bzacebl4w5ptfvuw6746w7ev562idkbf5ppq72e6zub22435ws2rukzru") + calibnetv12CorrectManifestCID1 = cid.MustParse("bafy2bzacednzb3pkrfnbfhmoqtb3bc6dgvxszpqklf3qcc7qzcage4ewzxsca") +) + func (c *ChainFork) upgradeActorsV12Common( ctx context.Context, cache MigrationCache, @@ -2722,13 +2750,53 @@ func (c *ChainFork) upgradeActorsV12Common( ) } - manifest, ok := actors.GetManifest(actorstypes.Version12) - if !ok { - return cid.Undef, fmt.Errorf("no manifest CID for v12 upgrade") + // check whether or not this is a calibnet upgrade + // we do this because calibnet upgraded to a "wrong" actors bundle, which was then corrected + // we thus upgrade to calibrationnet-buggy in this upgrade + actorsIn, err := vmstate.LoadState(ctx, adtStore, root) + if err != nil { + return cid.Undef, fmt.Errorf("loading state tree: %w", err) + } + + initActor, found, err := actorsIn.GetActor(ctx, builtin.InitActorAddr) + if err != nil { + return cid.Undef, fmt.Errorf("failed to get system actor: %w", err) + } + if !found { + return cid.Undef, fmt.Errorf("system actor %s not found", err) + } + + var initState init11.State + if err := adtStore.Get(ctx, initActor.Head, &initState); err != nil { + return cid.Undef, fmt.Errorf("failed to get system actor state: %w", err) + } + + var manifestCid cid.Cid + if initState.NetworkName == "calibrationnet" { + embedded, ok := actors.GetEmbeddedBuiltinActorsBundle(actorstypes.Version12, calibnetv12BuggyBundleSuffix1) + if !ok { + return cid.Undef, fmt.Errorf("didn't find buggy calibrationnet bundle") + } + + var err error + manifestCid, err = actors.LoadBundle(ctx, writeStore, bytes.NewReader(embedded)) + if err != nil { + return cid.Undef, fmt.Errorf("failed to load buggy calibnet bundle: %w", err) + } + + if manifestCid != calibnetv12BuggyManifestCID1 { + return cid.Undef, fmt.Errorf("didn't find expected buggy calibnet bundle manifest: %s != %s", manifestCid, calibnetv12BuggyManifestCID1) + } + } else { + var ok bool + manifestCid, ok = actors.GetManifest(actorstypes.Version12) + if !ok { + return cid.Undef, fmt.Errorf("no manifest CID for v12 upgrade") + } } // Perform the migration - newHamtRoot, err := nv21.MigrateStateTree(ctx, adtStore, manifest, stateRoot.Actors, epoch, config, + newHamtRoot, err := nv21.MigrateStateTree(ctx, adtStore, manifestCid, stateRoot.Actors, epoch, config, migrationLogger{}, cache) if err != nil { return cid.Undef, fmt.Errorf("upgrading to actors v12: %w", err) @@ -2756,6 +2824,169 @@ func (c *ChainFork) upgradeActorsV12Common( return newRoot, nil } +// //////////////////// +func (c *ChainFork) buildUpgradeActorsV12MinerFix(oldBuggyMinerCID, newManifestCID cid.Cid) func(ctx context.Context, cache MigrationCache, root cid.Cid, epoch abi.ChainEpoch, ts *types.TipSet) (cid.Cid, error) { + return func(ctx context.Context, cache MigrationCache, root cid.Cid, epoch abi.ChainEpoch, ts *types.TipSet) (cid.Cid, error) { + stateStore := c.bs + adtStore := adt.WrapStore(ctx, cbor.NewCborStore(stateStore)) + + // ensure that the manifest is loaded in the blockstore + + // this loads the "correct" bundle for UpgradeWatermelonFix2Height + if err := actors.LoadBundles(ctx, stateStore, actorstypes.Version12); err != nil { + return cid.Undef, fmt.Errorf("failed to load manifest bundle: %w", err) + } + + // this loads the second buggy bundle, for UpgradeWatermelonFixHeight + embedded, ok := actors.GetEmbeddedBuiltinActorsBundle(actorstypes.Version12, calibnetv12BuggyBundleSuffix2) + if !ok { + return cid.Undef, fmt.Errorf("didn't find buggy calibrationnet bundle") + } + + _, err := actors.LoadBundle(ctx, stateStore, bytes.NewReader(embedded)) + if err != nil { + return cid.Undef, fmt.Errorf("failed to load buggy calibnet bundle: %w", err) + } + + // now confirm we have the one we're migrating to + if haveManifest, err := stateStore.Has(ctx, newManifestCID); err != nil { + return cid.Undef, fmt.Errorf("blockstore error when loading manifest %s: %w", newManifestCID, err) + } else if !haveManifest { + return cid.Undef, fmt.Errorf("missing new manifest %s in blockstore", newManifestCID) + } + + // Load input state tree + actorsIn, err := vmstate.LoadState(ctx, adtStore, root) + if err != nil { + return cid.Undef, fmt.Errorf("loading state tree: %w", err) + } + + // load old manifest data + systemActor, found, err := actorsIn.GetActor(ctx, builtin.SystemActorAddr) + if err != nil { + return cid.Undef, fmt.Errorf("failed to get system actor: %w", err) + } + if !found { + return cid.Undef, fmt.Errorf("system actor not found") + } + + var systemState system11.State + if err := adtStore.Get(ctx, systemActor.Head, &systemState); err != nil { + return cid.Undef, fmt.Errorf("failed to get system actor state: %w", err) + } + + var oldManifestData manifest.ManifestData + if err := adtStore.Get(ctx, systemState.BuiltinActors, &oldManifestData); err != nil { + return cid.Undef, fmt.Errorf("failed to get old manifest data: %w", err) + } + + // load new manifest + var newManifest manifest.Manifest + if err := adtStore.Get(ctx, newManifestCID, &newManifest); err != nil { + return cid.Undef, fmt.Errorf("error reading actor manifest: %w", err) + } + + if err := newManifest.Load(ctx, adtStore); err != nil { + return cid.Undef, fmt.Errorf("error loading actor manifest: %w", err) + } + + // build the CID mapping + codeMapping := make(map[cid.Cid]cid.Cid, len(oldManifestData.Entries)) + for _, oldEntry := range oldManifestData.Entries { + newCID, ok := newManifest.Get(oldEntry.Name) + if !ok { + return cid.Undef, fmt.Errorf("missing manifest entry for %s", oldEntry.Name) + } + + // Note: we expect newCID to be the same as oldEntry.Code for all actors except the miner actor + codeMapping[oldEntry.Code] = newCID + } + + // Create empty actorsOut + + actorsOut, err := vmstate.NewState(adtStore, actorsIn.Version()) + if err != nil { + return cid.Undef, fmt.Errorf("failed to create new tree: %w", err) + } + + // Perform the migration + err = actorsIn.ForEach(func(a address.Address, actor *types.Actor) error { + newCid, ok := codeMapping[actor.Code] + if !ok { + return fmt.Errorf("didn't find mapping for %s", actor.Code) + } + + return actorsOut.SetActor(ctx, a, &types.Actor{ + Code: newCid, + Head: actor.Head, + Nonce: actor.Nonce, + Balance: actor.Balance, + Address: actor.Address, + }) + }) + if err != nil { + return cid.Undef, fmt.Errorf("failed to perform migration: %w", err) + } + + systemState.BuiltinActors = newManifest.Data + newSystemHead, err := adtStore.Put(ctx, &systemState) + if err != nil { + return cid.Undef, fmt.Errorf("failed to put new system state: %w", err) + } + + systemActor.Head = newSystemHead + if err = actorsOut.SetActor(ctx, builtin.SystemActorAddr, systemActor); err != nil { + return cid.Undef, fmt.Errorf("failed to put new system actor: %w", err) + } + + // Sanity checking + + err = actorsIn.ForEach(func(a address.Address, inActor *types.Actor) error { + outActor, found, err := actorsOut.GetActor(ctx, a) + if err != nil { + return fmt.Errorf("failed to get actor in outTree: %w", err) + } + if !found { + return fmt.Errorf("not found actor in outTree: %s", a) + } + + if inActor.Nonce != outActor.Nonce { + return fmt.Errorf("mismatched nonce for actor %s", a) + } + + if !inActor.Balance.Equals(outActor.Balance) { + return fmt.Errorf("mismatched balance for actor %s: %d != %d", a, inActor.Balance, outActor.Balance) + } + + if inActor.Address != outActor.Address && inActor.Address.String() != outActor.Address.String() { + return fmt.Errorf("mismatched address for actor %s: %s != %s", a, inActor.Address, outActor.Address) + } + + if inActor.Head != outActor.Head && a != builtin.SystemActorAddr { + return fmt.Errorf("mismatched head for actor %s", a) + } + + // Actor Codes are only expected to change for the miner actor + if inActor.Code != oldBuggyMinerCID && inActor.Code != outActor.Code { + return fmt.Errorf("unexpected change in code for actor %s", a) + } + + return nil + }) + if err != nil { + return cid.Undef, fmt.Errorf("failed to sanity check migration: %w", err) + } + + // Persist the result. + newRoot, err := actorsOut.Flush(ctx) + if err != nil { + return cid.Undef, fmt.Errorf("failed to persist new state root: %w", err) + } + + return newRoot, nil + } +} + func (c *ChainFork) GetForkUpgrade() *config.ForkUpgradeConfig { return c.forkUpgrade } diff --git a/pkg/fvm/fvm.go b/pkg/fvm/fvm.go index 9b74fcfd95..af1a0d3dc7 100644 --- a/pkg/fvm/fvm.go +++ b/pkg/fvm/fvm.go @@ -20,6 +20,7 @@ import ( "github.com/filecoin-project/go-state-types/exitcode" "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/go-state-types/network" + "github.com/filecoin-project/venus/pkg/config" "github.com/filecoin-project/venus/pkg/constants" "github.com/filecoin-project/venus/pkg/crypto" "github.com/filecoin-project/venus/pkg/state/tree" @@ -70,6 +71,11 @@ func (x *FvmExtern) TipsetCid(ctx context.Context, epoch abi.ChainEpoch) (cid.Ci return tsk.Cid() } +// todo: remove after nv21? +// https://github.com/filecoin-project/lotus/pull/11399 +var upgradeWatermelonFixHeight = abi.ChainEpoch(-1) +var setUpgradeWatermelonFixHeightOnce sync.Once + // VerifyConsensusFault is similar to the one in syscalls.go used by the LegacyVM, except it never errors // Errors are logged and "no fault" is returned, which is functionally what go-actors does anyway func (x *FvmExtern) VerifyConsensusFault(ctx context.Context, a, b, extra []byte) (*ffi_cgo.ConsensusFault, int64) { @@ -102,6 +108,14 @@ func (x *FvmExtern) VerifyConsensusFault(ctx context.Context, a, b, extra []byte fvmLog.Infof("invalid consensus fault: submitted blocks are the same") return ret, totalGas } + + if config.IsNearUpgrade(blockA.Height, upgradeWatermelonFixHeight) { + return ret, totalGas + } + if config.IsNearUpgrade(blockB.Height, upgradeWatermelonFixHeight) { + return ret, totalGas + } + // (1) check conditions necessary to any consensus fault // were blocks mined by same miner? @@ -288,6 +302,10 @@ func defaultFVMOpts(ctx context.Context, opts *vm.VmOption) (*ffi.FVMOpts, error } func NewFVM(ctx context.Context, opts *vm.VmOption) (*FVM, error) { + setUpgradeWatermelonFixHeightOnce.Do(func() { + upgradeWatermelonFixHeight = opts.Fork.GetForkUpgrade().UpgradeWatermelonFixHeight + }) + fvmOpts, err := defaultFVMOpts(ctx, opts) if err != nil { return nil, fmt.Errorf("creating fvm opts: %w", err) diff --git a/pkg/net/exchange/server.go b/pkg/net/exchange/server.go index 9f25365bfd..54f16066bb 100644 --- a/pkg/net/exchange/server.go +++ b/pkg/net/exchange/server.go @@ -70,7 +70,7 @@ func (s *server) handleStream(stream inet.Stream) { exchangeServerLog.Warnf("failed to read block sync request: %s", err) return } - exchangeServerLog.Infow("block sync request", "start", req.Head, "len", req.Length, "remote peer", stream.Conn().RemotePeer()) + exchangeServerLog.Debugw("block sync request", "start", req.Head, "len", req.Length, "remote peer", stream.Conn().RemotePeer()) resp, err := s.processRequest(ctx, &req) if err != nil { diff --git a/pkg/statemanger/state_manger.go b/pkg/statemanger/state_manger.go index 30ca8ab615..7c8845140b 100644 --- a/pkg/statemanger/state_manger.go +++ b/pkg/statemanger/state_manger.go @@ -27,7 +27,7 @@ import ( "github.com/filecoin-project/venus/venus-shared/actors/builtin/paych" blockstoreutil "github.com/filecoin-project/venus/venus-shared/blockstore" "github.com/filecoin-project/venus/venus-shared/types" - lru "github.com/hashicorp/golang-lru/v2" + "github.com/hashicorp/golang-lru/arc/v2" "github.com/ipfs/go-cid" logging "github.com/ipfs/go-log/v2" "go.opencensus.io/trace" @@ -78,7 +78,7 @@ type Stmgr struct { // We keep a small cache for calls to ExecutionTrace which helps improve // performance for node operators like exchanges and block explorers - execTraceCache *lru.ARCCache[types.TipSetKey, tipSetCacheEntry] + execTraceCache *arc.ARCCache[types.TipSetKey, tipSetCacheEntry] // We need a lock while making the copy as to prevent other callers // overwrite the cache while making the copy execTraceCacheLock sync.Mutex @@ -94,10 +94,10 @@ func NewStateManager(cs *chain.Store, actorDebugging bool, ) (*Stmgr, error) { log.Debugf("execTraceCache size: %d", execTraceCacheSize) - var execTraceCache *lru.ARCCache[types.TipSetKey, tipSetCacheEntry] + var execTraceCache *arc.ARCCache[types.TipSetKey, tipSetCacheEntry] var err error if execTraceCacheSize > 0 { - execTraceCache, err = lru.NewARC[types.TipSetKey, tipSetCacheEntry](execTraceCacheSize) + execTraceCache, err = arc.NewARC[types.TipSetKey, tipSetCacheEntry](execTraceCacheSize) if err != nil { return nil, err } diff --git a/venus-component/libp2p/exchange/server.go b/venus-component/libp2p/exchange/server.go index 8142e80058..43579f1662 100644 --- a/venus-component/libp2p/exchange/server.go +++ b/venus-component/libp2p/exchange/server.go @@ -113,7 +113,7 @@ func (s *Server) HandleStream(stream inet.Stream) { return } - slog.Infow("block sync request", "start", req.Head, "len", req.Length) + slog.Debugw("block sync request", "start", req.Head, "len", req.Length) resp, err := s.processRequest(ctx, &req) if err != nil { diff --git a/venus-devtool/compatible/actors/main.go b/venus-devtool/compatible/actors/main.go index f5a629f0ae..085aca160c 100644 --- a/venus-devtool/compatible/actors/main.go +++ b/venus-devtool/compatible/actors/main.go @@ -228,6 +228,7 @@ var replicaCmd = &cli.Command{ {"\"github.com/filecoin-project/lotus/blockstore\"", "blockstore \"github.com/filecoin-project/venus/pkg/util/blockstoreutil\""}, {"golang.org/x/xerrors", "fmt"}, {"xerrors.Errorf", "fmt.Errorf"}, + {"codeId", "codeID"}, } for _, file := range files { diff --git a/venus-devtool/go.mod b/venus-devtool/go.mod index 3d67880428..b6e35cc111 100644 --- a/venus-devtool/go.mod +++ b/venus-devtool/go.mod @@ -8,20 +8,20 @@ require ( github.com/filecoin-project/go-data-transfer/v2 v2.0.0-rc7 github.com/filecoin-project/go-fil-markets v1.28.3 github.com/filecoin-project/go-jsonrpc v0.3.1 - github.com/filecoin-project/go-state-types v0.12.5 - github.com/filecoin-project/lotus v1.24.0-rc2 + github.com/filecoin-project/go-state-types v0.12.8 + github.com/filecoin-project/lotus v1.24.0 github.com/filecoin-project/venus v0.0.0-00010101000000-000000000000 github.com/google/uuid v1.3.0 github.com/ipfs/go-block-format v0.1.2 github.com/ipfs/go-cid v0.4.1 github.com/ipfs/go-graphsync v0.14.6 github.com/ipld/go-ipld-selector-text-lite v0.0.1 - github.com/libp2p/go-libp2p v0.27.9 + github.com/libp2p/go-libp2p v0.30.0 github.com/libp2p/go-libp2p-pubsub v0.9.3 - github.com/multiformats/go-multiaddr v0.9.0 + github.com/multiformats/go-multiaddr v0.11.0 github.com/urfave/cli/v2 v2.25.5 github.com/whyrusleeping/cbor-gen v0.0.0-20230923211252-36a87e1ba72f - golang.org/x/tools v0.9.1 + golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846 ) require ( @@ -101,7 +101,8 @@ require ( github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/golang-lru v0.6.0 // indirect - github.com/hashicorp/golang-lru/v2 v2.0.2 // indirect + github.com/hashicorp/golang-lru/arc/v2 v2.0.7 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/icza/backscanner v0.0.0-20210726202459-ac2ffc679f94 // indirect github.com/ipfs/bbloom v0.0.4 // indirect github.com/ipfs/boxo v0.10.1 // indirect @@ -131,7 +132,7 @@ require ( github.com/jessevdk/go-flags v1.4.0 // indirect github.com/jpillora/backoff v1.0.0 // indirect github.com/kilic/bls12-381 v0.1.0 // indirect - github.com/klauspost/compress v1.16.6 // indirect + github.com/klauspost/compress v1.16.7 // indirect github.com/klauspost/cpuid/v2 v2.2.5 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect github.com/libp2p/go-cidranger v1.1.0 // indirect @@ -145,7 +146,7 @@ require ( github.com/magefile/mage v1.13.0 // indirect github.com/mattn/go-isatty v0.0.19 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect - github.com/miekg/dns v1.1.54 // indirect + github.com/miekg/dns v1.1.55 // indirect github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 // indirect github.com/minio/sha256-simd v1.0.1 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect @@ -197,13 +198,13 @@ require ( go.opentelemetry.io/otel/trace v1.16.0 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.24.0 // indirect + go.uber.org/zap v1.25.0 // indirect go4.org v0.0.0-20230225012048-214862532bf5 // indirect golang.org/x/crypto v0.14.0 // indirect - golang.org/x/exp v0.0.0-20230321023759-10a507213a29 // indirect - golang.org/x/mod v0.10.0 // indirect + golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 // indirect + golang.org/x/mod v0.12.0 // indirect golang.org/x/net v0.17.0 // indirect - golang.org/x/sync v0.2.0 // indirect + golang.org/x/sync v0.3.0 // indirect golang.org/x/sys v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect diff --git a/venus-devtool/go.sum b/venus-devtool/go.sum index 1a4f9a0de9..f25625a478 100644 --- a/venus-devtool/go.sum +++ b/venus-devtool/go.sum @@ -222,8 +222,8 @@ github.com/filecoin-project/go-state-types v0.1.4/go.mod h1:xCA/WfKlC2zcn3fUmDv4 github.com/filecoin-project/go-state-types v0.1.6/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= github.com/filecoin-project/go-state-types v0.1.10/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= github.com/filecoin-project/go-state-types v0.11.2-0.20230712101859-8f37624fa540/go.mod h1:SyNPwTsU7I22gL2r0OAPcImvLoTVfgRwdK/Y5rR1zz8= -github.com/filecoin-project/go-state-types v0.12.5 h1:VQ2N2T3JeUDdIHEo/xhjnT7Q218Wl0UYIyglqT7Z9Ck= -github.com/filecoin-project/go-state-types v0.12.5/go.mod h1:iJTqGdWDvzXhuVf64Lw0hzt4TIoitMo0VgHdxdjNDZI= +github.com/filecoin-project/go-state-types v0.12.8 h1:W/UObdAsv+LbB9EfyLg92DSYoatzUWmlfV8FGyh30VA= +github.com/filecoin-project/go-state-types v0.12.8/go.mod h1:gR2NV0CSGSQwopxF+3In9nDh1sqvoYukLcs5vK0AHCA= github.com/filecoin-project/go-statemachine v0.0.0-20200925024713-05bd7c71fbfe/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= github.com/filecoin-project/go-statemachine v1.0.3 h1:N07o6alys+V1tNoSTi4WuuoeNC4erS/6jE74+NsgQuk= github.com/filecoin-project/go-statemachine v1.0.3/go.mod h1:jZdXXiHa61n4NmgWFG4w8tnqgvZVHYbJ3yW7+y8bF54= @@ -232,8 +232,8 @@ github.com/filecoin-project/go-statestore v0.2.0 h1:cRRO0aPLrxKQCZ2UOQbzFGn4WDNd github.com/filecoin-project/go-statestore v0.2.0/go.mod h1:8sjBYbS35HwPzct7iT4lIXjLlYyPor80aU7t7a/Kspo= github.com/filecoin-project/kubo-api-client v0.0.1 h1:IR1b+sm+VYxSRvbgECVv9SbhIgygcXcSoN1Q7xsHDXg= github.com/filecoin-project/kubo-api-client v0.0.1/go.mod h1:c36PPMIVOkKfHDwDG5U05gUlPRY9wNuh/BePwo0e+6Y= -github.com/filecoin-project/lotus v1.24.0-rc2 h1:hhaWKecBuOUs0LoT4OuHG2s5HJuWicvfu2Tjc8DSDfg= -github.com/filecoin-project/lotus v1.24.0-rc2/go.mod h1:hKVsRPYzHjx8+8/hD+Yc3lRmLa6gTqGHLqJR8c9NEhg= +github.com/filecoin-project/lotus v1.24.0 h1:mamEoMdEmF9SKNboS6SWmYBwT62rkEtnntuXXROw74E= +github.com/filecoin-project/lotus v1.24.0/go.mod h1:8fj3yRE4+LSOtRbylbHgEErl1/ZFmoVZAACT8+fEhoE= 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= @@ -371,7 +371,7 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20230602150820-91b7bce49751 h1:hR7/MlvK23p6+lIw9SN1TigNLn9ZnF3W4SYRKq2gAHs= +github.com/google/pprof v0.0.0-20230817174616-7a8ec2ada47b h1:h9U78+dx9a4BKdQkBBos92HalKpaGKHrp+3Uo6yTodo= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -407,8 +407,10 @@ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru v0.6.0 h1:uL2shRDx7RTrOrTCUZEGP/wJUFiUI8QT6E7z5o8jga4= github.com/hashicorp/golang-lru v0.6.0/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/golang-lru/v2 v2.0.2 h1:Dwmkdr5Nc/oBiXgJS3CDHNhJtIHkuZ3DZF5twqnfBdU= -github.com/hashicorp/golang-lru/v2 v2.0.2/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= +github.com/hashicorp/golang-lru/arc/v2 v2.0.7 h1:QxkVTxwColcduO+LP7eJO56r2hFiG8zEbfAAzRv52KQ= +github.com/hashicorp/golang-lru/arc/v2 v2.0.7/go.mod h1:Pe7gBlGdc8clY5LJ0LpJXMt5AmgmWNH1g+oFFVUHOEc= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc= @@ -614,8 +616,8 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= -github.com/klauspost/compress v1.16.6 h1:91SKEy4K37vkp255cJ8QesJhjyRO0hn9i9G0GoUwLsk= -github.com/klauspost/compress v1.16.6/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= +github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.3/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= @@ -648,8 +650,8 @@ github.com/libp2p/go-flow-metrics v0.1.0 h1:0iPhMI8PskQwzh57jB9WxIuIOQ0r+15PChFG github.com/libp2p/go-flow-metrics v0.1.0/go.mod h1:4Xi8MX8wj5aWNDAZttg6UPmc0ZrnFNsMtpsYUClFtro= github.com/libp2p/go-libp2p v0.1.0/go.mod h1:6D/2OBauqLUoqcADOJpn9WbKqvaM07tDw68qHM0BxUM= github.com/libp2p/go-libp2p v0.1.1/go.mod h1:I00BRo1UuUSdpuc8Q2mN7yDF/oTUTRAX6JWpTiK9Rp8= -github.com/libp2p/go-libp2p v0.27.9 h1:n5p5bQD469v7I/1qncaHDq0BeSx4iT2fHF3NyNuKOmY= -github.com/libp2p/go-libp2p v0.27.9/go.mod h1:Tdx7ZuJl9NE78PkB4FjPVbf6kaQNOh2ppU/OVvVB6Wc= +github.com/libp2p/go-libp2p v0.30.0 h1:9EZwFtJPFBcs/yJTnP90TpN1hgrT/EsFfM+OZuwV87U= +github.com/libp2p/go-libp2p v0.30.0/go.mod h1:nr2g5V7lfftwgiJ78/HrID+pwvayLyqKCEirT2Y3Byg= github.com/libp2p/go-libp2p-asn-util v0.3.0 h1:gMDcMyYiZKkocGXDQ5nsUQyquC9+H+iLEQHwOCZ7s8s= github.com/libp2p/go-libp2p-asn-util v0.3.0/go.mod h1:B1mcOrKUE35Xq/ASTmQ4tN3LNzVVaMNmq2NACuqyB9w= github.com/libp2p/go-libp2p-autonat v0.1.0/go.mod h1:1tLf2yXxiE/oKGtDwPYWTSYG3PtvYlJmg7NeVtPRqH8= @@ -693,11 +695,11 @@ github.com/libp2p/go-msgio v0.0.3/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+ github.com/libp2p/go-msgio v0.3.0 h1:mf3Z8B1xcFN314sWX+2vOTShIE0Mmn2TXn3YCUQGNj0= github.com/libp2p/go-msgio v0.3.0/go.mod h1:nyRM819GmVaF9LX3l03RMh10QdOroF++NBbxAb0mmDM= github.com/libp2p/go-nat v0.0.3/go.mod h1:88nUEt0k0JD45Bk93NIwDqjlhiOwOoV36GchpcVc1yI= -github.com/libp2p/go-nat v0.1.0 h1:MfVsH6DLcpa04Xr+p8hmVRG4juse0s3J8HyNWYHffXg= +github.com/libp2p/go-nat v0.2.0 h1:Tyz+bUFAYqGyJ/ppPPymMGbIgNRH+WqC5QrT5fKrrGk= github.com/libp2p/go-netroute v0.2.1 h1:V8kVrpD8GK0Riv15/7VN6RbUQ3URNZVosw7H2v9tksU= github.com/libp2p/go-netroute v0.2.1/go.mod h1:hraioZr0fhBjG0ZRXJJ6Zj2IVEVNx6tDTFQfSmcq7mQ= github.com/libp2p/go-reuseport v0.0.1/go.mod h1:jn6RmB1ufnQwl0Q1f+YxAj8isJgDCQzaaxIFYDhcYEA= -github.com/libp2p/go-reuseport v0.2.0 h1:18PRvIMlpY6ZK85nIAicSBuXXvrYoSw3dsBAR7zc560= +github.com/libp2p/go-reuseport v0.4.0 h1:nR5KU7hD0WxXCJbmw7r2rhRYruNRl2koHw8fQscQm2s= github.com/libp2p/go-reuseport-transport v0.0.2/go.mod h1:YkbSDrvjUVDL6b8XqriyA20obEtsW9BLkuOUyQAOCbs= github.com/libp2p/go-stream-muxer v0.0.1/go.mod h1:bAo8x7YkSpadMTbtTaxGVHWUQsR/l5MEaHbKaliuT14= github.com/libp2p/go-stream-muxer-multistream v0.2.0/go.mod h1:j9eyPol/LLRqT+GPLSxvimPhNph4sfYfMoDPd7HkzIc= @@ -707,7 +709,7 @@ github.com/libp2p/go-ws-transport v0.1.0/go.mod h1:rjw1MG1LU9YDC6gzmwObkPd/Sqwhw github.com/libp2p/go-yamux v1.2.2/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= github.com/libp2p/go-yamux v1.2.3 h1:xX8A36vpXb59frIzWFdEgptLMsOANMFq2K7fPRlunYI= github.com/libp2p/go-yamux v1.2.3/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= -github.com/libp2p/go-yamux/v4 v4.0.0 h1:+Y80dV2Yx/kv7Y7JKu0LECyVdMXm1VUoko+VQ9rBfZQ= +github.com/libp2p/go-yamux/v4 v4.0.1 h1:FfDR4S1wj6Bw2Pqbc8Uz7pCxeRBPbwsBbEdfwiCypkQ= github.com/magefile/mage v1.9.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= github.com/magefile/mage v1.13.0 h1:XtLJl8bcCM7EFoO8FyH8XK3t7G5hQAeK+i4tq+veT9M= github.com/magefile/mage v1.13.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= @@ -726,8 +728,8 @@ github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zk github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/miekg/dns v1.1.12/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= -github.com/miekg/dns v1.1.54 h1:5jon9mWcb0sFJGpnI99tOMhCPyJ+RPVz5b63MQG0VWI= -github.com/miekg/dns v1.1.54/go.mod h1:uInx36IzPl7FYnDcMeVWxj9byh7DutNykX4G9Sj60FY= +github.com/miekg/dns v1.1.55 h1:GoQ4hpsj0nFLYe+bWiCToyrBEJXkQfOOIvFGFy0lEgo= +github.com/miekg/dns v1.1.55/go.mod h1:uInx36IzPl7FYnDcMeVWxj9byh7DutNykX4G9Sj60FY= github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b h1:z78hV3sbSMAUoyUMM0I83AUIT6Hu17AWfgjzIbtrYFc= github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc h1:PTfri+PuQmWDqERdnNMiD9ZejrlswWrCpBEZgWOiTrc= github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 h1:lYpkrQH5ajf0OXOcUbGjvZxxijuBwbbmlSxLiuofa+g= @@ -765,8 +767,8 @@ github.com/multiformats/go-multiaddr v0.0.1/go.mod h1:xKVEak1K9cS1VdmPZW3LSIb6lg github.com/multiformats/go-multiaddr v0.0.2/go.mod h1:xKVEak1K9cS1VdmPZW3LSIb6lgmoS58qz/pzqmAxV44= github.com/multiformats/go-multiaddr v0.0.4/go.mod h1:xKVEak1K9cS1VdmPZW3LSIb6lgmoS58qz/pzqmAxV44= github.com/multiformats/go-multiaddr v0.2.0/go.mod h1:0nO36NvPpyV4QzvTLi/lafl2y95ncPj0vFwVF6k6wJ4= -github.com/multiformats/go-multiaddr v0.9.0 h1:3h4V1LHIk5w4hJHekMKWALPXErDfz/sggzwC/NcqbDQ= -github.com/multiformats/go-multiaddr v0.9.0/go.mod h1:mI67Lb1EeTOYb8GQfL/7wpIZwc46ElrvzhYnoJOmTT0= +github.com/multiformats/go-multiaddr v0.11.0 h1:XqGyJ8ufbCE0HmTDwx2kPdsrQ36AGPZNZX6s6xfJH10= +github.com/multiformats/go-multiaddr v0.11.0/go.mod h1:gWUm0QLR4thQ6+ZF6SXUw8YjtwQSPapICM+NmCkxHSM= github.com/multiformats/go-multiaddr-dns v0.0.1/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q= github.com/multiformats/go-multiaddr-dns v0.0.2/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q= github.com/multiformats/go-multiaddr-dns v0.3.1 h1:QgQgR+LQVt3NPTjbrLLpsaT2ufAA2y0Mkk+QRVJbW3A= @@ -810,10 +812,10 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo/v2 v2.9.7 h1:06xGQy5www2oN160RtEZoTvnP2sPhEfePYmCDc2szss= +github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 h1:3snG66yBm59tKhhSPQrQ/0bCrv1LQbKt40LnUPiUxdc= +github.com/opencontainers/runtime-spec v1.1.0 h1:HHUyrt9mwHUjtasSbXSMvs4cyFxh+Bll4AjJ9odEGpg= github.com/opentracing-contrib/go-grpc v0.0.0-20210225150812-73cb765af46e h1:4cPxUYdgaGzZIT5/j0IfqOrrXmq6bG8AwvwisMXpdrg= github.com/opentracing-contrib/go-stdlib v1.0.0 h1:TBS7YuVotp8myLon4Pv7BtCBzOTo1DeZCld0Z63mW2w= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -878,9 +880,8 @@ github.com/prometheus/statsd_exporter v0.23.0/go.mod h1:1itCY9XMa2p5pjO5HseGjs5c github.com/puzpuzpuz/xsync/v2 v2.4.1 h1:aGdE1C/HaR/QC6YAFdtZXi60Df8/qBIrs8PKrzkItcM= github.com/puzpuzpuz/xsync/v2 v2.4.1/go.mod h1:gD2H2krq/w52MfPLE+Uy64TzJDVY7lP2znR9qmR35kU= github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo= -github.com/quic-go/qtls-go1-19 v0.3.3 h1:wznEHvJwd+2X3PqftRha0SUKmGsnb6dfArMhy9PeJVE= -github.com/quic-go/qtls-go1-20 v0.2.3 h1:m575dovXn1y2ATOb1XrRFcrv0F+EQmlowTkoraNkDPI= -github.com/quic-go/quic-go v0.33.1 h1:EVsG7O/7FVZI8Za71GzpHDoWpBTKdjDv1/x0KFcckho= +github.com/quic-go/qtls-go1-20 v0.3.2 h1:rRgN3WfnKbyik4dBV8A6girlJVxGand/d+jVKbQq5GI= +github.com/quic-go/quic-go v0.37.6 h1:2IIUmQzT5YNxAiaPGjs++Z4hGOtIR0q79uS5qE9ccfY= github.com/quic-go/webtransport-go v0.5.3 h1:5XMlzemqB4qmOlgIus5zB45AcZ2kCgCy2EptUrfOPWU= github.com/raulk/clock v1.1.0 h1:dpb29+UKMbLqiU/jqIJptgLR1nn23HLgMY0sTCDza5Y= github.com/raulk/clock v1.1.0/go.mod h1:3MpVxdZ/ODBQDxbN+kzshf5OSZwPjtMDx6BBXBmOeY0= @@ -1048,7 +1049,7 @@ go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/dig v1.17.0 h1:5Chju+tUvcC+N7N6EV08BJz41UZuO3BmHcN4A287ZLI= -go.uber.org/fx v1.19.3 h1:YqMRE4+2IepTYCMOvXqQpRa+QAVdiSTnsHU4XNWBceA= +go.uber.org/fx v1.20.0 h1:ZMC/pnRvhsthOZh9MZjMq5U8Or3mA9zBSPaLnzs3ihQ= go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= @@ -1062,8 +1063,8 @@ go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= -go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= -go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= +go.uber.org/zap v1.25.0 h1:4Hvk6GtkucQ790dqmj7l1eEnRdKm3k3ZUrUMS2d5+5c= +go.uber.org/zap v1.25.0/go.mod h1:JIAUzQIH94IC4fOJQm7gMmBJP5k7wQfdcnYdPoEXJYk= go4.org v0.0.0-20200411211856-f5505b9728dd/go.mod h1:CIiUVy99QCPfoE13bO4EZaz5GZMZXMSBGhxRdsvzbkg= go4.org v0.0.0-20230225012048-214862532bf5 h1:nifaUDeh+rPaBCMPMQHZmvJf+QdpLFnuQPwx+LxVmtc= go4.org v0.0.0-20230225012048-214862532bf5/go.mod h1:F57wTi5Lrj6WLyswp5EYV1ncrEbFGHD4hhz6S1ZYeaU= @@ -1105,8 +1106,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug= -golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 h1:m64FZMko/V45gv0bNmrNYoDEq8U5YUhetc9cBWKS1TQ= +golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63/go.mod h1:0v4NqG35kSWCMzLaMeX+IQrlSnVE/bqGSyC2cz/9Le8= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1129,8 +1130,8 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= -golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1197,8 +1198,8 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= -golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1344,8 +1345,8 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.9.1 h1:8WMNJAz3zrtPmnYC7ISf5dEn3MT0gY7jBJfw27yrrLo= -golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= +golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846 h1:Vve/L0v7CXXuxUmaMGIEK/dEeq7uiqb5qBgQrZzIE7E= +golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1473,7 +1474,6 @@ lukechampine.com/blake3 v1.1.6/go.mod h1:tkKEOtDkNtklkXtLNEOGNq5tcV90tJiA1vAA12R lukechampine.com/blake3 v1.1.7/go.mod h1:tkKEOtDkNtklkXtLNEOGNq5tcV90tJiA1vAA12R78LA= lukechampine.com/blake3 v1.2.1 h1:YuqqRuaqsGV71BV/nm9xlI0MKUv4QC54jQnBChWbGnI= lukechampine.com/blake3 v1.2.1/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1LM6k= -nhooyr.io/websocket v1.8.7 h1:usjR2uOr/zjjkVMy0lW+PPohFok7PCow5sDjLgX4P4g= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/venus-shared/actors/builtin-actors-code/v12.tar.zst b/venus-shared/actors/builtin-actors-code/v12.tar.zst index 38cb851603..981a17c97d 100644 Binary files a/venus-shared/actors/builtin-actors-code/v12.tar.zst and b/venus-shared/actors/builtin-actors-code/v12.tar.zst differ diff --git a/venus-shared/actors/builtin/builtin.go b/venus-shared/actors/builtin/builtin.go index 6fd1a25025..eab597ed70 100644 --- a/venus-shared/actors/builtin/builtin.go +++ b/venus-shared/actors/builtin/builtin.go @@ -33,6 +33,7 @@ import ( minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner" ) +var InitActorAddr = builtin.InitActorAddr var SystemActorAddr = builtin.SystemActorAddr var BurntFundsActorAddr = builtin.BurntFundsActorAddr var CronActorAddr = builtin.CronActorAddr diff --git a/venus-shared/actors/builtin/builtin.go.template b/venus-shared/actors/builtin/builtin.go.template index 26dd1e6c86..20af3f8a90 100644 --- a/venus-shared/actors/builtin/builtin.go.template +++ b/venus-shared/actors/builtin/builtin.go.template @@ -25,6 +25,7 @@ import ( smoothingtypes "github.com/filecoin-project/go-state-types/builtin/v8/util/smoothing" ) +var InitActorAddr = builtin.InitActorAddr var SystemActorAddr = builtin.SystemActorAddr var BurntFundsActorAddr = builtin.BurntFundsActorAddr var CronActorAddr = builtin.CronActorAddr diff --git a/venus-shared/actors/builtin_actors.go b/venus-shared/actors/builtin_actors.go index acc0827153..7ff3704773 100644 --- a/venus-shared/actors/builtin_actors.go +++ b/venus-shared/actors/builtin_actors.go @@ -92,11 +92,9 @@ func UseNetworkBundle(netw string) error { if NetworkBundle == netw { return nil } - if err := loadManifests(netw); err != nil { - return err - } NetworkBundle = netw - return nil + + return loadManifests(netw) } func loadManifests(netw string) error { @@ -134,6 +132,13 @@ func loadManifests(netw string) error { RegisterManifest(meta.Version, meta.ManifestCid, meta.Actors) } + // The following code cid existed temporarily on the calibnet testnet, as a "buggy" storage miner actor implementation. + // We include them in our builtin bundle, but intentionally omit from metadata. + if NetworkBundle == "calibrationnet" { + AddActorMeta("storageminer", cid.MustParse("bafk2bzacecnh2ouohmonvebq7uughh4h3ppmg4cjsk74dzxlbbtlcij4xbzxq"), actorstypes.Version12) + AddActorMeta("storageminer", cid.MustParse("bafk2bzaced7emkbbnrewv5uvrokxpf5tlm4jslu2jsv77ofw2yqdglg657uie"), actorstypes.Version12) + } + return nil } @@ -226,6 +231,13 @@ func readEmbeddedBuiltinActorsMetadata(bundle string) ([]*BuiltinActorsMetadata, if err != nil { return nil, fmt.Errorf("error loading builtin actors bundle: %w", err) } + + // The following manifest cids existed temporarily on the calibnet testnet + // We include them in our builtin bundle, but intentionally omit from metadata + if root == cid.MustParse("bafy2bzacedrunxfqta5skb7q7x32lnp4efz2oq7fn226ffm7fu5iqs62jkmvs") || + root == cid.MustParse("bafy2bzacebl4w5ptfvuw6746w7ev562idkbf5ppq72e6zub22435ws2rukzru") { + continue + } bundles = append(bundles, &BuiltinActorsMetadata{ Network: name, Version: actorstypes.Version(version), @@ -275,7 +287,7 @@ func readBundleManifest(r io.Reader) (cid.Cid, map[string]cid.Cid, error) { } // GetEmbeddedBuiltinActorsBundle returns the builtin-actors bundle for the given actors version. -func GetEmbeddedBuiltinActorsBundle(version actorstypes.Version) ([]byte, bool) { +func GetEmbeddedBuiltinActorsBundle(version actorstypes.Version, networkBundleName string) ([]byte, bool) { fi, err := embeddedBuiltinActorReleases.Open(fmt.Sprintf("builtin-actors-code/v%d.tar.zst", version)) if err != nil { return nil, false @@ -286,7 +298,7 @@ func GetEmbeddedBuiltinActorsBundle(version actorstypes.Version) ([]byte, bool) defer uncompressed.Close() //nolint tarReader := tar.NewReader(uncompressed) - targetFileName := fmt.Sprintf("builtin-actors-%s.car", NetworkBundle) + targetFileName := fmt.Sprintf("builtin-actors-%s.car", networkBundleName) for { header, err := tarReader.Next() switch err { diff --git a/venus-shared/actors/builtin_actors_bundle.go b/venus-shared/actors/builtin_actors_bundle.go index 0f5b54dd65..d96338495c 100644 --- a/venus-shared/actors/builtin_actors_bundle.go +++ b/venus-shared/actors/builtin_actors_bundle.go @@ -64,7 +64,7 @@ func LoadBundles(ctx context.Context, bs blockstore.Blockstore, versions ...acto ) if path, ok := BundleOverrides[av]; ok { root, err = LoadBundleFromFile(ctx, bs, path) - } else if embedded, ok := GetEmbeddedBuiltinActorsBundle(av); ok { + } else if embedded, ok := GetEmbeddedBuiltinActorsBundle(av, NetworkBundle); ok { root, err = LoadBundle(ctx, bs, bytes.NewReader(embedded)) } else { err = fmt.Errorf("bundle for actors version v%d not found", av) diff --git a/venus-shared/actors/builtin_actors_gen.go b/venus-shared/actors/builtin_actors_gen.go index 867aa5b828..a719def318 100644 --- a/venus-shared/actors/builtin_actors_gen.go +++ b/venus-shared/actors/builtin_actors_gen.go @@ -97,7 +97,7 @@ var EmbeddedBuiltinActorsMetadata []*BuiltinActorsMetadata = []*BuiltinActorsMet Network: "butterflynet", Version: 12, - ManifestCid: mustParseCid("bafy2bzaceb7s3k6zyuubqil7s2rwdcdyslqqx2fn2cj536yh3hexlyi4syyk6"), + ManifestCid: mustParseCid("bafy2bzacectxvbk77ntedhztd6sszp2btrtvsmy7lp2ypnrk6yl74zb34t2cq"), Actors: map[string]cid.Cid{ "account": mustParseCid("bafk2bzacebp7anjdtg2sohyt6lromx4xs7nujtwdfcsffnptphaayabx7ysxs"), "cron": mustParseCid("bafk2bzacecu2y3awtemmglpkroiglulc2fj3gpdn6eazdqr6avcautiaighrg"), @@ -111,7 +111,7 @@ var EmbeddedBuiltinActorsMetadata []*BuiltinActorsMetadata = []*BuiltinActorsMet "placeholder": mustParseCid("bafk2bzacedfvut2myeleyq67fljcrw4kkmn5pb5dpyozovj7jpoez5irnc3ro"), "reward": mustParseCid("bafk2bzacedebvitdsztwebi44t5es4ls3p3hor252igzawr3s6uznmbvzh2ou"), "storagemarket": mustParseCid("bafk2bzaceb2tdeqtt2eqpzeb3gezuchb7g7uzbd52bgvcdt6bg3ckq7oisb74"), - "storageminer": mustParseCid("bafk2bzaceaaztuglvw6pw5xohwfekbw47iyugbyftxrp6hwygsaiu6rebtcty"), + "storageminer": mustParseCid("bafk2bzaceb62clldtod2jimnri5k2koxttf6vqtlsvkjhnwduzs7sgsoakglw"), "storagepower": mustParseCid("bafk2bzacedxvlj5xmhytdjrjqyonz37duvxb2ioyzk75c27yypkqalxuh3xh6"), "system": mustParseCid("bafk2bzacec3vwj2chzaram3iqupkbfiein5h2l5qiltlrngbju2vg5umelclm"), "verifiedregistry": mustParseCid("bafk2bzacedv2irkql7nil3w5v3ohqq3e54w62pxeoppjmaktzokolaaoh5ksu"), @@ -203,7 +203,7 @@ var EmbeddedBuiltinActorsMetadata []*BuiltinActorsMetadata = []*BuiltinActorsMet Network: "calibrationnet", Version: 12, - ManifestCid: mustParseCid("bafy2bzacedrunxfqta5skb7q7x32lnp4efz2oq7fn226ffm7fu5iqs62jkmvs"), + ManifestCid: mustParseCid("bafy2bzacednzb3pkrfnbfhmoqtb3bc6dgvxszpqklf3qcc7qzcage4ewzxsca"), Actors: map[string]cid.Cid{ "account": mustParseCid("bafk2bzacechwwxdqvggkdylm37zldjsra2ivkdzwp7fee56bzxbzs544wv6u6"), "cron": mustParseCid("bafk2bzacec4gdxxkqwxqqodsv6ug5dmdbqdfqwyqfek3yhxc2wweh5psxaeq6"), @@ -217,7 +217,7 @@ var EmbeddedBuiltinActorsMetadata []*BuiltinActorsMetadata = []*BuiltinActorsMet "placeholder": mustParseCid("bafk2bzacedfvut2myeleyq67fljcrw4kkmn5pb5dpyozovj7jpoez5irnc3ro"), "reward": mustParseCid("bafk2bzacedra77pcglf7vdca2itcaa4vd6xrxynxmgfgdjdxqxfwqyhtoxehy"), "storagemarket": mustParseCid("bafk2bzacea7g46y7xxu2zjq2h75x6mmx3utz2uxnlvnwi6tzpsvulna3bmiva"), - "storageminer": mustParseCid("bafk2bzacecnh2ouohmonvebq7uughh4h3ppmg4cjsk74dzxlbbtlcij4xbzxq"), + "storageminer": mustParseCid("bafk2bzaceb7qzqsi5uyxe4o5iuasi47l2hnznvmqr2eu4pl3qscvarjqlnuxo"), "storagepower": mustParseCid("bafk2bzacedd3ka44k7d46ckbinjhv3diyuu2epgbyvhqqyjkc64qlrg3wlgzi"), "system": mustParseCid("bafk2bzacecioupndtcnyw6iq2hbrxag3aufvczlv5nobnfbkbywqzcyfaa376"), "verifiedregistry": mustParseCid("bafk2bzaceavldupmf7bimeeacs67z5xdfdlfca6p7sn6bev3mt5ggepfqvhqo"), @@ -318,7 +318,7 @@ var EmbeddedBuiltinActorsMetadata []*BuiltinActorsMetadata = []*BuiltinActorsMet Network: "caterpillarnet", Version: 12, - ManifestCid: mustParseCid("bafy2bzacedrimdbavexkdqldjwczbhlx4k5byshl363z62rrt6vkt7mbvnulu"), + ManifestCid: mustParseCid("bafy2bzacebxiub6qsy67asvl5cx33x5vjbuqinalmf3xtnbmokxmmklzdkvei"), Actors: map[string]cid.Cid{ "account": mustParseCid("bafk2bzacecereuhejfvodut5357cai4lmhsyr7uenhcxvmw6jpmhe6auuly32"), "cron": mustParseCid("bafk2bzacebo2whgy6jla4jsf5j4ovlqm2e4eepedlpw5wadas33yxmunis4b4"), @@ -332,7 +332,7 @@ var EmbeddedBuiltinActorsMetadata []*BuiltinActorsMetadata = []*BuiltinActorsMet "placeholder": mustParseCid("bafk2bzacedfvut2myeleyq67fljcrw4kkmn5pb5dpyozovj7jpoez5irnc3ro"), "reward": mustParseCid("bafk2bzaceb2x5zgkrho373l3ippp6krs7brugssg6hj2tib22xmqjzdm2o25a"), "storagemarket": mustParseCid("bafk2bzaced5j6drzmsebpxbf2dtptrc5tyidlbftdljqxavxqb57s2qpbvdek"), - "storageminer": mustParseCid("bafk2bzacedozwxc3c6nqqajafs3hsjviyijhthysd5two5ptm5fcdbwh224ag"), + "storageminer": mustParseCid("bafk2bzaceckgusfenkczxolfczvnygnuhxbou5to2skwwngbkihla7hgdv4yy"), "storagepower": mustParseCid("bafk2bzaceagp6ilkltsltwii66nz6a4zen4qtfk7rdkvdv3gzq7fbv4ivox3u"), "system": mustParseCid("bafk2bzacedye5j5uxox7knb6zlnhseaadztyav76mjbyk5qslhhbpiy5cdtt2"), "verifiedregistry": mustParseCid("bafk2bzacecduww5pirr7dvaijjijw4gf6ygf7vipgxh4scvv6vseo46gueb46"), @@ -424,7 +424,7 @@ var EmbeddedBuiltinActorsMetadata []*BuiltinActorsMetadata = []*BuiltinActorsMet Network: "devnet", Version: 12, - ManifestCid: mustParseCid("bafy2bzacebk6yiirh4ennphzyka7b6g6jzn3lt4lr5ht7rjwulnrcthjihapo"), + ManifestCid: mustParseCid("bafy2bzaceasjdukhhyjbegpli247vbf5h64f7uvxhhebdihuqsj2mwisdwa6o"), Actors: map[string]cid.Cid{ "account": mustParseCid("bafk2bzacedki4apynvdxxuoigmqkgaktgy2erjftoxqxqaklnelgveyaqknfu"), "cron": mustParseCid("bafk2bzacebjpczf7qtcisy3zdp3sqoohxe75tgupmdo5dr26vh7orzrsjn3b2"), @@ -438,7 +438,7 @@ var EmbeddedBuiltinActorsMetadata []*BuiltinActorsMetadata = []*BuiltinActorsMet "placeholder": mustParseCid("bafk2bzacedfvut2myeleyq67fljcrw4kkmn5pb5dpyozovj7jpoez5irnc3ro"), "reward": mustParseCid("bafk2bzacebzso6xkjxdscbpncw7el2d4hap6lfkgwqzrbc76lzp33vkwk6obc"), "storagemarket": mustParseCid("bafk2bzacebzg74vyk3gzbhnz4zviwvxblyar574mtd6ayognmsvlkriejmunu"), - "storageminer": mustParseCid("bafk2bzaceajgt523lr2sf6cacvzo3goyalljlkaoeehyhxlv57wevkljw2cps"), + "storageminer": mustParseCid("bafk2bzacecs262232b3awcrilyzpdketeayyqzzwgoavtxilgjvayrz55ovk4"), "storagepower": mustParseCid("bafk2bzacebbtj2m2ajawfuzxqz5nmdep7xevjo2qfjqa5tx3vr5m6qojolya4"), "system": mustParseCid("bafk2bzacecnau5wddulbsvwn75tc3w75jrlvkybgrlxs4ngonqab6xq3eowvg"), "verifiedregistry": mustParseCid("bafk2bzacec37mddea65nvh4htsagtryfa3sq6i67utcupslyhzbhjhoy6hopa"), @@ -553,7 +553,7 @@ var EmbeddedBuiltinActorsMetadata []*BuiltinActorsMetadata = []*BuiltinActorsMet Network: "mainnet", Version: 12, - ManifestCid: mustParseCid("bafy2bzacebxmnxdgt2usdrcrpotgodr75culawwv4eklaun4lu6vlxecql6h2"), + ManifestCid: mustParseCid("bafy2bzaceapkgfggvxyllnmuogtwasmsv5qi2qzhc2aybockd6kag2g5lzaio"), Actors: map[string]cid.Cid{ "account": mustParseCid("bafk2bzaceboftg75mdiba7xbo2i3uvgtca4brhnr3u5ptihonixgpnrvhpxoa"), "cron": mustParseCid("bafk2bzacechxjkfe2cehx4s7skj3wzfpzf7zolds64khrrrs66bhazsemktls"), @@ -567,7 +567,7 @@ var EmbeddedBuiltinActorsMetadata []*BuiltinActorsMetadata = []*BuiltinActorsMet "placeholder": mustParseCid("bafk2bzacedfvut2myeleyq67fljcrw4kkmn5pb5dpyozovj7jpoez5irnc3ro"), "reward": mustParseCid("bafk2bzacealqnxn5lwzwexd6reav4dppypquklx2ujlnvaxiqk2tzstyvkp5u"), "storagemarket": mustParseCid("bafk2bzacedylkg5am446lcuih4voyzdn4yjeqfsxfzh5b6mcuhx4mok5ph5c4"), - "storageminer": mustParseCid("bafk2bzacea56yi2khvvorofkf2t4rb5fbmltahrjtauszirdjz4jbunt55xsk"), + "storageminer": mustParseCid("bafk2bzacedo75pabe4i2l3hvhtsjmijrcytd2y76xwe573uku25fi7sugqld6"), "storagepower": mustParseCid("bafk2bzacecsij5tpfzjpfuckxvccv2p3bdqjklkrfyyoei6lx5dyj5j4fvjm6"), "system": mustParseCid("bafk2bzacebfqrja2hip7esf4eafxjmu6xcogoqu5xxtgdg7xa5szgvvdguchu"), "verifiedregistry": mustParseCid("bafk2bzacedudgflxc75c77c6zkmfyq4u2xuk7k6xw6dfdccarjrvxx453b77q"), @@ -659,7 +659,7 @@ var EmbeddedBuiltinActorsMetadata []*BuiltinActorsMetadata = []*BuiltinActorsMet Network: "testing", Version: 12, - ManifestCid: mustParseCid("bafy2bzacebzcqzzlb5iwrledyuyy7pvob3xwzoxqsrvrbrnpaiejb52na5eza"), + ManifestCid: mustParseCid("bafy2bzaceaaxd6ytavsek5bi5soqo7qamezuqfyfjy42es2clpbzu3pwzcmye"), Actors: map[string]cid.Cid{ "account": mustParseCid("bafk2bzacea74qqkfvacykmq5emzqblh4f4nmxdkiyixxpzs7kkcfnbfa7cb6m"), "cron": mustParseCid("bafk2bzacecotbu7k6awdzfzakf7g5iaas6gswtunjnnb2xm2klqoshjgb4imy"), @@ -673,7 +673,7 @@ var EmbeddedBuiltinActorsMetadata []*BuiltinActorsMetadata = []*BuiltinActorsMet "placeholder": mustParseCid("bafk2bzacedfvut2myeleyq67fljcrw4kkmn5pb5dpyozovj7jpoez5irnc3ro"), "reward": mustParseCid("bafk2bzaceaajyncjxcrl7wbb6ukzkueyqz4uyekxpmtn4mpndkf7ksmggopzq"), "storagemarket": mustParseCid("bafk2bzaced6cexdcinwjhtfvuxgkxukiejp3goylaxtvhqfd24rs5z7g2z7dm"), - "storageminer": mustParseCid("bafk2bzacecw6jvvfu62jkwsa4vzmn262cjrrxh6wza6nvjsyg5aeix7rzgmbe"), + "storageminer": mustParseCid("bafk2bzacecvkbsjhufq2zr2dojohukdnql3gkqzdkmtp2hxvn5kczxp3tu6ko"), "storagepower": mustParseCid("bafk2bzacedexrf5qplrrl5xzijfrthjdqwodfs5e6zj5kpztc7qnywbqdyiii"), "system": mustParseCid("bafk2bzacecp4roanbxq3bflftlkipsoqqxio5etjjnzxus5pcu7lq43fnxb34"), "verifiedregistry": mustParseCid("bafk2bzaceandytrgcnuvizfi47sijbqh6c243vjtzlzumexm6kjv7s7hye45g"), @@ -765,7 +765,7 @@ var EmbeddedBuiltinActorsMetadata []*BuiltinActorsMetadata = []*BuiltinActorsMet Network: "testing-fake-proofs", Version: 12, - ManifestCid: mustParseCid("bafy2bzacedtskkmrkkzairdi66syrmvfpydg63ro4dlmmqeta5krnur4hcp3a"), + ManifestCid: mustParseCid("bafy2bzacecver4l5d6jiuzubhrtcxjjfdx6jnxbmyp4bselol2atgkhz3e3um"), Actors: map[string]cid.Cid{ "account": mustParseCid("bafk2bzacea74qqkfvacykmq5emzqblh4f4nmxdkiyixxpzs7kkcfnbfa7cb6m"), "cron": mustParseCid("bafk2bzacecotbu7k6awdzfzakf7g5iaas6gswtunjnnb2xm2klqoshjgb4imy"), @@ -779,7 +779,7 @@ var EmbeddedBuiltinActorsMetadata []*BuiltinActorsMetadata = []*BuiltinActorsMet "placeholder": mustParseCid("bafk2bzacedfvut2myeleyq67fljcrw4kkmn5pb5dpyozovj7jpoez5irnc3ro"), "reward": mustParseCid("bafk2bzaceaajyncjxcrl7wbb6ukzkueyqz4uyekxpmtn4mpndkf7ksmggopzq"), "storagemarket": mustParseCid("bafk2bzaced6cexdcinwjhtfvuxgkxukiejp3goylaxtvhqfd24rs5z7g2z7dm"), - "storageminer": mustParseCid("bafk2bzacea54x727xteh3tl46mitigy6cldqusqjxiwni65wrpofidh62k2ds"), + "storageminer": mustParseCid("bafk2bzacedapzgrbc2rsmuqex76ftt2b62q6opi56gh2dr2oyyzuwin62rweg"), "storagepower": mustParseCid("bafk2bzacecdwijcbbryinjtm27pdinqqkyzoskri24pwsvsadwcq2alkkjpnc"), "system": mustParseCid("bafk2bzacecp4roanbxq3bflftlkipsoqqxio5etjjnzxus5pcu7lq43fnxb34"), "verifiedregistry": mustParseCid("bafk2bzaceandytrgcnuvizfi47sijbqh6c243vjtzlzumexm6kjv7s7hye45g"), diff --git a/venus-shared/actors/manifest.go b/venus-shared/actors/manifest.go index 269f7bf06d..07a88af862 100644 --- a/venus-shared/actors/manifest.go +++ b/venus-shared/actors/manifest.go @@ -54,6 +54,12 @@ func RegisterManifest(av actorstypes.Version, manifestCid cid.Cid, entries map[s } } +func AddActorMeta(name string, codeID cid.Cid, av actorstypes.Version) { + manifestMx.Lock() + defer manifestMx.Unlock() + actorMeta[codeID] = actorEntry{name: name, version: av} +} + // GetManifest gets a loaded manifest. func GetManifest(av actorstypes.Version) (cid.Cid, bool) { manifestMx.RLock() diff --git a/venus-shared/utils/method_map_test.go b/venus-shared/utils/method_map_test.go index e049f49a7c..ebb1a266e9 100644 --- a/venus-shared/utils/method_map_test.go +++ b/venus-shared/utils/method_map_test.go @@ -27,10 +27,10 @@ func TestMethodMap(t *testing.T) { }) t.Run("ReLoad butterflynet actors", func(t *testing.T) { - assert.Nil(t, actors.SetNetworkBundle(int(types.NetworkButterfly))) + assert.Nil(t, actors.SetNetworkBundle(int(types.NetworkCalibnet))) ReloadMethodsMap() for _, actorsMetadata := range actors.EmbeddedBuiltinActorsMetadata { - if actorsMetadata.Network == string(types.NetworkNameButterfly) { + if actorsMetadata.Network == string(types.NetworkNameCalibration) { for name, actor := range actorsMetadata.Actors { checkActorCode(t, actorsMetadata.Version, actor, name, actorsMetadata.Network) }