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

fix: revise to call Begin/EndRecheck even though mem.Size() is 0 #219

Merged
merged 4 commits into from
Apr 19, 2021

Conversation

jinsan-line
Copy link

Epic: https://github.com/line/lbm/issues/1263

Cherry-pick: #162

Description

W/ #160 CONTRACT, we need to call Begin/EndRecheck even though mem.Size() is 0. IMHO, it's conceptually expected behavior to call Begin/EndRecheck even though mem.Size() is 0. We could compare it w/ Begine/EndBlock that are called even though there is no deliverTx.

What I've got from the team

  • Only when mem.config.Recheck is true, call Begin/EndRecheck.
    • Conceptually it's more acceptable and readable.
    • This approach could cause an issue if mem.config.Recheck is false but
      • W/o this change, there is already issues if mem.config.Recheck is false.
      • mem.config.Recheck is configured true for all phase and all chain.
      • We don't have any plan to set it false and also it seems to be almost impossible.
  • Discuss more whether removing mem.config.Recheck or not w/ other issue/PR.

For contributor use:

  • Wrote tests
  • Updated CHANGELOG_PENDING.md
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Updated relevant documentation (docs/) and code comments
  • Re-reviewed Files changed in the Github PR explorer

@jinsan-line jinsan-line added this to the initial ebony milestone Apr 19, 2021
@jinsan-line jinsan-line self-assigned this Apr 19, 2021
@jinsan-line jinsan-line merged commit 5254cab into ebony Apr 19, 2021
@jinsan-line jinsan-line deleted the jinsan/ebony/begin-recheck branch April 19, 2021 03:18
egonspace pushed a commit to egonspace/ostracon that referenced this pull request Jul 8, 2021
…schia#219)

* fix: revise to call Begin/EndRecheck even though `mem.Size()` is 0

* chore: revise local_client.go

* fix: lint error

* chore: recheckTxs() just return if mem.Size() == 0
egonspace pushed a commit to egonspace/ostracon that referenced this pull request Jul 8, 2021
…schia#219)

* fix: revise to call Begin/EndRecheck even though `mem.Size()` is 0

* chore: revise local_client.go

* fix: lint error

* chore: recheckTxs() just return if mem.Size() == 0
egonspace pushed a commit that referenced this pull request Aug 26, 2021
* feat: more prometheus metrics for monitoring performance (#146) (#175)

* chore: config timeout and connection pool (#150) (#171)

* fix: use line/tm-db instead of tendermint/tm-db

* bump up tm-db, iavl; re-apply #201

* chore: use default db backend among the available ones (#212)

* chore: use default db backend among the available ones

* chore: bump up iavl, tm-db

* feat: concurrent checkTx #213; fix tm-db call

* fix: rename TM to OC

* fix: modify key name; tendermint -> ostracon

* chore: rename tendermint to ostracon

* chore: remove mempool.postCheck (#158) (#217)

* fix: error handling after check tx

* fix: typo

* chore: (mempool) remove postCheck and impl reserve

* chore: fix tests

* chore: revise log (remove checkTx.Code)

* chore: add `CONTRACT` for `mem.proxyAppConn.CheckTxAsync()`

* chore: revise numTxs, txsBytes for `ErrMempoolIsFull` in reserve()

* chore: revise to remove redundant `isFull()`

* fix: remove tx from cache when `app errors` or `failed to reserve`

* Revert "chore: revise to remove redundant `isFull()`"

This reverts commit 55990ec.

* fix: revise to call Begin/EndRecheck even though mem.Size() is 0 (#219)

* fix: revise to call Begin/EndRecheck even though `mem.Size()` is 0

* chore: revise local_client.go

* fix: lint error

* chore: recheckTxs() just return if mem.Size() == 0

* feat: concurrent recheckTx (#163) (#221)

* chore: increase the value of maxPerPage (#223)

* chore: fix the type of consensus_block_interval_seconds from histogram to gauge (#224)

* feat: impl checkTxAsyncReactor() (#168) (#225)

* feat: impl checkTxAsyncReactor() (#168)

* fix: tests

* fix: lint errors

* chore: revise abci.Client, Async() interfaces (#169) (#226)

* chore: revise abci.Client, Async() interfaces

* chore: regen mock w/ mockery 2.7.4

* fix: lint error

* fix: test_race

* mempool.Flush() flushes all txs from mempool so it should get `Lock()` instead of `RLock()`

* chore: remove iavl dependency (#228)

* chore: remove iavl dependency

* chore: fix lint error

* fix: add more fixing for abci.Client, Async()

* feat: revise metric for measuring performance

* build: remove needless build tag `!libsecp256k1` (#246)

The build tag makes disable go implementation of secp256k1.
Cause there is no C implementation, a build error will occur when using tag `libsecp256k1`.

* feat: add duration metrics of gauge type (#256)

* perf: optimize checking the txs size (#264)

* perf: optimize checking the txs size

* ci: add GOPRIVATE to workflows

* test: add a unit test

* fix: fix lint errors

* perf: do not flush wal when receive consensus msgs (#273)

* perf: do not flush wal when receive consensus msgs

* fix: ci failure

* fix: lint failure

* fix: ci-e2e build failure

* fix: bump up tm-db

* fix: missing abci api

* fix: bump up tm-db; use memdb

* test: add test case to raise test coverage

* fix: race error

* fix: race error

* fix: race error

* fix: increase e2e test timeout

* fix: add test case for coverage

* fix: e2e docker file

* fix: apply comments

* fix: a Ostracon to an Ostracon
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.

4 participants