Skip to content

Commit 7ca6448

Browse files
authored
Merge pull request #6463 from filecoin-project/chore/transport
Chore/transport
2 parents 5d16e65 + 0ae3119 commit 7ca6448

File tree

14 files changed

+50
-4
lines changed

14 files changed

+50
-4
lines changed

app/submodule/chain/chaininfo_api.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -762,6 +762,7 @@ func (cia *chainInfoAPI) StateGetNetworkParams(ctx context.Context) (*types.Netw
762762
UpgradeWaffleHeight: cfg.NetworkParams.ForkUpgradeParam.UpgradeWaffleHeight,
763763
UpgradeTuktukHeight: cfg.NetworkParams.ForkUpgradeParam.UpgradeTuktukHeight,
764764
UpgradeTeepHeight: cfg.NetworkParams.ForkUpgradeParam.UpgradeTeepHeight,
765+
UpgradeTockHeight: cfg.NetworkParams.ForkUpgradeParam.UpgradeTockHeight,
765766
},
766767
Eip155ChainID: cfg.NetworkParams.Eip155ChainID,
767768
}

cmd/state.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,11 @@ var stateSectorCmd = &cmds.Command{
278278
return err
279279
}
280280

281+
nv, err := env.(*node.Env).ChainAPI.StateNetworkVersion(ctx, ts.Key())
282+
if err != nil {
283+
return err
284+
}
285+
281286
si, err := env.(*node.Env).ChainAPI.StateSectorGetInfo(ctx, maddr, abi.SectorNumber(sid), ts.Key())
282287
if err != nil {
283288
return err
@@ -300,6 +305,16 @@ var stateSectorCmd = &cmds.Command{
300305
writer.Println("DealWeight: ", si.DealWeight)
301306
writer.Println("VerifiedDealWeight: ", si.VerifiedDealWeight)
302307
writer.Println("InitialPledge: ", types.FIL(si.InitialPledge))
308+
309+
if nv < network.Version25 {
310+
if si.ExpectedDayReward != nil {
311+
writer.Println("ExpectedDayReward: ", types.FIL(*si.ExpectedDayReward))
312+
}
313+
if si.ExpectedStoragePledge != nil {
314+
writer.Println("ExpectedStoragePledge: ", types.FIL(*si.ExpectedStoragePledge))
315+
}
316+
}
317+
303318
writer.Println()
304319

305320
sp, err := env.(*node.Env).ChainAPI.StateSectorPartition(req.Context, maddr, abi.SectorNumber(sid), ts.Key())

fixtures/networks/butterfly.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ func ButterflySnapNet() *NetworkConf {
6767
UpgradeTuktukHeight: -28,
6868
UpgradeTuktukPowerRampDurationEpochs: builtin.EpochsInYear,
6969
UpgradeTeepHeight: 100,
70+
UpgradeTockHeight: 200,
7071
},
7172
DrandSchedule: map[abi.ChainEpoch]config.DrandEnum{0: config.DrandQuicknet},
7273
AddressNetwork: address.Testnet,

fixtures/networks/calibration.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ func Calibration() *NetworkConf {
7474
UpgradeWaffleHeight: 1779094, // 2024-07-11T12:00:00Z
7575
UpgradeTuktukHeight: 2078794, // 2024-10-23T13:30:00Z
7676
UpgradeTuktukPowerRampDurationEpochs: builtin.EpochsInDay * 3,
77-
UpgradeTeepHeight: 2520574, // 2025-03-25T23:00:00Z
77+
UpgradeTeepHeight: 2523454, // 2025-03-26T23:00:00Z
7878
},
7979
DrandSchedule: map[abi.ChainEpoch]config.DrandEnum{0: 1},
8080
AddressNetwork: address.Testnet,
@@ -96,5 +96,9 @@ func Calibration() *NetworkConf {
9696
nc.Network.F3Enabled = true
9797
nc.Network.ManifestServerID = "12D3KooWS9vD9uwm8u2uPyJV32QBAhKAmPYwmziAgr3Xzk2FU1Mr"
9898

99+
// This epoch, 7 days after Teep is the completion of FIP-0100 where actors will start applying
100+
// the new daily fee to pre-Teep sectors being extended.
101+
nc.Network.ForkUpgradeParam.UpgradeTockHeight = nc.Network.ForkUpgradeParam.UpgradeTeepHeight + builtin.EpochsInDay*7
102+
99103
return nc
100104
}

fixtures/networks/forcenet.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ func ForceNet() *NetworkConf {
6969
UpgradeTuktukHeight: -28,
7070
UpgradeTuktukPowerRampDurationEpochs: 200,
7171
UpgradeTeepHeight: 200,
72+
UpgradeTockHeight: 300,
7273
},
7374
DrandSchedule: map[abi.ChainEpoch]config.DrandEnum{0: config.DrandQuicknet},
7475
AddressNetwork: address.Testnet,

fixtures/networks/integrationtestnet.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"github.com/filecoin-project/go-state-types/network"
77
"github.com/filecoin-project/venus/pkg/config"
88
"github.com/filecoin-project/venus/pkg/constants"
9+
"github.com/filecoin-project/venus/venus-shared/actors/builtin"
910
"github.com/filecoin-project/venus/venus-shared/types"
1011
"github.com/ipfs/go-cid"
1112
)
@@ -80,5 +81,7 @@ func IntegrationNet() *NetworkConf {
8081
nc.Network.ForkUpgradeParam.UpgradePhoenixHeight = nc.Network.ForkUpgradeParam.UpgradeDragonHeight + 10
8182
nc.Network.DrandSchedule[nc.Network.ForkUpgradeParam.UpgradePhoenixHeight] = config.DrandQuicknet
8283

84+
nc.Network.ForkUpgradeParam.UpgradeTockHeight = nc.Network.ForkUpgradeParam.UpgradeTeepHeight + builtin.EpochsInDay*90
85+
8386
return nc
8487
}

fixtures/networks/interopnet.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ func InteropNet() *NetworkConf {
6868
UpgradeTuktukHeight: -28,
6969
UpgradeTuktukPowerRampDurationEpochs: builtin.EpochsInYear,
7070
UpgradeTeepHeight: 50,
71+
UpgradeTockHeight: 100,
7172
},
7273
DrandSchedule: map[abi.ChainEpoch]config.DrandEnum{0: config.DrandQuicknet},
7374
AddressNetwork: address.Testnet,

fixtures/networks/mainnet.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin"
88
"github.com/filecoin-project/venus/pkg/config"
99
"github.com/filecoin-project/venus/pkg/constants"
10+
"github.com/filecoin-project/venus/venus-shared/actors/builtin"
1011
"github.com/filecoin-project/venus/venus-shared/types"
1112
"github.com/ipfs/go-cid"
1213
)
@@ -20,6 +21,9 @@ func Mainnet() *NetworkConf {
2021
"/dns/bootstrap-mainnet-0.chainsafe-fil.io/tcp/34000/p2p/12D3KooWKKkCZbcigsWTEu1cgNetNbZJqeNtysRtFpq7DTqw3eqH",
2122
"/dns/bootstrap-mainnet-1.chainsafe-fil.io/tcp/34000/p2p/12D3KooWGnkd9GQKo3apkShQDaq1d6cKJJmsVe6KiQkacUk1T8oZ",
2223
"/dns/bootstrap-mainnet-2.chainsafe-fil.io/tcp/34000/p2p/12D3KooWHQRSDFv4FvAjtU32shQ7znz7oRbLBryXzZ9NMK2feyyH",
24+
"/dns/n1.mainnet.fil.devtty.eu/udp/443/quic-v1/p2p/12D3KooWAke3M2ji7tGNKx3BQkTHCyxVhtV1CN68z6Fkrpmfr37F",
25+
"/dns/n1.mainnet.fil.devtty.eu/tcp/443/p2p/12D3KooWAke3M2ji7tGNKx3BQkTHCyxVhtV1CN68z6Fkrpmfr37F",
26+
"/dns/n1.mainnet.fil.devtty.eu/udp/443/quic-v1/webtransport/certhash/uEiAWlgd8EqbNhYLv86OdRvXHMosaUWFFDbhgGZgCkcmKnQ/certhash/uEiAvtq6tvZOZf_sIuityDDTyAXDJPfXSRRDK2xy9UVPsqA/p2p/12D3KooWAke3M2ji7tGNKx3BQkTHCyxVhtV1CN68z6Fkrpmfr37F",
2327
},
2428
Period: "30s",
2529
},
@@ -94,5 +98,9 @@ func Mainnet() *NetworkConf {
9498
nc.Network.ForkUpgradeParam.UpgradePhoenixHeight = nc.Network.ForkUpgradeParam.UpgradeDragonHeight + 120
9599
nc.Network.DrandSchedule[nc.Network.ForkUpgradeParam.UpgradePhoenixHeight] = config.DrandQuicknet
96100

101+
// This epoch, 90 days after Teep is the completion of FIP-0100 where actors will start applying
102+
// the new daily fee to pre-Teep sectors being extended.
103+
nc.Network.ForkUpgradeParam.UpgradeTockHeight = nc.Network.ForkUpgradeParam.UpgradeTeepHeight + builtin.EpochsInDay*90
104+
97105
return nc
98106
}

