diff --git a/fixtures/networks/network_parse.go b/fixtures/networks/network_parse.go index 91914edb6d..370969261b 100644 --- a/fixtures/networks/network_parse.go +++ b/fixtures/networks/network_parse.go @@ -5,10 +5,14 @@ import ( "strings" "github.com/filecoin-project/venus/pkg/config" + "github.com/filecoin-project/venus/pkg/constants" "github.com/filecoin-project/venus/venus-shared/types" "github.com/filecoin-project/venus/venus-shared/utils" + logging "github.com/ipfs/go-log/v2" ) +var log = logging.Logger("network-params") + func GetNetworkFromName(name string) (types.NetworkType, error) { if name == "2k" || strings.HasPrefix(name, "localnet-") { return types.Network2k, nil @@ -43,6 +47,11 @@ func SetConfigFromNetworkType(cfg *config.Config, networkType types.NetworkType) cfg.NetworkParams = &netcfg.Network // not change, expect to adjust the value through the configuration file cfg.NetworkParams.AllowableClockDriftSecs = oldAllowableClockDriftSecs + + if constants.DisableF3 { + cfg.NetworkParams.F3Enabled = false + log.Warnf("F3 is disabled") + } return nil } diff --git a/pkg/constants/env.go b/pkg/constants/env.go index d8dbc08a1e..0d47c7be31 100644 --- a/pkg/constants/env.go +++ b/pkg/constants/env.go @@ -13,3 +13,6 @@ var NoSlashFilter = os.Getenv("VENUS_NO_SLASHFILTER") == "_yes_i_know_and_i_acce // NoMigrationResultCache will not use cached migration results var NoMigrationResultCache = os.Getenv("VENUS_NO_MIGRATION_RESULT_CACHE") == "1" + +// DisableF3 disable f3 +var DisableF3 = os.Getenv("VENUS_DISABLE_F3") == "1" diff --git a/venus-shared/api/chain/v1/method.md b/venus-shared/api/chain/v1/method.md index 4af1712d89..fba81e36c1 100644 --- a/venus-shared/api/chain/v1/method.md +++ b/venus-shared/api/chain/v1/method.md @@ -1805,9 +1805,10 @@ Response: ``` ### StateGetBeaconEntry -StateGetBeaconEntry returns the beacon entry for the given filecoin epoch. If -the entry has not yet been produced, the call will block until the entry -becomes available +StateGetBeaconEntry returns the beacon entry for the given filecoin epoch +by using the recorded entries on the chain. If the entry for the requested +epoch has not yet been produced, the call will block until the entry +becomes available. Perms: read