Skip to content
This repository was archived by the owner on Jul 27, 2022. It is now read-only.

Problem: no transaction type for joining validator set (CRO-553)#591

Merged
bors[bot] merged 1 commit intocrypto-com:masterfrom
tomtau:feature/dynamic-validator-tx
Nov 19, 2019
Merged

Problem: no transaction type for joining validator set (CRO-553)#591
bors[bot] merged 1 commit intocrypto-com:masterfrom
tomtau:feature/dynamic-validator-tx

Conversation

@tomtau
Copy link
Copy Markdown
Contributor

@tomtau tomtau commented Nov 15, 2019

Solution:

  • consolidated ABCI node state to have one field dedicated to validate state tracking
  • added a NodeJoinTx type + basic validation code and tests
  • added a End block handling when the validator power changed or new nodes were changed -- based on the top validators after modifications, it computes the validator updates it needs to pass to tendermint
  • small steps in storage/tx.rs refactoring -- two verify functions to distinguish between abci-only and enclave-dependant transactions + moved out the huge functionality tests into a separate file

NOTE: don't get scared about the PR size -- most of it is just moving storage/tx.rs tests into a separate file (it'll still need some improvements, but that can be done in a separate PR)

@codecov
Copy link
Copy Markdown

codecov bot commented Nov 18, 2019

Codecov Report

Merging #591 into master will increase coverage by 0.57%.
The diff coverage is 93.28%.

@@            Coverage Diff             @@
##           master     #591      +/-   ##
==========================================
+ Coverage   67.32%   67.89%   +0.57%     
==========================================
  Files         125      128       +3     
  Lines       14675    15114     +439     
==========================================
+ Hits         9880    10262     +382     
- Misses       4795     4852      +57
Impacted Files Coverage Δ
chain-abci/src/liveness.rs 97.87% <ø> (ø) ⬆️
chain-core/src/state/mod.rs 86.66% <ø> (ø) ⬆️
chain-abci/src/app/commit.rs 86.13% <0%> (-2.64%) ⬇️
chain-core/src/tx/mod.rs 57.86% <0%> (-2.96%) ⬇️
chain-abci/tests/punishment.rs 96.77% <100%> (+0.05%) ⬆️
chain-abci/src/app/validate_tx.rs 94.02% <100%> (+1.72%) ⬆️
chain-abci/src/app/slash_accounts.rs 98.36% <100%> (+0.11%) ⬆️
chain-core/src/state/validator.rs 23.8% <23.8%> (ø)
chain-abci/src/app/mod.rs 81.39% <40.9%> (-3.53%) ⬇️
chain-core/src/state/tendermint.rs 60.49% <50%> (+1.51%) ⬆️
... and 19 more

@tomtau tomtau force-pushed the feature/dynamic-validator-tx branch from a2f8787 to 987d142 Compare November 18, 2019 05:24
@tomtau tomtau marked this pull request as ready for review November 18, 2019 05:25
Solution:
- consolidated ABCI node state to have one field dedicated to validate state tracking
- added a NodeJoinTx type + basic validation code and tests
- added a End block handling when the validator power changed or new nodes were changed -- based on the top validators after modifications, it computes the validator updates it needs to pass to tendermint
- small steps in storage/tx.rs refactoring -- two verify functions to distinguish between abci-only and enclave-dependant transactions + moved out the huge functionality tests into a separate file
@tomtau tomtau force-pushed the feature/dynamic-validator-tx branch from 987d142 to 0ea3ae7 Compare November 18, 2019 05:59
@tomtau
Copy link
Copy Markdown
Contributor Author

tomtau commented Nov 18, 2019

bors try

@tomtau
Copy link
Copy Markdown
Contributor Author

tomtau commented Nov 18, 2019

bors r+

bors bot added a commit that referenced this pull request Nov 18, 2019
@bors
Copy link
Copy Markdown
Contributor

bors bot commented Nov 18, 2019

Merge conflict (retrying...)

bors bot added a commit that referenced this pull request Nov 18, 2019
591: Problem: no transaction type for joining validator set (CRO-553) r=tomtau a=tomtau

Solution:
- consolidated ABCI node state to have one field dedicated to validate state tracking
- added a NodeJoinTx type + basic validation code and tests
- added a End block handling when the validator power changed or new nodes were changed -- based on the top validators after modifications, it computes the validator updates it needs to pass to tendermint
- small steps in storage/tx.rs refactoring -- two verify functions to distinguish between abci-only and enclave-dependant transactions + moved out the huge functionality tests into a separate file

NOTE: don't get scared about the PR size -- most of it is just moving `storage/tx.rs` tests into a separate file (it'll still need some improvements, but that can be done in a separate PR)


593: Problem: (CRO-582) Create transfer address is not re-usable r=tomtau a=calvinlauco

Solution: Extracted MultiSigAddress from root_hash service to serve single responsibility

---
Remarks:
- This PR is a pre-requisite of the JS library by making components re-usable by JS
- Removed n(total_signers) field because it is implied from len of public keys

Co-authored-by: Tomas Tauber <2410580+tomtau@users.noreply.github.com>
Co-authored-by: Calvin Lau <calvinlauco@gmail.com>
@bors
Copy link
Copy Markdown
Contributor

bors bot commented Nov 18, 2019