fixtures/networks/net_2k.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ func Net2k() *NetworkConf {
6363
UpgradeTuktukPowerRampDurationEpochs: 200,
6464
UpgradeTuktukHeight: -28,
6565
UpgradeTeepHeight: 200,
66+
UpgradeTockHeight: 300,
6667
},
6768
DrandSchedule: map[abi.ChainEpoch]config.DrandEnum{0: config.DrandQuicknet},
6869
AddressNetwork: address.Testnet,

pkg/config/config.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import (
1919
"github.com/pkg/errors"
2020

2121
"github.com/filecoin-project/venus/pkg/constants"
22+
"github.com/filecoin-project/venus/venus-shared/actors/builtin"
2223
"github.com/filecoin-project/venus/venus-shared/types"
2324
)
2425

@@ -355,6 +356,7 @@ type ForkUpgradeConfig struct {
355356
UpgradeTuktukHeight abi.ChainEpoch `json:"upgradeTuktukHeight"`
356357
UpgradeTuktukPowerRampDurationEpochs abi.ChainEpoch `json:"upgradeTuktukPowerRampDurationEpochs"`
357358
UpgradeTeepHeight abi.ChainEpoch `json:"upgradeTeepHeight"`
359+
UpgradeTockHeight abi.ChainEpoch `json:"upgradeTockHeight"`
358360
}
359361

360362
func IsNearUpgrade(epoch, upgradeEpoch abi.ChainEpoch) bool {
@@ -398,7 +400,8 @@ var DefaultForkUpgradeParam = &ForkUpgradeConfig{
398400
UpgradeWaffleHeight: 4154640,
399401
UpgradeTuktukHeight: 4461240,
400402
UpgradeTuktukPowerRampDurationEpochs: 200,
401-
UpgradeTeepHeight: 9999999999,
403+
UpgradeTeepHeight: 9999999998,
404+
UpgradeTockHeight: 9999999998 + 90*builtin.EpochsInDay,
402405
}
403406

404407
func newDefaultNetworkParamsConfig() *NetworkParamsConfig {

0 commit comments

Comments
 (0)