Compare commits

...

25 Commits

Author SHA1 Message Date
William Banfield
cf3bcbaa4c final blocksync fixup 2022-07-13 17:33:09 -04:00
William Banfield
222a25284d Merge branch 'wb/max-connected' into v035-testing 2022-07-13 17:32:46 -04:00
William Banfield
cae81ce43d p2p: configure max connected for non-legacy as well 2022-07-13 17:08:29 -04:00
tycho garen
3e8daaeb44 fix e2e 2022-07-13 12:13:15 -04:00
tycho garen
aa2d6ee64a remove init 2022-07-13 12:11:52 -04:00
William Banfield
2b189852b0 Merge branch 'v0.35.x' into blocksync-logging 2022-07-13 11:16:50 -04:00
Sam Kleinman
b17f044a1c Merge branch 'v0.35.x' into blocksync-logging 2022-07-11 14:42:19 -04:00
tycho garen
a8c419f126 fix lint 2022-07-08 14:01:09 -04:00
Sam Kleinman
20c1ffd03a Merge branch 'v0.35.x' into blocksync-logging 2022-07-08 14:00:11 -04:00
Sam Kleinman
2750cb26a9 Merge branch 'v0.35.x' into blocksync-logging 2022-07-08 12:36:19 -04:00
tycho garen
a04759c4f6 force blocksync 2022-07-08 12:36:00 -04:00
Sam Kleinman
09c54a8d5c Merge branch 'v0.35.x' into blocksync-logging 2022-07-08 10:03:03 -04:00
Sam Kleinman
bf1ab9c3d8 Merge branch 'v0.35.x' into blocksync-logging 2022-07-06 14:07:54 -04:00
William Banfield
25f6557174 Merge branch 'v0.35.x' into blocksync-logging 2022-07-05 20:12:00 -04:00
tycho garen
91b32b93cd fixup 2022-07-05 09:43:57 -04:00
Sam Kleinman
3940d64ba6 Merge branch 'v0.35.x' into blocksync-logging 2022-07-05 09:42:18 -04:00
dependabot[bot]
babae90f8f build(deps): Bump github.com/libp2p/go-buffer-pool from 0.0.2 to 0.1.0 (#8931) 2022-07-05 09:40:48 -04:00
tycho garen
210e8a02f7 disable disabling blocksync 2022-07-05 09:40:48 -04:00
tycho garen
e66d76f6e9 tweak teset 2022-07-01 14:50:40 -04:00
dependabot[bot]
fbcb965c75 build(deps): Bump github.com/vektra/mockery/v2 from 2.13.1 to 2.14.0 (#8925)
Bumps [github.com/vektra/mockery/v2](https://github.com/vektra/mockery) from 2.13.1 to 2.14.0.
- [Release notes](https://github.com/vektra/mockery/releases)
- [Changelog](https://github.com/vektra/mockery/blob/master/.goreleaser.yml)
- [Commits](https://github.com/vektra/mockery/compare/v2.13.1...v2.14.0)

---
updated-dependencies:
- dependency-name: github.com/vektra/mockery/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-01 14:50:40 -04:00
Sam Kleinman
dc0e77f41e Merge branch 'v0.35.x' into blocksync-logging 2022-06-30 20:32:21 -04:00
tycho garen
815e611c68 ugg 2022-06-30 19:51:07 -04:00
Sam Kleinman
11456f9edf Update node/setup.go
Co-authored-by: M. J. Fromberger <michael.j.fromberger@gmail.com>
2022-06-30 13:16:46 -04:00
Sam Kleinman
b5f92f5d2e Update node/setup.go
Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
2022-06-30 13:05:23 -04:00
tycho garen
288cb31040 blocksync: log on disabled override 2022-06-30 12:53:56 -04:00
6 changed files with 32 additions and 31 deletions

View File

@@ -34,9 +34,6 @@ func AddNodeFlags(cmd *cobra.Command) {
config.PrivValidator.ListenAddr,
"socket address to listen on for connections from external priv-validator process")
// node flags
cmd.Flags().Bool("blocksync.enable", config.BlockSync.Enable, "enable fast blockchain syncing")
// TODO (https://github.com/tendermint/tendermint/issues/6908): remove this check after the v0.35 release cycle
// This check was added to give users an upgrade prompt to use the new flag for syncing.
//

View File

@@ -250,7 +250,7 @@ func makeNode(cfg *config.Config,
// Determine whether we should do block sync. This must happen after the handshake, since the
// app may modify the validator set, specifying ourself as the only validator.
blockSync := cfg.BlockSync.Enable && !onlyValidatorIsUs(state, pubKey)
blockSync := !onlyValidatorIsUs(state, pubKey)
logNodeStartupInfo(state, pubKey, logger, consensusLogger, cfg.Mode)
@@ -785,22 +785,18 @@ func (n *nodeImpl) OnStart() error {
// TODO: Some form of orchestrator is needed here between the state
// advancing reactors to be able to control which one of the three
// is running
if n.config.BlockSync.Enable {
// FIXME Very ugly to have these metrics bleed through here.
n.consensusReactor.SetBlockSyncingMetrics(1)
if err := bcR.SwitchToBlockSync(state); err != nil {
n.Logger.Error("failed to switch to block sync", "err", err)
return
}
d := types.EventDataBlockSyncStatus{Complete: false, Height: state.LastBlockHeight}
if err := n.eventBus.PublishEventBlockSyncStatus(d); err != nil {
n.eventBus.Logger.Error("failed to emit the block sync starting event", "err", err)
}
} else {
n.consensusReactor.SwitchToConsensus(state, true)
// FIXME Very ugly to have these metrics bleed through here.
n.consensusReactor.SetBlockSyncingMetrics(1)
if err := bcR.SwitchToBlockSync(state); err != nil {
n.Logger.Error("failed to switch to block sync", "err", err)
return
}
s := types.EventDataBlockSyncStatus{Complete: false, Height: state.LastBlockHeight}
if err := n.eventBus.PublishEventBlockSyncStatus(s); err != nil {
n.eventBus.Logger.Error("failed to emit the block sync starting event", "err", err)
}
}()
}

View File

@@ -338,6 +338,10 @@ func createBlockchainReactor(
metrics *consensus.Metrics,
) (*p2p.ReactorShim, service.Service, error) {
if !cfg.BlockSync.Enable {
logger.Error("blocksync.enable = false, but Tendermint no longer allows blocksync to be disabled. This setting is now ignored and will be removed in the next version.")
}
logger = logger.With("module", "blockchain")
switch cfg.BlockSync.Version {
@@ -441,12 +445,23 @@ func createConsensusReactor(
}
func createTransport(logger log.Logger, cfg *config.Config) *p2p.MConnTransport {
var maxAccepted uint32
switch {
case cfg.P2P.MaxConnections > 0 && !cfg.P2P.UseLegacy:
maxAccepted = uint32(cfg.P2P.MaxConnections) +
uint32(len(tmstrings.SplitAndTrimEmpty(cfg.P2P.UnconditionalPeerIDs, ",", " ")))
case cfg.P2P.MaxNumInboundPeers > 0:
maxAccepted = uint32(cfg.P2P.MaxNumInboundPeers) +
uint32(len(tmstrings.SplitAndTrimEmpty(cfg.P2P.UnconditionalPeerIDs, ",", " ")))
default:
maxAccepted = 0
}
return p2p.NewMConnTransport(
logger, p2p.MConnConfig(cfg.P2P), []*p2p.ChannelDescriptor{},
p2p.MConnTransportOptions{
MaxAcceptedConnections: uint32(cfg.P2P.MaxNumInboundPeers +
len(tmstrings.SplitAndTrimEmpty(cfg.P2P.UnconditionalPeerIDs, ",", " ")),
),
MaxAcceptedConnections: maxAccepted,
},
)
}

View File

@@ -47,8 +47,6 @@ var (
"tcp": 20,
"unix": 10,
}
// FIXME: v2 disabled due to flake
nodeBlockSyncs = uniformChoice{"v0"} // "v2"
nodeMempools = uniformChoice{"v0", "v1"}
nodeStateSyncs = weightedChoice{
e2e.StateSyncDisabled: 10,
@@ -397,7 +395,7 @@ func generateNode(
StartAt: startAt,
Database: nodeDatabases.Choose(r),
PrivvalProtocol: nodePrivvalProtocols.Choose(r),
BlockSync: nodeBlockSyncs.Choose(r).(string),
BlockSync: "v0",
Mempool: nodeMempools.Choose(r).(string),
StateSync: e2e.StateSyncDisabled,
PersistInterval: ptrUint64(uint64(nodePersistIntervals.Choose(r).(int))),

View File

@@ -43,7 +43,6 @@ persist_interval = 0
perturb = ["restart"]
privval_protocol = "tcp"
seeds = ["seed01"]
block_sync = "v0"
[node.validator03]
database = "badgerdb"
@@ -52,7 +51,6 @@ abci_protocol = "grpc"
persist_interval = 3
perturb = ["kill"]
privval_protocol = "grpc"
block_sync = "v0"
retain_blocks = 10
[node.validator04]
@@ -61,11 +59,9 @@ snapshot_interval = 5
database = "rocksdb"
persistent_peers = ["validator01"]
perturb = ["pause"]
block_sync = "v0"
[node.validator05]
database = "cleveldb"
block_sync = "v0"
state_sync = "p2p"
seeds = ["seed01"]
start_at = 1005 # Becomes part of the validator set at 1010
@@ -76,7 +72,6 @@ privval_protocol = "tcp"
[node.full01]
mode = "full"
start_at = 1010
block_sync = "v0"
persistent_peers = ["validator01", "validator02", "validator03", "validator04"]
perturb = ["restart"]
retain_blocks = 10

View File

@@ -178,7 +178,7 @@ func LoadTestnet(file string) (*Testnet, error) {
ABCIProtocol: Protocol(testnet.ABCIProtocol),
PrivvalProtocol: ProtocolFile,
StartAt: nodeManifest.StartAt,
BlockSync: nodeManifest.BlockSync,
BlockSync: "v0",
Mempool: nodeManifest.Mempool,
StateSync: nodeManifest.StateSync,
PersistInterval: 1,