try

Build failed

@bors
Copy link
Copy Markdown
Contributor

bors bot commented Nov 18, 2019

Build failed (retrying...)

bors bot added a commit that referenced this pull request Nov 18, 2019
591: Problem: no transaction type for joining validator set (CRO-553) r=tomtau a=tomtau

Solution:
- consolidated ABCI node state to have one field dedicated to validate state tracking
- added a NodeJoinTx type + basic validation code and tests
- added a End block handling when the validator power changed or new nodes were changed -- based on the top validators after modifications, it computes the validator updates it needs to pass to tendermint
- small steps in storage/tx.rs refactoring -- two verify functions to distinguish between abci-only and enclave-dependant transactions + moved out the huge functionality tests into a separate file

NOTE: don't get scared about the PR size -- most of it is just moving `storage/tx.rs` tests into a separate file (it'll still need some improvements, but that can be done in a separate PR)


Co-authored-by: Tomas Tauber <2410580+tomtau@users.noreply.github.com>
@bors
Copy link
Copy Markdown
Contributor

bors bot commented Nov 18, 2019

Build failed

@tomtau
Copy link
Copy Markdown
Contributor Author

tomtau commented Nov 18, 2019

bors r+

bors bot added a commit that referenced this pull request Nov 18, 2019
591: Problem: no transaction type for joining validator set (CRO-553) r=tomtau a=tomtau

Solution:
- consolidated ABCI node state to have one field dedicated to validate state tracking
- added a NodeJoinTx type + basic validation code and tests
- added a End block handling when the validator power changed or new nodes were changed -- based on the top validators after modifications, it computes the validator updates it needs to pass to tendermint
- small steps in storage/tx.rs refactoring -- two verify functions to distinguish between abci-only and enclave-dependant transactions + moved out the huge functionality tests into a separate file

NOTE: don't get scared about the PR size -- most of it is just moving `storage/tx.rs` tests into a separate file (it'll still need some improvements, but that can be done in a separate PR)


Co-authored-by: Tomas Tauber <2410580+tomtau@users.noreply.github.com>
@bors
Copy link
Copy Markdown
Contributor

bors bot commented Nov 18, 2019

Build failed

@tomtau
Copy link
Copy Markdown
Contributor Author

tomtau commented Nov 19, 2019

bors retry

bors bot added a commit that referenced this pull request Nov 19, 2019
591: Problem: no transaction type for joining validator set (CRO-553) r=tomtau a=tomtau

Solution:
- consolidated ABCI node state to have one field dedicated to validate state tracking
- added a NodeJoinTx type + basic validation code and tests
- added a End block handling when the validator power changed or new nodes were changed -- based on the top validators after modifications, it computes the validator updates it needs to pass to tendermint
- small steps in storage/tx.rs refactoring -- two verify functions to distinguish between abci-only and enclave-dependant transactions + moved out the huge functionality tests into a separate file

NOTE: don't get scared about the PR size -- most of it is just moving `storage/tx.rs` tests into a separate file (it'll still need some improvements, but that can be done in a separate PR)


Co-authored-by: Tomas Tauber <2410580+tomtau@users.noreply.github.com>
@bors
Copy link
Copy Markdown
Contributor

bors bot commented Nov 19, 2019

@bors bors bot merged commit 0ea3ae7 into crypto-com:master Nov 19, 2019
bors bot added a commit that referenced this pull request Dec 5, 2019
653: Bump serde_json from 1.0.42 to 1.0.44 r=tomtau a=dependabot-preview[bot]

Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.42 to 1.0.44.
<details>
<summary>Release notes</summary>

*Sourced from [serde_json's releases](https://github.com/serde-rs/json/releases).*

> ## v1.0.44
> - Implement IntoDeserializer for serde_json::Value to allow deserializing from types like `HashMap<String, Value>` ([#591](https://github-redirect.dependabot.com/serde-rs/json/issues/591))
> 
> ## v1.0.43
> - Declare accurate minimum required version of indexmap crate when preserve-order feature is enabled ([#590](https://github-redirect.dependabot.com/serde-rs/json/issues/590), thanks [@&#8203;nlordell](https://github.com/nlordell))
</details>
<details>
<summary>Commits</summary>

- [`1977e69`](serde-rs/json@1977e69) Release 1.0.44
- [`9f13db7`](serde-rs/json@9f13db7) Merge pull request 591 from erickt/value-into-deserializer
- [`4ae13a5`](serde-rs/json@4ae13a5) Implement IntoDeserializer for Value
- [`f7a4da0`](serde-rs/json@f7a4da0) Release 1.0.43
- [`76b2366`](serde-rs/json@76b2366) Merge pull request [#590](https://github-redirect.dependabot.com/serde-rs/json/issues/590) from nlordell/bump_indexmap_version
- [`19ba7be`](serde-rs/json@19ba7be) fix required minimum indexmap version
- See full diff in [compare view](serde-rs/json@v1.0.42...v1.0.44)
</details>
<br />

[![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=serde_json&package-manager=cargo&previous-version=1.0.42&new-version=1.0.44)](https://dependabot.com/compatibility-score.html?dependency-name=serde_json&package-manager=cargo&previous-version=1.0.42&new-version=1.0.44)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)



</details>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants