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

[Feature] use custom cosmos-sdk and tendermint #655

Merged
merged 2 commits into from
Jan 7, 2022

Conversation

yun-yeo
Copy link
Contributor

@yun-yeo yun-yeo commented Jan 7, 2022

Use custom cosmos-sdk with custom tendermint for following items

  • oracle tx mempool priority
  • configurable iavl cache size
  • configurable inter-block cache size

Node Operators can configure new settings
in ~/.terra/config/app.toml

# InterBlockCacheSize set the size (the number of cache items) of interblock cache item
# Each item consumes 128 bytes, so the value should be dividend by 128
# Default cache size is 10mb.
# Ex) 100mb = 10,000,000 / 128 = 78,125
inter-block-cache-size = 78125

# IAVLCacheSize set the cache size (the number of cache items) of the iavl tree.
# Each item size consumes 128 bytes, so the value should be dividend by 128
# Default cache size is 100mb.
# Ex) 100mb = 100,000,000 / 128 = 781,250
iavl-cache-size = 781250

Summary of changes

Report of required housekeeping

  • Github issue OR spec proposal link
  • Wrote tests
  • Updated API documentation (client/lcd/swagger-ui/swagger.yaml)
  • Added a relevant changelog entry: clog add [section] [stanza] [message]

(FOR ADMIN) Before merging

  • Added appropriate labels to PR
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)
  • Confirm added tests are consistent with the intended behavior of changes
  • Ensure all tests pass

* oracle tx mempool priority
* configurable iavl cache size
* configurable inter-block cache size
@yun-yeo yun-yeo self-assigned this Jan 7, 2022
@yun-yeo yun-yeo requested a review from hanjukim January 7, 2022 03:07
@codecov
Copy link

codecov bot commented Jan 7, 2022

Codecov Report

Merging #655 (7af3338) into main (5fb2f85) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #655   +/-   ##
=======================================
  Coverage   44.63%   44.63%           
=======================================
  Files         120      120           
  Lines        6999     6999           
=======================================
  Hits         3124     3124           
  Misses       3630     3630           
  Partials      245      245           

@yun-yeo yun-yeo added daemon daemon updates enhancement New feature or request labels Jan 7, 2022
@yun-yeo
Copy link
Contributor Author

yun-yeo commented Jan 7, 2022

@faddat This PR and #654 PR will make terrad enable to use RocksDB with configurable iavl-cache-size and inter-block-cache-size what was done #631 .

COSMOS_BUILD_OPTIONS=rocksdb make install
# or you can set this config in ~/.terra/config/app.toml
terrad start --iavl-cache-size=100000 --inter-block-cache-size=10000

in ~/.terra/config/app.toml

# InterBlockCache enables inter-block caching.
inter-block-cache = true

# InterBlockCacheSize set the size (the number of cache items) of interblock cache item
# Each item consumes 128 bytes, so the value should be dividend by 128
# Default cache size is 10mb.
# Ex) 10mb = 10,000,000 / 128 = 78,125
inter-block-cache-size = 78125

# IndexEvents defines the set of events in the form {eventType}.{attributeKey},
# which informs Tendermint what to index. If empty, all events will be indexed.
#
# Example:
# ["message.sender", "message.recipient"]
index-events = []

# IAVLCacheSize set the cache size (the number of cache items) of the iavl tree.
# Each item size consumes 128 bytes, so the value should be dividend by 128
# Default cache size is 100mb.
# Ex) 100mb = 100,000,000 / 128 = 781,250
iavl-cache-size = 781250

@hanjukim hanjukim merged commit dd0dd58 into main Jan 7, 2022
@yun-yeo yun-yeo deleted the feature/custom-cosmos-sdk branch January 7, 2022 15:55
yun-yeo pushed a commit that referenced this pull request Jan 11, 2022
* Update README.md (#651)

update gentx parameter

* This paves the way for the use of rocksdb by default. (#642)

* [Feature] use custom `cosmos-sdk` and `tendermint` (#655)

* use custom cosmos-sdk to use follow features
* oracle tx mempool priority
* configurable iavl cache size
* configurable inter-block cache size

* change dependencies to tag

* [BugFix] makefile to properly pass RocksDB build options (#654)

* fix db configuration and create snapshot dir if not exist

* add example cmd to use rocksdb

* update tendermint and cosmos-sdk to performance branch which is using RWMutex for querying

Co-authored-by: Geoff Lee <geoff@terra.money>
Co-authored-by: Jacob Gadikian <jacobgadikian@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
daemon daemon updates enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants