Skip to content

Release/v0.27.1#3023

Merged
ebuchman merged 21 commits intomasterfrom
release/v0.27.1
Dec 16, 2018
Merged

Release/v0.27.1#3023
ebuchman merged 21 commits intomasterfrom
release/v0.27.1

Conversation

@ebuchman
Copy link
Contributor

@ebuchman ebuchman commented Dec 15, 2018

ebuchman and others added 21 commits December 5, 2018 16:51
Merge pull request #2975 from tendermint/release/v0.27.0
Co-Authored-By: zramsay <zach.ramsay@gmail.com>
previously, we're turning it off only when --populate-persistent-peers
flag was used, which is obviously incorrect.

Fixes cosmos/cosmos-sdk#2983
This is only one part of #2989. We also need to fix the application,
and add rules to consensus to ensure this.
Fixes #2715

In crawlPeersRoutine, which is performed when seedMode is run, there is
logic that disconnects the peer's state information at 3-hour intervals
through the duration value. The duration value is calculated by
referring to the created value of MConnection. When MConnection is
created for the first time, the created value is not initiated, so it is
not disconnected every 3 hours but every time it is disconnected. So,
normal nodes are connected to seedNode and disconnected immediately, so
address exchange does not work properly.

https://github.com/tendermint/tendermint/blob/master/p2p/pex/pex_reactor.go#L629
This point is not work correctly.
I think,
https://github.com/tendermint/tendermint/blob/master/p2p/conn/connection.go#L148
created variable is missing the current time setting.
Co-Authored-By: zramsay <zach.ramsay@gmail.com>
…2991)

(left after committing a block)

Fixes #2961

--------------
ORIGINAL ISSUE

Tendermint version : 0.26.4-b771798d

ABCI app : kv-store

Environment:

OS (e.g. from /etc/os-release): macOS 10.14.1 What happened: Set
mempool.recheck = false and create empty block = false in config.toml.
When transactions get added right between a new empty block is being
proposed and committed, the proposer won't propose new block for that
transactions immediately after. That transactions are stuck in the
mempool until a new transaction is added and trigger the proposer.

What you expected to happen: If there is a transaction left in the
mempool, new block should be proposed immediately.

Have you tried the latest version: yes

How to reproduce it (as minimally and precisely as possible): Fire two
transaction using broadcast_tx_sync with specific delay between them.
(You may need to do it multiple time before the right delay is found, on
my machine the delay is 0.98s)

Logs (paste a small part showing an error (< 10 lines) or link a
pastebin, gist, etc. containing more of the log file):
https://pastebin.com/0Wt6uhPF

Config (you can paste only the changes you've made): [mempool] recheck =
false create_empty_block = false

Anything else we need to know: In mempool.go, we found that proposer
will immediately propose new block if

Last committed block has some transaction (causing AppHash to changed)
or mem.notifyTxsAvailable() is called. Our scenario is as followed.

A transaction is fired, it will create 1 block with 1 tx (line 1-4 in
the log) and 1 empty block. After the empty block is proposed but before
it is committed, second transaction is fired and added to mempool. (line
8-16) Now, since the last committed block is empty and
mem.notifyTxsAvailable() will be called only if mempool.recheck = true.
The proposer won't immediately propose new block, causing the second
transaction to stuck in mempool until another transaction is added to
mempool and trigger mem.notifyTxsAvailable().
…so 0 (#3006)

* optimize addProposalBlockPart

* optimize addProposalBlockPart

* if ProposalBlockParts and LockedBlockParts both exist,let LockedBlockParts overwrite ProposalBlockParts.

* fix tryAddBlock

* broadcast lockedBlockParts in higher priority

* when appHeight==0, it's better fetch genDoc than state.validators.

* not save state if replay from height 1

* only save state if replay from height 1 when stateHeight is also 1

* only save state if replay from height 1 when stateHeight is also 1

* only save state if replay from height 0 when stateHeight is also 0

* handshake info's response version only update when stateHeight==0

* save the handshake responseInfo appVersion
* config: cors options are arrays of strings, not strings

Fixes #2980

* docs: update tendermint-core/configuration.html page

* set allow_duplicate_ip to false

* in `tendermint testnet`, set allow_duplicate_ip to true

Refs #2712

* fixes after Ismail's review

* Revert "set allow_duplicate_ip to false"

This reverts commit 24c1094.
* update changelog

* linkify

* changelog and version
@codecov-io
Copy link

Codecov Report

Merging #3023 into master will decrease coverage by 0.07%.
The diff coverage is 46.87%.

@@            Coverage Diff             @@
##           master    #3023      +/-   ##
==========================================
- Coverage   62.93%   62.85%   -0.08%     
==========================================
  Files         212      212              
  Lines       17356    17400      +44     
==========================================
+ Hits        10923    10937      +14     
- Misses       5519     5544      +25     
- Partials      914      919       +5
Impacted Files Coverage Δ
config/config.go 68.19% <ø> (ø) ⬆️
config/toml.go 53.19% <ø> (ø) ⬆️
libs/log/testing_logger.go 0% <0%> (ø) ⬆️
cmd/tendermint/commands/testnet.go 18.47% <0%> (-0.84%) ⬇️
rpc/client/localclient.go 89.28% <100%> (+0.82%) ⬆️
p2p/conn/connection.go 79.94% <100%> (+0.05%) ⬆️
state/txindex/kv/kv.go 76.13% <100%> (-0.83%) ⬇️
consensus/replay.go 56.75% <50%> (-0.39%) ⬇️
mempool/mempool.go 76.51% <58.33%> (-1.16%) ⬇️
rpc/client/httpclient.go 69.58% <66.66%> (-0.18%) ⬇️
... and 5 more

Copy link
Contributor

@melekes melekes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎄 🎅 🦌 🌟

@ebuchman ebuchman merged commit 1f09818 into master Dec 16, 2018
@ebuchman ebuchman deleted the release/v0.27.1 branch December 16, 2018 17:24
ebuchman added a commit that referenced this pull request Dec 16, 2018
Merge pull request #3023 from tendermint/release/v0.27.1
cboh4 pushed a commit to scrtlabs/tendermint that referenced this pull request Apr 7, 2025
…endermint#3018) (tendermint#3023)

This PR is a slight optimization to save one allocation per packet. We
have much more worthwhile performance improvements to pursue, just
driveby noticed it as I was reading through the code. (Though I am
surprised this did add up to 1 second in total -- 4% of the processing
time)

This re-uses the byte reader's allocation across all ReadMsg's. There is
no concurrenct access possible under safe usage (also implied by the
reader)

This is the cause of the 1s time on the far right: 

![image](https://github.com/cometbft/cometbft/assets/6440154/d6c6bfaa-d287-4355-b094-9bdcbc6379c8)


---

#### PR checklist

- [x] Tests written/updated - covered by existing tests
- [x] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [x] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [x] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec
<hr>This is an automatic backport of pull request tendermint#3018 done by
[Mergify](https://mergify.com).

---------

Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com>
Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants