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

Mark priority mempool as deprecated #262

Merged
merged 6 commits into from
Feb 7, 2023
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
7 changes: 5 additions & 2 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const (
// DefaultLogLevel defines a default log level as INFO.
DefaultLogLevel = "info"

// Mempool versions. V1 is prioritized mempool, v0 is regular mempool.
// Mempool versions. V1 is prioritized mempool (deprecated), v0 is regular mempool.
// Default is v0.
MempoolV0 = "v0"
MempoolV1 = "v1"
Expand Down Expand Up @@ -156,6 +156,9 @@ func (cfg *Config) ValidateBasic() error {

func (cfg *Config) CheckDeprecated() []string {
var warnings []string
if cfg.Mempool.Version == MempoolV1 {
warnings = append(warnings, "prioritized mempool detected. This version of the mempool will be removed in the next major release.")
}
if cfg.DeprecatedFastSyncConfig != nil {
warnings = append(warnings, "[fastsync] table detected. This section has been renamed to [blocksync]. The values in this deprecated section will be disregarded.")
}
Expand Down Expand Up @@ -704,7 +707,7 @@ func DefaultFuzzConnConfig() *FuzzConnConfig {
type MempoolConfig struct {
// Mempool version to use:
// 1) "v0" - (default) FIFO mempool.
// 2) "v1" - prioritized mempool.
// 2) "v1" - prioritized mempool (deprecated; will be removed in the next release).
Version string `mapstructure:"version"`
// RootDir is the root directory for all data. This should be configured via
// the $CMTHOME env variable or --home cmd flag rather than overriding this
Expand Down
2 changes: 1 addition & 1 deletion config/toml.go
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ dial_timeout = "{{ .P2P.DialTimeout }}"

# Mempool version to use:
# 1) "v0" - (default) FIFO mempool.
# 2) "v1" - prioritized mempool.
# 2) "v1" - prioritized mempool (deprecated; will be removed in the next release).
version = "{{ .Mempool.Version }}"

recheck = {{ .Mempool.Recheck }}
Expand Down
2 changes: 1 addition & 1 deletion consensus/byzantine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (

cfg "github.com/cometbft/cometbft/config"
mempoolv0 "github.com/cometbft/cometbft/mempool/v0"
mempoolv1 "github.com/cometbft/cometbft/mempool/v1"
mempoolv1 "github.com/cometbft/cometbft/mempool/v1" //nolint:staticcheck // SA1019 Priority mempool deprecated but still supported in this release.
"github.com/cometbft/cometbft/p2p"
cmtcons "github.com/cometbft/cometbft/proto/tendermint/consensus"
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
Expand Down
2 changes: 1 addition & 1 deletion consensus/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
cmtsync "github.com/cometbft/cometbft/libs/sync"
mempl "github.com/cometbft/cometbft/mempool"
mempoolv0 "github.com/cometbft/cometbft/mempool/v0"
mempoolv1 "github.com/cometbft/cometbft/mempool/v1"
mempoolv1 "github.com/cometbft/cometbft/mempool/v1" //nolint:staticcheck // SA1019 Priority mempool deprecated but still supported in this release.
"github.com/cometbft/cometbft/p2p"
"github.com/cometbft/cometbft/privval"
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
Expand Down
2 changes: 1 addition & 1 deletion consensus/reactor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
cmtsync "github.com/cometbft/cometbft/libs/sync"
mempl "github.com/cometbft/cometbft/mempool"
mempoolv0 "github.com/cometbft/cometbft/mempool/v0"
mempoolv1 "github.com/cometbft/cometbft/mempool/v1"
mempoolv1 "github.com/cometbft/cometbft/mempool/v1" //nolint:staticcheck // SA1019 Priority mempool deprecated but still supported in this release.
"github.com/cometbft/cometbft/p2p"
p2pmock "github.com/cometbft/cometbft/p2p/mock"
cmtcons "github.com/cometbft/cometbft/proto/tendermint/consensus"
Expand Down
1 change: 1 addition & 0 deletions mempool/v1/mempool.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Deprecated: Priority mempool will be removed in the next major release.
package v1

import (
Expand Down
1 change: 1 addition & 0 deletions mempool/v1/reactor.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Deprecated: Priority mempool will be removed in the next major release.
package v1

import (
Expand Down
1 change: 1 addition & 0 deletions mempool/v1/tx.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Deprecated: Priority mempool will be removed in the next major release.
package v1

import (
Expand Down
2 changes: 1 addition & 1 deletion node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
"github.com/cometbft/cometbft/light"
mempl "github.com/cometbft/cometbft/mempool"
mempoolv0 "github.com/cometbft/cometbft/mempool/v0"
mempoolv1 "github.com/cometbft/cometbft/mempool/v1"
mempoolv1 "github.com/cometbft/cometbft/mempool/v1" //nolint:staticcheck // SA1019 Priority mempool deprecated but still supported in this release.
"github.com/cometbft/cometbft/p2p"
"github.com/cometbft/cometbft/p2p/pex"
"github.com/cometbft/cometbft/privval"
Expand Down
2 changes: 1 addition & 1 deletion node/node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
cmtrand "github.com/cometbft/cometbft/libs/rand"
mempl "github.com/cometbft/cometbft/mempool"
mempoolv0 "github.com/cometbft/cometbft/mempool/v0"
mempoolv1 "github.com/cometbft/cometbft/mempool/v1"
mempoolv1 "github.com/cometbft/cometbft/mempool/v1" //nolint:staticcheck // SA1019 Priority mempool deprecated but still supported in this release.
"github.com/cometbft/cometbft/p2p"
"github.com/cometbft/cometbft/p2p/conn"
p2pmock "github.com/cometbft/cometbft/p2p/mock"
Expand Down
2 changes: 1 addition & 1 deletion test/fuzz/mempool/v1/checktx.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
mempl "github.com/cometbft/cometbft/mempool"
"github.com/cometbft/cometbft/proxy"

mempoolv1 "github.com/cometbft/cometbft/mempool/v1"
mempoolv1 "github.com/cometbft/cometbft/mempool/v1" //nolint:staticcheck // SA1019 Priority mempool deprecated but still supported in this release.
)

var mempool mempl.Mempool
Expand Down