Commit Graph

6157 Commits

Author SHA1 Message Date
Aleksandr Bezobchuk 7562c2765a
Update gov types 2020-03-02 14:13:42 -05:00
Aleksandr Bezobchuk a89eb77841
Add equal option to upgrade proto types 2020-03-02 14:10:27 -05:00
Alexander Bezobchuk c0384a1b91
Merge branch 'master' into bez/5444-gov-proto-enc 2020-03-02 13:08:26 -05:00
Aleksandr Bezobchuk 31dc2729fc
Merge branch 'master' into bez/5444-gov-proto-enc 2020-03-02 12:50:32 -05:00
Aleksandr Bezobchuk e2b72141bf
Update keeper 2020-03-02 12:49:32 -05:00
Aleksandr Bezobchuk 725e2dc2b4
Update gov codec interface 2020-03-02 12:44:55 -05:00
Aleksandr Bezobchuk 081e62cb2d
Update codec 2020-03-02 11:54:43 -05:00
Alexander Bezobchuk 214cd2e648
Merge pull request #5735: crypto: cleanup, more testing 2020-03-02 11:39:25 -05:00
Aleksandr Bezobchuk 8f131e2e0c
Fix and updates gov proto types 2020-03-02 09:14:17 -05:00
Alessio Treglia 9bd603ae88
crypto: cleanup, more testing
crypto.LedgerShowAddress() is a ledger specific function
and should takes acc address prefix instead of depending
on a sdk.Config singleton.

crypto/keys/mintkey:
- decryptPrivKey() return error instead of os.Exit()ing.
- encryptPrivKey() should panic instead of os.Exit() when
  bcrypt.GenerateFromPassword() call fails so that the
  caller is given a chance to recover().

crypto/keys:
- SignWithLedger() does not need to be method of
  baseKeybase. Method receiver is unused.
- ledgerInfo objecta may be pointers, type switch
  should handle both to avoid panics.
- keyringKeybase should not provide Update() at all.

