From b914e95f346de9b60b1f2deb71347f46d0d22508 Mon Sep 17 00:00:00 2001 From: ZenGround0 Date: Tue, 10 Aug 2021 15:50:37 -0400 Subject: [PATCH 1/3] revert pricelist by version to pricelist by epoch --- api/version.go | 4 +-- build/openrpc/worker.json.gz | Bin 2711 -> 2711 bytes build/params_2k.go | 1 - build/params_butterfly.go | 1 - build/params_calibnet.go | 2 -- build/params_interop.go | 1 - build/params_mainnet.go | 1 - build/params_nerpanet.go | 1 - build/params_testground.go | 31 ++++++++++---------- chain/actors/version.go | 2 +- chain/messagepool/check.go | 2 +- chain/messagepool/messagepool.go | 3 +- chain/messagepool/selection.go | 2 +- chain/stmgr/upgrades.go | 4 --- chain/sync.go | 2 +- chain/vm/gas.go | 28 ++++++++++-------- chain/vm/mkactor.go | 2 +- chain/vm/vm.go | 4 +-- documentation/en/api-v0-methods-miner.md | 2 +- documentation/en/api-v0-methods-worker.md | 2 +- documentation/en/api-v0-methods.md | 2 +- documentation/en/api-v1-unstable-methods.md | 2 +- 22 files changed, 45 insertions(+), 54 deletions(-) diff --git a/api/version.go b/api/version.go index ef59dd104..687f5135a 100644 --- a/api/version.go +++ b/api/version.go @@ -54,8 +54,8 @@ func VersionForType(nodeType NodeType) (Version, error) { // semver versions of the rpc api exposed var ( - FullAPIVersion0 = newVer(1, 3, 1) - FullAPIVersion1 = newVer(2, 1, 1) + FullAPIVersion0 = newVer(1, 3, 0) + FullAPIVersion1 = newVer(2, 1, 0) MinerAPIVersion0 = newVer(1, 2, 0) WorkerAPIVersion0 = newVer(1, 1, 0) diff --git a/build/openrpc/worker.json.gz b/build/openrpc/worker.json.gz index 5c6e4a866be993d0dfe3a93e1fe3a320dfabeec9..46ed1f5b266010aaadb7d84332548e4f0029ce16 100644 GIT binary patch delta 2502 zcmV;%2|4zc6_*u|8-FmV+J`yV-J@z|mV=$!hk-g2yOU_KC9fm{87klXO12Z*v7J~U znG3-+RT(U+rEaPJ{M4507tDQN!nbiBA2-^K9=0%LLyr3|SW)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Jjq-tv;A@rve+7R+f$iVa~_10CH3tyTw6^x}dy zFN9Y}k(-g#^{XV@W_G2ubY@!p*Ko_LPm~^%>rB3>@xzlh2_6s?bKqsgr>hFLYn&jP zI*kjHWeGR|3zMD+AUdv;9)KYi9yn+)K?MCL`Uazg2)f`7*y!MSOzknE%%NID-G>*r zirV__kx%SLaOS08@bVn8PtYq8y?}Vy<2NaZ{O3vvDm9jMX zH79#(?knAYvHB%l4P0(NN)#|fU8Ke!01*L*MNjD@5&>i3v%NQJ?1xK6o%ir`dO!VN Q00030|JgX%cUgJ>0IQnrasU7T diff --git a/build/params_2k.go b/build/params_2k.go index a1ccb0ce3..efa38dc0c 100644 --- a/build/params_2k.go +++ b/build/params_2k.go @@ -28,7 +28,6 @@ var UpgradeAssemblyHeight = abi.ChainEpoch(-5) var UpgradeLiftoffHeight = abi.ChainEpoch(-6) var UpgradeKumquatHeight = abi.ChainEpoch(-7) -var UpgradePricelistOopsHeight = abi.ChainEpoch(-8) var UpgradeCalicoHeight = abi.ChainEpoch(-9) var UpgradePersianHeight = abi.ChainEpoch(-10) var UpgradeOrangeHeight = abi.ChainEpoch(-11) diff --git a/build/params_butterfly.go b/build/params_butterfly.go index 14b885e5f..4f4cc756d 100644 --- a/build/params_butterfly.go +++ b/build/params_butterfly.go @@ -28,7 +28,6 @@ var UpgradeAssemblyHeight = abi.ChainEpoch(30) const UpgradeTapeHeight = 60 const UpgradeLiftoffHeight = -5 const UpgradeKumquatHeight = 90 -const UpgradePricelistOopsHeight = 119 const UpgradeCalicoHeight = 120 const UpgradePersianHeight = 150 const UpgradeClausHeight = 180 diff --git a/build/params_calibnet.go b/build/params_calibnet.go index fe871bcca..df334a516 100644 --- a/build/params_calibnet.go +++ b/build/params_calibnet.go @@ -33,8 +33,6 @@ const UpgradeLiftoffHeight = -5 const UpgradeKumquatHeight = 90 -const UpgradePricelistOopsHeight = 119 - const UpgradeCalicoHeight = 120 const UpgradePersianHeight = UpgradeCalicoHeight + (builtin2.EpochsInHour * 1) diff --git a/build/params_interop.go b/build/params_interop.go index b5e49577d..921dd0981 100644 --- a/build/params_interop.go +++ b/build/params_interop.go @@ -31,7 +31,6 @@ var UpgradeAssemblyHeight = abi.ChainEpoch(-5) var UpgradeLiftoffHeight = abi.ChainEpoch(-6) var UpgradeKumquatHeight = abi.ChainEpoch(-7) -var UpgradePricelistOopsHeight = abi.ChainEpoch(-8) var UpgradeCalicoHeight = abi.ChainEpoch(-9) var UpgradePersianHeight = abi.ChainEpoch(-10) var UpgradeOrangeHeight = abi.ChainEpoch(-11) diff --git a/build/params_mainnet.go b/build/params_mainnet.go index c9750b6e6..1c9b69462 100644 --- a/build/params_mainnet.go +++ b/build/params_mainnet.go @@ -45,7 +45,6 @@ const UpgradeLiftoffHeight = 148888 const UpgradeKumquatHeight = 170000 -const UpgradePricelistOopsHeight = 265199 const UpgradeCalicoHeight = 265200 const UpgradePersianHeight = UpgradeCalicoHeight + (builtin2.EpochsInHour * 60) diff --git a/build/params_nerpanet.go b/build/params_nerpanet.go index 8e18216db..5eef25cb2 100644 --- a/build/params_nerpanet.go +++ b/build/params_nerpanet.go @@ -32,7 +32,6 @@ const UpgradeTapeHeight = 60 const UpgradeKumquatHeight = 90 -const UpgradePricelistOopsHeight = 99 const UpgradeCalicoHeight = 100 const UpgradePersianHeight = UpgradeCalicoHeight + (builtin2.EpochsInHour * 1) diff --git a/build/params_testground.go b/build/params_testground.go index b12df11e7..204c74e67 100644 --- a/build/params_testground.go +++ b/build/params_testground.go @@ -82,22 +82,21 @@ var ( UpgradeBreezeHeight abi.ChainEpoch = -1 BreezeGasTampingDuration abi.ChainEpoch = 0 - UpgradeSmokeHeight abi.ChainEpoch = -1 - UpgradeIgnitionHeight abi.ChainEpoch = -2 - UpgradeRefuelHeight abi.ChainEpoch = -3 - UpgradeTapeHeight abi.ChainEpoch = -4 - UpgradeAssemblyHeight abi.ChainEpoch = 10 - UpgradeLiftoffHeight abi.ChainEpoch = -5 - UpgradeKumquatHeight abi.ChainEpoch = -6 - UpgradePricelistOopsHeight abi.ChainEpoch = -7 - UpgradeCalicoHeight abi.ChainEpoch = -8 - UpgradePersianHeight abi.ChainEpoch = -9 - UpgradeOrangeHeight abi.ChainEpoch = -10 - UpgradeClausHeight abi.ChainEpoch = -11 - UpgradeTrustHeight abi.ChainEpoch = -12 - UpgradeNorwegianHeight abi.ChainEpoch = -13 - UpgradeTurboHeight abi.ChainEpoch = -14 - UpgradeHyperdriveHeight abi.ChainEpoch = -15 + UpgradeSmokeHeight abi.ChainEpoch = -1 + UpgradeIgnitionHeight abi.ChainEpoch = -2 + UpgradeRefuelHeight abi.ChainEpoch = -3 + UpgradeTapeHeight abi.ChainEpoch = -4 + UpgradeAssemblyHeight abi.ChainEpoch = 10 + UpgradeLiftoffHeight abi.ChainEpoch = -5 + UpgradeKumquatHeight abi.ChainEpoch = -6 + UpgradeCalicoHeight abi.ChainEpoch = -8 + UpgradePersianHeight abi.ChainEpoch = -9 + UpgradeOrangeHeight abi.ChainEpoch = -10 + UpgradeClausHeight abi.ChainEpoch = -11 + UpgradeTrustHeight abi.ChainEpoch = -12 + UpgradeNorwegianHeight abi.ChainEpoch = -13 + UpgradeTurboHeight abi.ChainEpoch = -14 + UpgradeHyperdriveHeight abi.ChainEpoch = -15 DrandSchedule = map[abi.ChainEpoch]DrandEnum{ 0: DrandMainnet, diff --git a/chain/actors/version.go b/chain/actors/version.go index 36e8d17b4..8787089af 100644 --- a/chain/actors/version.go +++ b/chain/actors/version.go @@ -25,7 +25,7 @@ func VersionForNetwork(version network.Version) (Version, error) { switch version { case network.Version0, network.Version1, network.Version2, network.Version3: return Version0, nil - case network.Version4, network.Version5, network.Version6, network.Version6AndAHalf, network.Version7, network.Version8, network.Version9: + case network.Version4, network.Version5, network.Version6, network.Version7, network.Version8, network.Version9: return Version2, nil case network.Version10, network.Version11: return Version3, nil diff --git a/chain/messagepool/check.go b/chain/messagepool/check.go index 9a55c283c..283c0d119 100644 --- a/chain/messagepool/check.go +++ b/chain/messagepool/check.go @@ -281,7 +281,7 @@ func (mp *MessagePool) checkMessages(ctx context.Context, msgs []*types.Message, // gas checks // 4. Min Gas - minGas := vm.PricelistByVersion(nv).OnChainMessage(m.ChainLength()) + minGas := vm.PricelistByEpoch(epoch).OnChainMessage(m.ChainLength()) check = api.MessageCheckStatus{ Cid: m.Cid(), diff --git a/chain/messagepool/messagepool.go b/chain/messagepool/messagepool.go index 175cda9ff..ee2518ed9 100644 --- a/chain/messagepool/messagepool.go +++ b/chain/messagepool/messagepool.go @@ -616,7 +616,8 @@ func (mp *MessagePool) addLocal(ctx context.Context, m *types.SignedMessage) err // For non local messages, if the message cannot be included in the next 20 blocks it returns // a (soft) validation error. func (mp *MessagePool) verifyMsgBeforeAdd(m *types.SignedMessage, curTs *types.TipSet, local bool) (bool, error) { - minGas := vm.PricelistByVersion(build.NewestNetworkVersion).OnChainMessage(m.ChainLength()) + epoch := curTs.Height() + minGas := vm.PricelistByEpoch(epoch).OnChainMessage(m.ChainLength()) if err := m.VMMessage().ValidForBlockInclusion(minGas.Total(), build.NewestNetworkVersion); err != nil { return false, xerrors.Errorf("message will not be included in a block: %w", err) diff --git a/chain/messagepool/selection.go b/chain/messagepool/selection.go index 60d75a841..611ab8e5f 100644 --- a/chain/messagepool/selection.go +++ b/chain/messagepool/selection.go @@ -749,7 +749,7 @@ func (mp *MessagePool) createMessageChains(actor address.Address, mset map[uint6 } curNonce++ - minGas := vm.PricelistByVersion(build.NewestNetworkVersion).OnChainMessage(m.ChainLength()).Total() + minGas := vm.PricelistByEpoch(ts.Height()).OnChainMessage(m.ChainLength()).Total() if m.Message.GasLimit < minGas { break } diff --git a/chain/stmgr/upgrades.go b/chain/stmgr/upgrades.go index 968a0e273..d2ccbad39 100644 --- a/chain/stmgr/upgrades.go +++ b/chain/stmgr/upgrades.go @@ -72,10 +72,6 @@ func DefaultUpgradeSchedule() UpgradeSchedule { Height: build.UpgradeKumquatHeight, Network: network.Version6, Migration: nil, - }, { - Height: build.UpgradePricelistOopsHeight, - Network: network.Version6AndAHalf, - Migration: nil, }, { Height: build.UpgradeCalicoHeight, Network: network.Version7, diff --git a/chain/sync.go b/chain/sync.go index 5d3c1d992..7914cc8d5 100644 --- a/chain/sync.go +++ b/chain/sync.go @@ -1060,7 +1060,7 @@ func (syncer *Syncer) checkBlockMessages(ctx context.Context, b *types.FullBlock } nv := syncer.sm.GetNtwkVersion(ctx, b.Header.Height) - pl := vm.PricelistByVersion(nv) + pl := vm.PricelistByEpoch(baseTs.Height()) var sumGasLimit int64 checkMsg := func(msg types.ChainMsg) error { m := msg.VMMessage() diff --git a/chain/vm/gas.go b/chain/vm/gas.go index b848550f3..206a55d36 100644 --- a/chain/vm/gas.go +++ b/chain/vm/gas.go @@ -7,7 +7,7 @@ import ( addr "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/crypto" - "github.com/filecoin-project/go-state-types/network" + "github.com/filecoin-project/lotus/build" vmr5 "github.com/filecoin-project/specs-actors/v5/actors/runtime" proof5 "github.com/filecoin-project/specs-actors/v5/actors/runtime/proof" "github.com/ipfs/go-cid" @@ -79,8 +79,8 @@ type Pricelist interface { OnVerifyConsensusFault() GasCharge } -var prices = map[network.Version]Pricelist{ - network.Version0: &pricelistV0{ +var prices = map[abi.ChainEpoch]Pricelist{ + abi.ChainEpoch(0): &pricelistV0{ computeGasMulti: 1, storageGasMulti: 1000, @@ -129,7 +129,7 @@ var prices = map[network.Version]Pricelist{ verifyPostDiscount: true, verifyConsensusFault: 495422, }, - network.Version6AndAHalf: &pricelistV0{ + abi.ChainEpoch(build.UpgradeCalicoHeight): &pricelistV0{ computeGasMulti: 1, storageGasMulti: 1300, @@ -207,19 +207,21 @@ var prices = map[network.Version]Pricelist{ }, } -// PricelistByVersion finds the latest prices for the given network version -func PricelistByVersion(version network.Version) Pricelist { - bestVersion := network.Version0 - bestPrice := prices[bestVersion] - for nv, pl := range prices { - // if `nv > bestVersion` and `nv <= version` - if nv > bestVersion && nv <= version { - bestVersion = nv +// PricelistByEpoch finds the latest prices for the given epoch +func PricelistByEpoch(epoch abi.ChainEpoch) Pricelist { + // since we are storing the prices as map or epoch to price + // we need to get the price with the highest epoch that is lower or equal to the `epoch` arg + bestEpoch := abi.ChainEpoch(0) + bestPrice := prices[bestEpoch] + for e, pl := range prices { + // if `e` happened after `bestEpoch` and `e` is earlier or equal to the target `epoch` + if e > bestEpoch && e <= epoch { + bestEpoch = e bestPrice = pl } } if bestPrice == nil { - panic(fmt.Sprintf("bad setup: no gas prices available for version %d", version)) + panic(fmt.Sprintf("bad setup: no gas prices available for epoch %d", epoch)) } return bestPrice } diff --git a/chain/vm/mkactor.go b/chain/vm/mkactor.go index 4beee5ce6..e461a2b4c 100644 --- a/chain/vm/mkactor.go +++ b/chain/vm/mkactor.go @@ -41,7 +41,7 @@ var EmptyObjectCid cid.Cid // TryCreateAccountActor creates account actors from only BLS/SECP256K1 addresses. func TryCreateAccountActor(rt *Runtime, addr address.Address) (*types.Actor, address.Address, aerrors.ActorError) { - if err := rt.chargeGasSafe(PricelistByVersion(rt.NetworkVersion()).OnCreateActor()); err != nil { + if err := rt.chargeGasSafe(PricelistByEpoch(rt.height).OnCreateActor()); err != nil { return nil, address.Undef, err } diff --git a/chain/vm/vm.go b/chain/vm/vm.go index 84f57ec9b..199896671 100644 --- a/chain/vm/vm.go +++ b/chain/vm/vm.go @@ -135,7 +135,7 @@ func (vm *VM) makeRuntime(ctx context.Context, msg *types.Message, parent *Runti gasAvailable: msg.GasLimit, depth: 0, numActorsCreated: 0, - pricelist: PricelistByVersion(vm.ntwkVersion(ctx, vm.blockHeight)), + pricelist: PricelistByEpoch(vm.blockHeight), allowInternal: true, callerValidated: false, executionTrace: types.ExecutionTrace{Msg: msg}, @@ -424,7 +424,7 @@ func (vm *VM) ApplyMessage(ctx context.Context, cmsg types.ChainMsg) (*ApplyRet, return nil, err } - pl := PricelistByVersion(vm.ntwkVersion(ctx, vm.blockHeight)) + pl := PricelistByEpoch(vm.blockHeight) msgGas := pl.OnChainMessage(cmsg.ChainLength()) msgGasCost := msgGas.Total() diff --git a/documentation/en/api-v0-methods-miner.md b/documentation/en/api-v0-methods-miner.md index 3b6d5ac51..86cf62bbc 100644 --- a/documentation/en/api-v0-methods-miner.md +++ b/documentation/en/api-v0-methods-miner.md @@ -201,7 +201,7 @@ Response: ```json { "Version": "string value", - "APIVersion": 131329, + "APIVersion": 131328, "BlockDelay": 42 } ``` diff --git a/documentation/en/api-v0-methods-worker.md b/documentation/en/api-v0-methods-worker.md index 341846759..c620113f4 100644 --- a/documentation/en/api-v0-methods-worker.md +++ b/documentation/en/api-v0-methods-worker.md @@ -144,7 +144,7 @@ Perms: admin Inputs: `null` -Response: `131329` +Response: `131328` ## Add diff --git a/documentation/en/api-v0-methods.md b/documentation/en/api-v0-methods.md index bc67382d6..6b09ffc2a 100644 --- a/documentation/en/api-v0-methods.md +++ b/documentation/en/api-v0-methods.md @@ -280,7 +280,7 @@ Response: ```json { "Version": "string value", - "APIVersion": 131329, + "APIVersion": 131328, "BlockDelay": 42 } ``` diff --git a/documentation/en/api-v1-unstable-methods.md b/documentation/en/api-v1-unstable-methods.md index 4ed1509e0..acccf50fb 100644 --- a/documentation/en/api-v1-unstable-methods.md +++ b/documentation/en/api-v1-unstable-methods.md @@ -285,7 +285,7 @@ Response: ```json { "Version": "string value", - "APIVersion": 131329, + "APIVersion": 131328, "BlockDelay": 42 } ``` From bf41240ee1a96a941cb316e07917fd69903287d3 Mon Sep 17 00:00:00 2001 From: ZenGround0 Date: Tue, 10 Aug 2021 15:59:20 -0400 Subject: [PATCH 2/3] Update deps to revert version representation --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index dc9c3b165..79cd1affd 100644 --- a/go.mod +++ b/go.mod @@ -41,7 +41,7 @@ require ( github.com/filecoin-project/go-multistore v0.0.3 github.com/filecoin-project/go-padreader v0.0.0-20210723183308-812a16dc01b1 github.com/filecoin-project/go-paramfetch v0.0.2-0.20210614165157-25a6c7769498 - github.com/filecoin-project/go-state-types v0.1.1-0.20210722133031-ad9bfe54c124 + github.com/filecoin-project/go-state-types v0.1.1-0.20210810190654-139e0e79e69e github.com/filecoin-project/go-statemachine v1.0.1 github.com/filecoin-project/go-statestore v0.1.1 github.com/filecoin-project/go-storedcounter v0.0.0-20200421200003-1c99c62e8a5b @@ -49,7 +49,7 @@ require ( github.com/filecoin-project/specs-actors/v2 v2.3.5 github.com/filecoin-project/specs-actors/v3 v3.1.1 github.com/filecoin-project/specs-actors/v4 v4.0.1 - github.com/filecoin-project/specs-actors/v5 v5.0.3 + github.com/filecoin-project/specs-actors/v5 v5.0.4 github.com/filecoin-project/specs-storage v0.1.1-0.20201105051918-5188d9774506 github.com/filecoin-project/test-vectors/schema v0.0.5 github.com/gbrlsnchs/jwt/v3 v3.0.0-beta.1 diff --git a/go.sum b/go.sum index 5657f141d..7fa300b55 100644 --- a/go.sum +++ b/go.sum @@ -312,8 +312,8 @@ github.com/filecoin-project/go-state-types v0.0.0-20200928172055-2df22083d8ab/go github.com/filecoin-project/go-state-types v0.0.0-20201102161440-c8033295a1fc/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g= github.com/filecoin-project/go-state-types v0.1.0/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g= github.com/filecoin-project/go-state-types v0.1.1-0.20210506134452-99b279731c48/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g= -github.com/filecoin-project/go-state-types v0.1.1-0.20210722133031-ad9bfe54c124 h1:veGrNABg/9I7prngrowkhwbvW5d5JN55MNKmbsr5FqA= -github.com/filecoin-project/go-state-types v0.1.1-0.20210722133031-ad9bfe54c124/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g= +github.com/filecoin-project/go-state-types v0.1.1-0.20210810190654-139e0e79e69e h1:XAgb6HmgXaGRklNjhZoNMSIYriKLqjWXIqYMotg6iSs= +github.com/filecoin-project/go-state-types v0.1.1-0.20210810190654-139e0e79e69e/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g= github.com/filecoin-project/go-statemachine v0.0.0-20200925024713-05bd7c71fbfe/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= github.com/filecoin-project/go-statemachine v1.0.1 h1:LQ60+JDVjMdLxXmVFM2jjontzOYnfVE7u02CXV3WKSw= github.com/filecoin-project/go-statemachine v1.0.1/go.mod h1:jZdXXiHa61n4NmgWFG4w8tnqgvZVHYbJ3yW7+y8bF54= @@ -339,8 +339,8 @@ github.com/filecoin-project/specs-actors/v4 v4.0.0/go.mod h1:TkHXf/l7Wyw4ZejyXIP github.com/filecoin-project/specs-actors/v4 v4.0.1 h1:AiWrtvJZ63MHGe6rn7tPu4nSUY8bA1KDNszqJaD5+Fg= github.com/filecoin-project/specs-actors/v4 v4.0.1/go.mod h1:TkHXf/l7Wyw4ZejyXIPS2rK8bBO0rdwhTZyQQgaglng= github.com/filecoin-project/specs-actors/v5 v5.0.0-20210512015452-4fe3889fff57/go.mod h1:283yBMMUSDB2abcjP/hhrwTkhb9h3sfM6KGrep/ZlBI= -github.com/filecoin-project/specs-actors/v5 v5.0.3 h1:hMQIGfkZ1kN+oVGaDXbpsu9YEUEyL/zWJSeoaZpruu4= -github.com/filecoin-project/specs-actors/v5 v5.0.3/go.mod h1:E0yeEl6Scl6eWeeWmxwQsAufvOAC72H6ELyh2Y62H90= +github.com/filecoin-project/specs-actors/v5 v5.0.4 h1:OY7BdxJWlUfUFXWV/kpNBYGXNPasDIedf42T3sGx08s= +github.com/filecoin-project/specs-actors/v5 v5.0.4/go.mod h1:5BAKRAMsOOlD8+qCw4UvT/lTLInCJ3JwOWZbX8Ipwq4= github.com/filecoin-project/specs-storage v0.1.1-0.20201105051918-5188d9774506 h1:Ur/l2+6qN+lQiqjozWWc5p9UDaAMDZKTlDS98oRnlIw= github.com/filecoin-project/specs-storage v0.1.1-0.20201105051918-5188d9774506/go.mod h1:nJRRM7Aa9XVvygr3W9k6xGF46RWzr2zxF/iGoAIfA/g= github.com/filecoin-project/test-vectors/schema v0.0.5 h1:w3zHQhzM4pYxJDl21avXjOKBLF8egrvwUwjpT8TquDg= From bfda864c1baba4e51091aa8a9eccb61a1312989a Mon Sep 17 00:00:00 2001 From: ZenGround0 Date: Tue, 10 Aug 2021 16:31:05 -0400 Subject: [PATCH 3/3] Fix docsgen --- build/openrpc/full.json.gz | Bin 25304 -> 25302 bytes documentation/en/api-v0-methods.md | 2 +- documentation/en/api-v1-unstable-methods.md | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/openrpc/full.json.gz b/build/openrpc/full.json.gz index daf522a99f18308bd4186a8e06b195428a510ecb..2b8db42a57adc9b04027a048e2a8779f82a9c4d1 100644 GIT binary patch delta 1388 zcmV-y1(W*N#R1mE0kGdrf9ZUdu%`UzbyJv$GX#B=Dz6hON~8zS<^TMVywa)OW$#1FAH7Ea6-{xW8_uSiTij5#I4$Zsrd{NgD0d|vNPa`&EvP6u* z2^s>(SUkgI0x$wB-EmY8j89;x>Fc6)knR~=KImG_PCHaE+R2@N+olsx_dz1c9EgU=! zFA1Tr9;C7HN)q>i|8yDW1mX!C<^`|*o(%t?;$(E zGtA}PliyJ>0dA8KQb_@$lUq_M8I4IqpmYz(9$nyM^3TvXCP~XOB8(b^il&pEQXOM( zZf`UFPc5J+j3!wQit~6RV37XZvca|?9pW}8hMJIygazdl^Am_Lr_wg(M4l3PG*Z>H zH?bp5-NtL7)eZ*%^}3QPbjC_@-^IjBXSDe8#4_$hRq&|d$vLx}7j9e5^2(DQQ!XTu zsul+wv%d)0)pjIWjJ2+o$jokwE0abo)>9_9EI;q>*6Dqda8oW4a~f4(%k~j+707H` z&%mS0hdYz7Qx-TV&T|AKZz|YI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