Commit Graph

262 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 c2d5b24f58
store/cachekv: use typed types/kv.List instead of container/list.List (#8811)
Reduces CPU burn by using a typed List to avoid the expensive type
assertions from using an interface. This is the only option for now
until Go makes generics generally available.

The change brings time spent on the time assertion cummulatively to:
    580ms down from 6.88s

Explanation:
The type assertions were showing up heavily in profiles:
* Before this commit
```shell
Total: 42.18s
ROUTINE ======================== github.com/cosmos/cosmos-sdk/store/cachekv.newMemIterator
in /Users/emmanuelodeke/go/src/github.com/cosmos/cosmos-sdk/store/cachekv/memiterator.go
    14.01s     18.87s (flat, cum) 44.74% of Total
         .          .     17:	items      []*kv.Pair
         .          .     18:	ascending  bool
         .          .     19:}
         .          .     20:
         .          .     21:func newMemIterator(start, end []byte, items *list.List, ascending bool) *memIterator {
         .      620ms     22:	itemsInDomain := make([]*kv.Pair, 0, items.Len())
         .          .     23:
         .          .     24:	var entered bool
         .          .     25:
     510ms      870ms     26:	for e := items.Front(); e != nil; e = e.Next() {
     6.85s      6.88s     27:		item := e.Value.(*kv.Pair)
     5.71s      8.19s     28:		if !dbm.IsKeyInDomain(item.Key, start, end) {
     120ms      120ms     29:			if entered {
         .          .     30:				break
         .          .     31:			}
         .          .     32:
         .          .     33:			continue
         .          .     34:		}
         .          .     35:
     820ms      980ms     36:		itemsInDomain = append(itemsInDomain, item)
         .          .     37:		entered = true
         .          .     38:	}
         .          .     39:
         .      1.21s     40:	return &memIterator{
         .          .     41:		start:     start,
         .          .     42:		end:       end,
         .          .     43:		items:     itemsInDomain,
         .          .     44:		ascending: ascending,
         .          .     45:	}
```

and given that the list only uses that type, it is only right to lift the
code from container/list.List, and only modify Element.Value's type.

For emphasis, the code is basically just a retrofit of
container/list/list.go but with a typing, and we'll keep it as is
until perhaps Go1.17 or Go1.18 or when everyone uses Go1.17+ after
generics have landed.

* After this commit
```shell
Total: 45.25s
ROUTINE ======================== github.com/cosmos/cosmos-sdk/store/cachekv.newMemIterator
in /Users/emmanuelodeke/go/src/github.com/cosmos/cosmos-sdk/store/cachekv/memiterator.go
     4.84s      6.77s (flat, cum) 14.96% of Total
         .          .     16:	items      []*kv.Pair
         .          .     17:	ascending  bool
         .          .     18:}
         .          .     19:
         .          .     20:func newMemIterator(start, end []byte, items *kv.List, ascending bool) *memIterator {
         .      330ms     21:	itemsInDomain := make([]*kv.Pair, 0, items.Len())
         .          .     22:
         .          .     23:	var entered bool
         .          .     24:
      60ms      160ms     25:	for e := items.Front(); e != nil; e = e.Next() {
     580ms      580ms     26:		item := e.Value
     3.68s      4.78s     27:		if !dbm.IsKeyInDomain(item.Key, start, end) {
      80ms       80ms     28:			if entered {
         .          .     29:				break
         .          .     30:			}
         .          .     31:
         .          .     32:			continue
         .          .     33:		}
         .          .     34:
     440ms      580ms     35:		itemsInDomain = append(itemsInDomain, item)
         .          .     36:		entered = true
         .          .     37:	}
         .          .     38:
         .      260ms     39:	return &memIterator{
         .          .     40:		start:     start,
         .          .     41:		end:       end,
         .          .     42:		items:     itemsInDomain,
         .          .     43:		ascending: ascending,
         .          .     44:	}
```

Fixes #8810
2021-03-08 09:16:23 -08:00
Albert Chon a65f838eb1
reduce gas costs by 10x for transient store operations (#8790)
* reduce gas costs by 10x for transient store operations

* fix TestTransientGasConfig for ReadCostFlat

* added changelog entry

* fix changelog

* fix changelog

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2021-03-05 16:25:19 +00:00
Marko e17953ab11
perf change (#8796)
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-03-05 13:17:31 +00:00
Robert Zaremba 5f2b90c3c7
internal: create package for unsafe bytes convertion (#8733)
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2021-03-01 15:10:22 +00:00
Emmanuel T Odeke dbb9923917
store/cachekv, x/bank/types: algorithmically fix pathologically slow code (#8719)
After continuously profiling InitGensis with 100K accounts, it showed
pathologically slow code, that was the result of a couple of patterns:
* Unconditional and not always necessary map lookups
* O(n^2) sdk.AccAddressFromBech32 retrievals when the code is expensive,
during a quicksort

The remedy involved 4 parts:
* O(n) sdk.AccAddressFromBech32 invocations, down from O(n^2) in the quicksort
* Only doing map lookups when the domain key check has passed
* Using a black magic compiler technique of the map clearing idiom
* Zero allocation []byte<->string conversion

With 100K accounts, this brings InitGenesis down to ~6min, instead of
20+min, it reduces the sort code from ~7sec down to 50ms.

Also some simple benchmark reflect the change:
```shell
name                    old time/op    new time/op    delta
SanitizeBalances500-8     19.3ms ±10%     1.5ms ± 5%  -92.46%  (p=0.000 n=20+20)
SanitizeBalances1000-8    41.9ms ± 8%     3.0ms ±12%  -92.92%  (p=0.000 n=20+20)

name                    old alloc/op   new alloc/op   delta
SanitizeBalances500-8     9.05MB ± 6%    0.56MB ± 0%  -93.76%  (p=0.000 n=20+18)
SanitizeBalances1000-8    20.2MB ± 3%     1.1MB ± 0%  -94.37%  (p=0.000 n=20+19)

name                    old allocs/op  new allocs/op  delta
SanitizeBalances500-8      72.4k ± 6%      4.5k ± 0%  -93.76%  (p=0.000 n=20+20)
SanitizeBalances1000-8      162k ± 3%        9k ± 0%  -94.40%  (p=0.000 n=20+20)
```

The CPU profiles show the radical change as per
https://github.com/cosmos/cosmos-sdk/issues/7766#issuecomment-786671734

Later on, we shall do more profiling and fixes but for now this brings
down the run-time for InitGenesis.

Fixes #7766

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2021-02-27 07:26:22 -08:00
Alessio Treglia f2ee972e31
various linter fixes (#8666) 2021-02-23 08:46:01 +00:00
Alessio Treglia 3b8e0f9387
store/multistore: revert a height limit increase from #8396 (#8466)
See https://github.com/cosmos/cosmos-sdk/pull/8396#discussion_r565654207

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-01-29 18:46:23 +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
Riccardo Montagnin e2f510afcc
Compatibility with the ARM architecture (#8396)
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Jonathan Gimeno <jgimeno@gmail.com>
2021-01-27 11:07:45 +00:00
Aaron Craelius 2521964d50
Update gogo proto deps with v1.3.2 security fixes (#8350)
* Update gogo proto deps with v1.3.2 security fixes

* Regenerate proto files
2021-01-15 19:45:34 +00:00
Robert Zaremba e481f13ff3
docs: cache-wrapping and virtual store (#8102)
* docs: cache-wrapping and virtual store

* Finish the docs update

* Update docs/building-modules/msg-services.md

Co-authored-by: Amaury <amaury.martiny@protonmail.com>

* Update docs/building-modules/msg-services.md

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

Co-authored-by: Amaury <amaury.martiny@protonmail.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
2021-01-05 15:57:33 +00: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
Anil Kumar Kammari 4a233b8dcf
Rename GRPCRouter (#8079)
* rename GRPCRouter

* Update store/types/store.go

Co-authored-by: Robert Zaremba <robert@zaremba.ch>

* Fix gofmt

Co-authored-by: Robert Zaremba <robert@zaremba.ch>
2020-12-04 15:06:50 +00:00
Aleksandr Bezobchuk 6476b09b64
multistore: fix SetInitialVersion (#8048) 2020-11-30 12:22:05 -05:00
vincent 6e3fab854f
Fix upgrade store loader (#7817)
* fix upgrade store loader

* fix test

* resolve comment

Co-authored-by: billy rennekamp <billy.rennekamp@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-11-13 15:27:52 +00:00
Cory 505d424a3b
[IAVL]: Bump to v0.15.0-rc4 (#7549)
* iavl 0.15.0-rc4 version bump

* update comments on error modes for store.LoadStore

* update CONFIO_URL in makefile

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-10-19 18:38:17 +00:00
Riccardo Montagnin bbbc0e15f0
Merge PR #7415: Return empty store tree on non-existing version 2020-10-13 08:39:33 -04:00
Alexander Bezobchuk 7ae84898de
Merge PR #7265: Tendermint Block Pruning 2020-09-14 10:12:49 -04:00
Alessio Treglia 46a8e94740
run make format && go mod tidy (#7298) 2020-09-14 12:42:09 +01: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
Neeraj Murarka 2079576cbe
Replaced hardcoded 'cosmos' and 'cosmosvaloper' help references (#7056)
* Replaced hardcoded 'cosmos' and 'cosmosvaloper' help references

* Ran make format target

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-08-17 09:04:50 +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
Cory 61a97ef347
Audit / Refactor proto packages layout (#6905)
* create base proto package, move ValAddresses to staking

* move tx, crypto, query proto packages into base; mark module level packages as beta

* new cosmos/base/abci.proto file, refactor some message names

* add comments to TxResponse

* refactor RegisterInterface calls to new proto package names

* fix bug in merge commit

* move missing module proto packages to beta, move cosmos.kv to cosmos.base.kv

* add tx.proto files, holding proto messages for module Msgs

* rm old generated pb.go files

* cosmos/base/base.proto -> cosmos/base/coin.proto

* mark genutil proto package as beta

* Fix conflicts

* Restructure proto files

* Re put signing

* Fix test

* Update slashing genesis

* Ignore confio proto files

* Fix interface register

* Make proto-gen

* Fix lint

* Put tx service into tx.v1beta1

* Use v1beta1 in interface registry

* Remove to cosmos.base.store

* Remove extra confio in buf

Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-08-11 11:49:45 +00:00
Erik Grinaker 7a0d5ff718
store: add test cases for hashing of empty inputs (#7004) 2020-08-11 13:10:46 +02: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
Aaron Craelius 6d937443b2
Reject unknown fields in TxDecoder and sign mode handlers (#6883)
* WIP on unknown field rejection in TxDecoder

* WIP on unknown field rejection in TxDecoder

* WIP

* WIP

* WIP

* WIP

* Fix bugs with RejectUnknownFields

* Fix tests

* Fix bug and update docs

* Lint

* Add tests

* Add unknown field tests

* Lint

* Address review comments
2020-08-03 19:47:25 +00:00
Marko 617b822efa
types: add kv type (#6897)
* add kv type

* add changelog entry

* fix build

* replace sdkkv with kv

* revert change

* fix some tests

* proto-gen

* fix tests

Co-authored-by: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-30 14:53:02 +00:00
billy rennekamp cde3f46d52
Add validation to prevent empty store keys (#6754)
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-07-20 18:05:01 +02:00
Adam Bozanich f33749263f
Merge PR #6761: telemetry: use UTC() in wrappers 2020-07-17 15:33:50 -04:00
Alexander Bezobchuk 5c86ecd1f8
Fix measure since (#6759)
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-07-17 15:34:37 +00:00
Emmanuel T Odeke d36c6be529
store/cache: speed up + conserve memory by using map clearing idiom in Reset (#6700)
Noticed during my audit, the code for cache.CommitKVStoreCacheManager.Reset()
discarded the prior on every invocation i.e.

    m = make(map[T(key)]T(value))

However, this can be made fast and conserve memory by using the map clearing idiom
that the Go compiler recognizes i.e.

    for key := range m {
        delete(m, key)
    }

and turns into very fast code, instead of the extraneous map discarding.

The speed up generated is:

```shell
$ benchstat before after
name     old time/op    new time/op    delta
Reset-8     204ns ± 2%      66ns ± 9%   -67.86%  (p=0.000 n=20+20)

name     old alloc/op   new alloc/op   delta
Reset-8      384B ± 0%        0B       -100.00%  (p=0.000 n=20+20)

name     old allocs/op  new allocs/op  delta
Reset-8      3.00 ± 0%      0.00       -100.00%  (p=0.000 n=20+20)
```

Fixes #6681
2020-07-13 12:49:09 +02:00
Emmanuel T Odeke 152ac24931
rootmulti/internal/maps: remove duplicated code, simplify and speed up KVPair (#6689)
Noticed during an audit, we've got duplicated code that's unused.
There were 2 type definitions:
* type kvPair types.Pair
* type KVPair types.Pair

and each had a .bytes() and .Bytes() method respectively that
then used some extra code.

This change deletes the duplicated/unnecessary code but also
while here improves the performance by removing the use of a
bytes.Buffer which is unnecessary given that we are only
length prefixed the key, length prefixing the value hence
the various helpers are unnecessary.

The added benchmarks shows the performance boost
```shell
$ benchstat before after
name           old time/op    new time/op    delta
KVPairBytes-8     146µs ± 1%     142µs ± 2%   -3.05%  (p=0.000 n=18+17)

name           old speed      new speed      delta
KVPairBytes-8  6.84GB/s ± 1%  7.06GB/s ± 2%   +3.15%  (p=0.000 n=18+17)

name           old alloc/op   new alloc/op   delta
KVPairBytes-8    1.01MB ± 0%    1.01MB ± 0%   -0.04%  (p=0.000 n=17+20)

name           old allocs/op  new allocs/op  delta
KVPairBytes-8      6.00 ± 0%      1.00 ± 0%  -83.33%  (p=0.000 n=20+20)
```

Closes: #6688
2020-07-11 13:44:10 +02:00
Marie 1e23679066
x/evidence: gRPC query service (#6593)
* Add basic grpc query service for x/evidence

* Add grpc query test for AllEvidences query

* linting

* Add AnyUnpacker to query test helper and some var renaming

* Add test to check Evidence query result

* Update proto/cosmos/evidence/query.proto

Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>

* Use table tests

* Use NewQueryEvidenceRequest in place of QueryEvidenceParams

* Remove ConvertEvidence

Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-07-10 13:52:59 +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
Erik Grinaker 98a3645d0f
store: change PruningDefault to KeepEvery:100 (#6520) 2020-06-26 16:03:12 +02:00
Alexander Bezobchuk 51c35f4dce
store/types: Fix pruning opts validation (#6511)
* store/types: Fix pruning opts validation

* store/types: Add case
2020-06-25 16:41:44 +00:00
Alexander Bezobchuk 01b89bd9b3
Merge PR #6504: Bump IAVL 2020-06-24 14:38:12 -04:00
Marko 67d079e68a
store/rootmulti: add SimpleProofsFromMap (#6481)
* add sipleproofs from map to sdk

* bring changes from tendermint pr

* bring back tmhash

* add changelog

* Update CHANGELOG.md

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-06-23 08:05:36 +00:00
Alexander Bezobchuk 4716260a6e
Merge PR #6475: Pruning Refactor 2020-06-22 16:31:33 -04:00
Alexander Bezobchuk 5040ff87c4
Merge PR #6449: Initial Metrics 2020-06-18 14:12:44 -04:00
Aditya 783e9959e0
Cleanup store.Query with CommitmentProof.Calculate() (#6396)
* cleanup using CommitmentProof.Calculate()

* get correct version of confio/ics23

* Update store/types/proof.go

Co-authored-by: colin axner <25233464+colin-axner@users.noreply.github.com>

* revert review commit

Co-authored-by: colin axner <25233464+colin-axner@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-06-11 08:49:05 +00:00
Aditya e12fa58e14
Convert simple proof to ics23 proof (#6390)
* convert simple proof to ics23 proof

* add CHANGELOG entries

* Apply suggestions from code review

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-06-10 13:23:40 -04:00
Aditya d9e1497e89
Switch IAVL Store query to use ics proofs (#6324)
* switch iavl store to use ics proof

* fix proofs to return for correct height

* appease linter

* Register commitment op correctly

* Make CommitmentOp generic over all ics23 specs (#6331)

* Make the CommitmentOp generic over all ics23 ProofSpecs, using Type to distinguish

* Register SimpleMerkle ics23 proof op as well

* Addressed linter issues

* move commitment proof to types

* Apply suggestions from code review

Co-authored-by: colin axner <25233464+colin-axner@users.noreply.github.com>

* address review comments:

* Apply suggestions from code review

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

* allow proofs against empty store

* address review comments

* Update store/types/proof.go

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

* add changelog

Co-authored-by: Ethan Frey <ethanfrey@users.noreply.github.com>
Co-authored-by: colin axner <25233464+colin-axner@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
2020-06-08 15:02:25 -04:00
Ethan Frey cd272d525a
Merge PR #6323: Use simple merkle proof for commit info 2020-06-03 14:50:22 -04:00