Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Disable f3 environment variables #6411

Merged
merged 2 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions fixtures/networks/network_parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}

Expand Down
3 changes: 3 additions & 0 deletions pkg/constants/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
7 changes: 4 additions & 3 deletions venus-shared/api/chain/v1/method.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading