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

Run make localnet-start in CI and ensure network reaches at least 10 blocks #2057

Closed
wants to merge 17 commits into from

Conversation

jackzampolin
Copy link
Member

  • Linked to github-issue with discussion and accepted design OR link to spec that describes this work.
  • Updated all relevant documentation (docs/)
  • Updated all relevant code comments
  • Added entries in PENDING.md that include links to the relevant issue or PR that most accurately describes the change.

For Admin Use:

  • Added appropriate labels to PR (ex. wip, ready-for-review, docs)
  • Reviewers Assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

zramsay and others added 16 commits August 13, 2018 13:15
* Added tests for Delegator Validators routes

* Updated tests for undelegations

* Updated Gaia-lite docs

* Updated PENDING.md

* Updated comments

* Deleted more comments

* Add spacing
If dep already sees its scratch directory (.vendor-new), dep ensure fails. This rm -rf's that directory so make get_vendor_deps doesn't fail.
* changelog

* ...

* decimal func working

* decimal complete, untested

* fixing tests

* decimal compile errors resolved

* test compile errors

* precision multiplier test

* 1% laptop battery

* fixed TestNewDecFromStr

* equalities working

* fix bankers round chop

* ...

* working, some decimal issues resolved

* fix rounding error

* rounding works

* decimal works

* ...

* deleted rational

* rational conversion working

* revert changelog

* code compiles (not tests)

* went through all NewDec, made sure they were converted from NewRat properly

* test debugging

* all testing bugs besides the json marshalling fixed

* json unmarshal

* lint

* document update

* fix lcd test

* cli test fix

* mostly undo Dece -> Rate

* val comments

* Efficiency improvements

This now caches all of the precision multipliers (as they were all
used in non-mutative functions), and caches the precisionInt calculation.
(Now it just copies the already calculated value)

* Cache another precisionInt() call.

* Improve banker rounding efficiency

* remove defer, make negation in-place.

* chris val comments

* bez comments

* Aditya comments

* ...

* val comments

* rebasing start

* ...

* compiling

* tests pass

* cli fix

* anton, cwgoes, val comments

* val and jae comments

* type

* undo reuse quo
This is done by making the function mutative. A non-mutative variant
is created for functions that depend on it being non-mutative.
Using the addresses in Bech32 form
… x/stake commands

* Handle panic gracefully when unbond begin fails

See #1831

* Handle failure to query delegation gracefully.

Closes #1907

* Update PENDING.md

* Reuse stake's error functions

* New ErrBadValidatorAddr error

UnmarshalValidator() checks the address length first;
it does not make sense to attempt unmarshalling if the
address is wrong.

* New ErrBadDelegationAddr error

* Introduce ErrBad{Redelegation,UnbondingDelegation}Addr custom errors to replace errors.New() calls

* Replace ErrBadUnbondingDelegationAddr with ErrBadDelegationAddr to avoid duplication

Thanks: @melekes for pointing this out

* Use sdk.AddrLen instead of hardcoded address length

* s/triple/tuple/ ## mention PR id in PENDING.md
@codecov
Copy link

codecov bot commented Aug 16, 2018

Codecov Report

Merging #2057 into release/v0.24.0 will increase coverage by 1.05%.
The diff coverage is 70.37%.

@@                 Coverage Diff                 @@
##           release/v0.24.0    #2057      +/-   ##
===================================================
+ Coverage            63.81%   64.86%   +1.05%     
===================================================
  Files                  113      115       +2     
  Lines                 6665     6863     +198     
===================================================
+ Hits                  4253     4452     +199     
+ Misses                2129     2127       -2     
- Partials               283      284       +1

@jackzampolin
Copy link
Member Author

The localnet command is failing on the nondeterminism issue:

+ ./scripts/localnet-blocks-test.sh 40 5 10 localhost
Number of Blocks: 0
Number of Blocks: 0
Number of Blocks: 1
Number of Blocks: 2
Number of Blocks: 2
Number of Blocks: 2
Number of Blocks: 2
Number of Blocks: 2
Number of Blocks: 2
Number of Blocks: 2
Number of Blocks: 2
Number of Blocks: 2
Number of Blocks: 2
Number of Blocks: 2
Number of Blocks: 2
Number of Blocks: 2
Number of Blocks: 2
Number of Blocks: 2
Number of Blocks: 2
Number of Blocks: 2
Number of Blocks: 2
Number of Blocks: 2
Number of Blocks: 2
Number of Blocks: 2
Number of Blocks: 2
Number of Blocks: 2
Number of Blocks: 2
Number of Blocks: 2
Number of Blocks: 2
Number of Blocks: 2
Number of Blocks: 2
Number of Blocks: 2
Number of Blocks: 2
Number of Blocks: 2
Number of Blocks: 2
Number of Blocks: 2
Number of Blocks: 2
Number of Blocks: 2
Number of Blocks: 2
Number of Blocks: 2
Timeout reached, exiting failure...
Exited with code 1

@jackzampolin
Copy link
Member Author

And passing after I cherry-picked the non-determinism fix:

+ ./scripts/localnet-blocks-test.sh 40 5 10 localhost
Number of Blocks: 0
Number of Blocks: 0
Number of Blocks: 1
Number of Blocks: 2
Number of Blocks: 3
Number of Blocks: 4
Number of Blocks: 5
Number of Blocks: 6
Number of Blocks: 7
Number of Blocks: 8
Number of Blocks: 9
Number of Blocks: 10
Number of Blocks: 11
Number of blocks reached, exiting success...

@cwgoes cwgoes changed the base branch from develop to release/v0.24.0 August 16, 2018 11:56
@cwgoes cwgoes changed the base branch from release/v0.24.0 to develop August 16, 2018 11:56
@cwgoes
Copy link
Contributor

cwgoes commented Aug 16, 2018

If you instead target this against the release branch and rebase you don't need to cherry-pick the fix.

Alternatively we can wait until we merge the release back into develop.

This process definitely needs work...

@faboweb
Copy link
Contributor

faboweb commented Aug 16, 2018

Great idea @jackzampolin

@jackzampolin
Copy link
Member Author

Why did we close this?

@alexanderbez
Copy link
Contributor

Sorry -- I'm not sure how I closed this? Fat fingered 🤷‍♂️

@alexanderbez alexanderbez reopened this Aug 16, 2018
@jackzampolin jackzampolin changed the base branch from develop to release/v0.24.0 August 16, 2018 18:02
@jackzampolin
Copy link
Member Author

Well @alexanderbez you were right on this.

@jackzampolin
Copy link
Member Author

Closing in favor of #2067

@cwgoes cwgoes deleted the jack/ci-localnet branch August 16, 2018 18:27
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.