More test cases are added to increase package crypto
and subpackages overall coverage.
2020-03-02 11:09:52 +00:00
Alexander Bezobchuk f403cda2ce
Merge PR #5734: Tweak mergify config 2020-03-01 20:51:45 -05:00
Alexander Bezobchuk 75e45b0926
Merge branch 'master' into alessio/mergify-approvers-no-greater-than-1 2020-03-01 19:33:43 -05:00
Alessio Treglia e0d029388d
fix DiffKVStores(), store/types gets 100% coverage (#5730)
* fix DiffKVStores(), store/types gets 100% coverage

DiffKVStores() used to return duplicated entries
in some cases.

Add test cases, aiming to reach 100% coverage for
store package.

Remove duplicate Cp function from the store package.
Same functionality is provided by types.CopyBytes().

* More test cases

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-03-02 00:27:03 +00:00
Alexander Bezobchuk 8de2fe92ee
Merge branch 'master' into alessio/mergify-approvers-no-greater-than-1 2020-03-01 19:17:28 -05:00
Alessio Treglia d7fd5b6a42
Replace defer with testing.T.Cleanup() (#5732) 2020-03-02 00:16:23 +00:00
Alessio Treglia 8fd85e16a5
Tweak mergify config
Set minimum approvers number to be strictly greater than 1.
2020-03-01 16:18:22 +00:00
Alessio Treglia 2ae25caa74
linter fixes (#5733)
* make .golangcy.yml work with Goland's Golint plugin

Explicitly disable all linters. Whitelist of enabled
plugins is already provided.

This would enable Goland users to user Golint plugin.

* fix deadcode warnings

* fix gocritic error

unslice: could simplify pkBytes[:] to pkBytes
2020-03-01 15:38:57 +00:00
Alessio Treglia 5f14dc2e42
Increase coverage across the store package (#5727) 2020-02-28 23:05:28 +00:00
Alexander Bezobchuk 7d6fc7ee25
Merge PR #5709: Add granularity options to pruning state 2020-02-28 13:45:59 -08:00
Alexander Bezobchuk db855fba07
Merge branch 'master' into jonathan/5684-prune-syncable 2020-02-28 12:45:59 -08:00
Alexander Bezobchuk e3580896ab
Migrate Keeper staking tests to use simapp (#5683)
* use simapp into keeper

* refactor TestHistoricalInfo to use simapp

* refactor historical info test

* temporal commit on querier test, it passes

* commit end of day refactoring

* rename and temp commit

* fix test query validators

* make TestQueryDelegations pass with simapp :D

* rename function

* make TestQueryRedelegations pass with simapp

* finish keeper refactor for querier in staking using simapp

* refactor delegation test TestUnbondDelegation to use simapp

* make all test pass temporary

* avoid usage of historicals

* refactor creation of the simapp

* refactor creation of simapp

* comment before creating new way to generate accounts

* make TestDelegation pass with generated accounts

* refactor to use accounts

* refactor test unbondingdelegationsmax entries

* refactor TestUndelegateSelfDelegationBelowMinSelfDelegation to use simapp

* update TestUndelegate from unbonding validator and fix bug

* refactor TestUndelegateFromUnbondedValidator to use simapp

* TestUnbondingAllDelegationFromValidator to use simapp

* refactor TestGetRedelegationsFromSrcValidator to use simapp

* refactor TestRedelegation to use simapp

* refactor TestRedelegateToSameValidator to use simapp

* refacotr TestRedelegationMaxEntries to use simapp

* refactor delegation test

* refactor TestRedelegateFromUnbondingValidator to use simapp

* finish refactor delegation test

* refactor and remove unused code

* migrate revocation of old slash test

* fix TestSlashUnbondingDelegation test to use simapp

* refactor TestSlashRedelegation to use simapp

* refactor TestSlashAtFutureHeight test

* test TestSlashAtNegativeHeight migrated to simapp

* migrated two tests from slash_test to use simapp

* refactor TestSlashWithRedelegation

* end refactoring slash_test

* refactor first test validation to simapp

* refacor TestUpdateValidatorByPowerIndex to use simapp

* refactor TestUpdateBondedValidatorsDecreaseCliff to simapp

* refactor TestSlashToZeroPowerRemoved

* TestValidatorBasics

* refactro TestGetValidatorSortingUnmixed to simapp

* refactor TestGetValidatorSortingMixed test to simap

* refctor TestGetValidatorsEdgeCases to use simapp

* make test TestValidatorBondHeight pass

* refactor TestFullValidatorSetPowerChange test

* end refactoring validator_test

* clean code

* move methods

* rename

* rename commont test

* git remove unused vars

* refactor ordering functions

* refactor old genesis_test to use simapp

* refactor TestValidatorByPowerIndex

* refactor TestDuplicatesMsgCreateValidator

* refactor TestInvalidPubKeyTypeMsgCreateValidator

* temporary commit

* refactor TestLegacyValidatorDelegations to use simapp

* refactor TestIncrementsMsgDelegate

* refactor next

* refactor TestEditValidatorIncreaseMinSelfDelegationBeyondCurrentBond

* refactor TestIncrementsMsgUnbond

* refator TestMultipleMsgCreateValidator

* refactor TestMultipleMsgDelegate

* refactor TestJailValidator

* refactor TestUnbondingPeriod and TestValidatorQueue

* refactor TestUnbondingFromUnbondingValidator and TestRedelegationPeriod

* refactor TestTransitiveRedelegation and TestMultipleRedelegationAtSameTime

* refactor TestMultipleRedelegationAtUniqueTimes and TestMultipleUnbondingDelegationAtSameTime

* refactor TestMultipleUnbondingDelegationAtUniqueTimes and TestUnbondingWhenExcessValidators

* end refactor handler_test

* remove test_common

* remove create test public keys

* fix based on PR comments

* use prealloc array for ConvertAddrsToValAddrs

* fix lint errors

* fix lint errors 2

* remove duplicated func

* rename function names

* Update simapp/test_helpers.go

* Update x/staking/keeper/keeper.go

* Update simapp/test_helpers.go

* Update simapp/test_helpers.go

* add last touches to the PR

* edit text

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Alessio Treglia <quadrispro@ubuntu.com>
2020-02-28 12:45:24 -08:00
Alessio Treglia 52c6e5e322
Merge branch 'master' into jonathan/4875-staking-test-use-simapp 2020-02-28 20:30:27 +00:00
Alessio Treglia 7080949f4e
Update CODEOWNERS as per @jaekwon's directives (#5728) 2020-02-28 18:27:42 +00:00
Alessio Treglia d094183895
Increase code coverage of version up to 100% (#5726) 2020-02-28 18:14:01 +00:00
Jonathan Gimeno f090da2100 edit text 2020-02-28 19:07:10 +01:00
Jonathan Gimeno f8442bb46f add last touches to the PR 2020-02-28 19:06:03 +01:00
Alexander Bezobchuk 2b688a0121
Merge branch 'master' into jonathan/4875-staking-test-use-simapp 2020-02-28 09:59:39 -08:00
Alexander Bezobchuk 19546f2197
Update simapp/test_helpers.go 2020-02-28 09:59:26 -08:00
Alexander Bezobchuk 03af49bda2
Update simapp/test_helpers.go 2020-02-28 09:59:17 -08:00
Alexander Bezobchuk 9aa2088c23
Update x/staking/keeper/keeper.go 2020-02-28 09:59:06 -08:00
Alexander Bezobchuk 256e5fc863
Update simapp/test_helpers.go 2020-02-28 09:58:55 -08:00
Alexander Bezobchuk 25129309f1
Merge branch 'master' into jonathan/5684-prune-syncable 2020-02-28 09:51:14 -08:00
Alexander Bezobchuk 5c1c64bfae
Merge PR #5718: Return Empty GasInfo on Failed Msg Validation 2020-02-28 09:51:00 -08:00
Alexander Bezobchuk 56c08949a4
Merge branch 'master' into jonathan/5684-prune-syncable 2020-02-28 09:39:03 -08:00
Marko a5fd4705ed
Merge PR #5723: fix config file 2020-02-28 09:36:26 -08:00
Alessio Treglia 1b78457135
Run go mod tidy (#5721) 2020-02-28 13:19:00 +00:00
Alessio Treglia 66f8e35b90
Build with go1.14 (#5719) 2020-02-28 12:26:11 +00:00
Jonathan Gimeno 2c32ff3ee4
Merge branch 'master' into jonathan/4875-staking-test-use-simapp 2020-02-28 10:58:16 +01:00
Jonathan Gimeno 60970baf20 update from PR comments 2020-02-28 10:53:56 +01:00
Jonathan Gimeno 3c262306fa add more information into GetPruningOptionsFromFlags 2020-02-28 10:48:34 +01:00
Anil Kumar Kammari 0b7449129a
Merge PR #5500: Regen network/multistore upgrades 2020-02-27 22:26:04 -08:00
Marko de0f1a9e40
Merge PR #5714: tools: add mergify 2020-02-27 21:36:42 -08:00
Jonathan Gimeno 60293dd2e6
Merge branch 'master' into jonathan/4875-staking-test-use-simapp 2020-02-27 17:51:14 +01:00
Jonathan Gimeno 0027111db4 fix linter test 2020-02-27 17:29:13 +01:00
Jonathan Gimeno f89fc6af03 Merge branch 'master' into jonathan/5684-prune-syncable 2020-02-27 17:23:40 +01:00
Jonathan Gimeno 191664bb30 fix issue number 2020-02-27 17:22:47 +01:00
Jonathan Gimeno ce46939308 rename function names 2020-02-27 16:49:53 +01:00
Jonathan Gimeno d279066285 remove duplicated func 2020-02-27 16:47:59 +01:00
Jonathan Gimeno fa3572e300 update start cmd desc 2020-02-27 16:35:13 +01:00
Jonathan Gimeno a21a7faebc update test error lint 2020-02-27 16:33:30 +01:00