Commit Graph

30 Commits

Author SHA1 Message Date
Ian Norden feed37dc56
ADR-038 Part 1: WriteListener, listen.KVStore, MultiStore and KVStore updates (#8551)
* StoreKVPair protobuf message definition and generated go types

* store WriteListener

* update MultiStore, CacheWrap, CacheWrapper interfaces

* adjust KVStores to fit new CacheWrapper interface

* new ListenKVStore

* adjust multistores to fit new MultiStore interface and enable wrapping returned KVStores with the new ListenKVStore

* typo fixes in adr

* ListenKV Store test

* update server mock KVStore and MultiStore

* multistore unit test; fix multistore constructor

* update changelog

* fix bug identified in CI

* improve codecov, minor fixes/adjustments

* review fixes

* review updates; flip set to delete in KVStorePair, updated proto-docs from running 'make proto-gen'
2021-03-30 16:13:51 -04:00
Emmanuel T Odeke b9f3db1be8
all: skip noisy/faulty benchmarks + add b.ReportAllocs for every benchmark (#8856)
* Skips very noisy benchmarks that end up running only for b.N=1 because
their entire time is spent in setup, and varying parameters doesn't change
much given that the number of stores is what dominates the expense. To
ensure we can provide reliable benchmarks, progressively for the project,
skip these until there is a proper re-work of what the benchmarks need to do

* Previously sub-benchmarks: b.Run(...) did not b.ReportAllocs() due to a faulty
assumption that invoking b.ReportAllocs() at the top would be inherited by
all sub-benchmarks. This change fixes that

Fixes #8779
Fixes #8855

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-03-11 15:59:13 +00:00
Emmanuel T Odeke 784a9a69a1
all: ensure b.ReportAllocs() in all the benchmarks (#8460)
With this change, we'll get details on the number of
allocations performed by code. Later on when we have
continuous benchmarking infrastructure, this change
will prove useful to flag regressions.

Fixes #8459

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2021-01-27 23:52:08 -08:00
Robert Zaremba 6de685805d
Snapshot sync: use hasher for chunk hashes (#7215) (#7259)
* snapshot sync: use blake3 for chunk hashes (7215)

Blake3 improves on security and speed compared to sha256.
https://blake3.io/

In this PR:
+ use optimized blake3 hashes (with dedicated SIMD code)
  instead of sha256
+ reuse resources on hashing chunks.
+ cleaned few error return statements.

* linter issues fixes

* revert blake2 hashing to sha256

* revert go.mod

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-12-10 19:02:17 +00:00
Aleksandr Bezobchuk 6476b09b64
multistore: fix SetInitialVersion (#8048) 2020-11-30 12:22:05 -05:00
Riccardo Montagnin bbbc0e15f0
Merge PR #7415: Return empty store tree on non-existing version 2020-10-13 08:39:33 -04:00
Erik Grinaker 4faeefebd2
Add state sync support (#7166)
* Add state sync support

* fix incorrect test tempdir

* proto: move and update Protobuf schemas

* proto: lint fixes

* comment tweaks

* don't use type aliasing

* don't call .Error() when logging errors

* use create terminology instead of take for snapshots

* reuse chunk hasher

* simplify key encoding code

* track chunk index in Manager

* add restoreDone message for Manager

* add a ready channel to Snapshotter.Restore()

* add comment on streaming IO API

* use sdkerrors for error handling

* fix incorrect error

* tweak changelog

* syntax fix

* update test code after merge
2020-09-08 09:05:44 +00:00
Amaury Martiny 3b9b58c931
Add height in exported genesis (#7089)
* Add height in exported genesis

* +1

* Add test

* Refactor ctx in setupApp

* Use amino in export

* Use tmjson

* Add custom initialVersion (set to 0 for now)

* Add comment

* Add mount in initChainer

* app.LastBlockheight

* InitializeAndSeal in InitChain?

* Revert create store with initial version

* Update to latest iavl

* Check height in test

* Make it work

* Add more tests

* Rename interface

* Use struct isntead of 6 args

* Fix lint

* Remove stray fmt

* Revert go mod/sum

* Install iavl rc3

* Update comments

* Add fee in network

* Typo

* Fix logic in commit

* Fix tests

* Only set initial version on > 1

* Genesis block num = 1

* Fresh chain, genesis block = 0

* Add comments

* Revert Mutable/ImmutableTree

* Allow for zero height

* Fix restart

* Add comments

* Add comments, fix test

* Fix remaining one test

* Add panic test

* Update comment

* Add test for --height

* No cast

* Add check that genesis file exists

* Remove duplicate imports

* Fail early

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Jack Zampolin <jack.zampolin@gmail.com>
Co-authored-by: Cory <cjlevinson@gmail.com>
2020-09-03 10:11:46 +00:00
dependabot[bot] d2de7a0441
Bump github.com/cosmos/iavl from 0.15.0-rc1 to 0.15.0-rc2 (#7064)
* Bump github.com/cosmos/iavl from 0.15.0-rc1 to 0.15.0-rc2

Bumps [github.com/cosmos/iavl](https://github.com/cosmos/iavl) from 0.15.0-rc1 to 0.15.0-rc2.
- [Release notes](https://github.com/cosmos/iavl/releases)
- [Changelog](https://github.com/cosmos/iavl/blob/master/CHANGELOG.md)
- [Commits](https://github.com/cosmos/iavl/compare/v0.15.0-rc1...v0.15.0-rc2)

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

* fix test

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com>
2020-08-17 17:10:24 +00:00
Marko 8de96d16f9
tendermint: update to rc3 (#6892)
* modify light imports

* change abci.header to tmproto.header

* use rc

* rc

* fix import

* Merge PR #6893: fix key imports

* fix rc2

* tendermint: update 3 (#6899)

* tendermint: update 4 (#6919)

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>

* tendermint: update 5 (#6923)

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* bump to latest master

* tendermint: update (#6972)

Co-authored-by: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com>
Co-authored-by: Cory Levinson <cjlevinson@gmail.com>

* Update x/ibc/07-tendermint/types/test_utils.go

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* address comment

* go mod

* bring back things

* fix test

* update tm proto files

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com>
Co-authored-by: Cory Levinson <cjlevinson@gmail.com>
Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>
2020-08-14 13:58:53 -04:00
Amaury Martiny 5559af8b97
Proto Auditing: Replace ID with Id (#7032)
* Proto Auditing: Replace ID with Id

* make proto-gen

* Update docs

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-08-14 08:55:54 +00:00
Alexander Bezobchuk 0f44d1af23
store: Remove Amino (#6984)
* Update kv pair to proto

* updates

* fix LastCommitID

* lint++

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-08-11 10:09:16 +00:00
Anil Kumar Kammari a966f1f9b7
Fix nextKey bug in filteredPaginate (#6578)
* Fix nextKey in filteredpaginate

* Fix example

* Fix example

* cleanup

* cleanup

* refactor

Co-authored-by: sahith-narahari <sahithnarahari@gmail.com>
2020-07-03 12:36:37 +00:00
Marko 3df4dd0cd9
types: add ics23-tendermint to sdk (#6487)
* add ics23-tendermint to sdk

* fix errors and prealloc

* move ics-23 to internal

* minor changes and move maps to internal

* remvoe some usage of tendermint merkle

* fix linter

* dont use named returns

* move internal to store/rootmulti

* fix imports

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-06-26 16:14:40 +00:00
Alexander Bezobchuk 4716260a6e
Merge PR #6475: Pruning Refactor 2020-06-22 16:31:33 -04:00
Ethan Frey cd272d525a
Merge PR #6323: Use simple merkle proof for commit info 2020-06-03 14:50:22 -04:00
Marko 97e1c31d40
store: simplehashfrommap (#6069)
* bring simplehashfrommap from TM

* bring simplemap as well

* rename simplemap to merklemap

* reduce byte to 8

* Update APIs and godoc

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com>
2020-04-27 15:07:58 +00:00
Federico Kunze c5b2abd814
store: cleanup (#5753)
* store: cleanup

* minor change

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-03-06 12:28:19 +00:00
Aditya dba80caec0
Merge PR #5579: Fix Restart application issue 2020-02-06 15:58:32 -05:00
Alexander Bezobchuk f18005d2f1
Merge PR #5538: Refactor IAVL Pruning 2020-01-22 14:52:56 -05:00
Alexander Bezobchuk 9a183ffbcc
Merge PR #5421: Refactor Error Handling 2019-12-27 12:57:54 -05:00
Alexander Bezobchuk 84627faf79
Merge PR #5024: Fix and Utilize GetCommitKVStore 2019-09-10 14:12:38 -04:00
Alexander Bezobchuk f010d2c6f1
Merge PR #4748: Write-Through Inter-Block Cache 2019-09-04 13:33:32 -04:00
Ethan Frey 1f8cdeed55 Merge PR #4724: Allow substore migrations upon multistore loading 2019-08-06 08:59:22 -04:00
Alexander Bezobchuk 861e4798ad
Merge PR #4836: Upgrade Tendermint and IAVL 2019-08-02 09:20:39 -04:00
Marko b5cd01d1a8 Merge PR #4651: Remove debugdb & colors 2019-07-01 09:53:16 -04:00
Ethan Frey 891eb8eec5 Merge PR #4613: Only change rootmultistore hash when substore hashes change 2019-06-25 13:11:22 -04:00
Alexander Bezobchuk 8b1d75caa2
Merge PR #4382: Support height queries for queriers 2019-05-28 20:58:33 -04:00
Joon d50f3ee4fb Merge PR #3395: Store Refactor 2 2019-02-05 19:39:22 +01:00
Joon 08e62fb157 Store Refactor 1 (#2985) 2019-02-01 17:03:09 -08:00