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

Problem: (CRO-582) Create transfer address is not re-usable#593

Merged
bors[bot] merged 1 commit intocrypto-com:masterfrom
calvinlauyh:feature/cro-582-reusable-new-transfer-address
Nov 18, 2019
Merged

Problem: (CRO-582) Create transfer address is not re-usable#593
bors[bot] merged 1 commit intocrypto-com:masterfrom
calvinlauyh:feature/cro-582-reusable-new-transfer-address

Conversation

@calvinlauyh
Copy link
Copy Markdown
Contributor

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

@calvinlauyh calvinlauyh changed the title Problem: (CRO-582) Create Transfer Address is not a re-usable component Problem: (CRO-582) Create transfer address is not re-usable Nov 16, 2019
@codecov
Copy link
Copy Markdown

codecov bot commented Nov 16, 2019

Codecov Report

Merging #593 into master will increase coverage by 0.08%.
The diff coverage is 77.89%.

@@            Coverage Diff             @@
##           master     #593      +/-   ##
==========================================
+ Coverage   67.33%   67.41%   +0.08%     
==========================================
  Files         125      126       +1     
  Lines       14675    14855     +180     
==========================================
+ Hits         9881    10015     +134     
- Misses       4794     4840      +46
Impacted Files Coverage Δ
...transaction_builder/default_transaction_builder.rs 85.89% <ø> (ø) ⬆️
client-common/src/lib.rs 100% <ø> (ø) ⬆️
client-core/src/signer/default_signer.rs 88.07% <ø> (ø) ⬆️
client-rpc/src/rpc/multisig_rpc.rs 33.33% <ø> (-0.66%) ⬇️
client-core/src/wallet/default_wallet_client.rs 59.92% <100%> (+0.15%) ⬆️
client-common/src/key/public_key.rs 80% <100%> (+1.1%) ⬆️
client-common/src/multi_sig_address.rs 75.8% <75.8%> (ø)
client-core/src/service/root_hash_service.rs 91.95% <94.73%> (+6.32%) ⬆️
chain-core/src/tx/fee/mod.rs 87.68% <0%> (-0.5%) ⬇️
chain-core/src/common/merkle_tree.rs 98.55% <0%> (-0.25%) ⬇️
... and 1 more

@calvinaco calvinaco marked this pull request as ready for review November 18, 2019 03:56
@calvinaco
Copy link
Copy Markdown
Collaborator

bors try

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

try

Build failed

@tomtau
Copy link
Copy Markdown
Contributor

tomtau commented Nov 18, 2019

bors retry

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

@tomtau tomtau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks ok -- note that the multi-sig addresses can have more general conditions, e.g. there are signers A,B,C and it could be signed by either A or B&C... and this client API doesn't allow/expose that, but it could perhaps be added later when required?

@tomtau
Copy link
Copy Markdown
Contributor

tomtau commented Nov 18, 2019

@calvinlauco can you squash the commits?

@calvinaco
Copy link
Copy Markdown
Collaborator

looks ok -- note that the multi-sig addresses can have more general conditions, e.g. there are signers A,B,C and it could be signed by either A or B&C... and this client API doesn't allow/expose that, but it could perhaps be added later when required?

Yes, I agree. Flexible signing pairs can have a separate task for it. This task focus more on extracting and refactoring existing logic to be re-usable component.

@calvinlauco can you squash the commits?

Ok, will squash it now.

Solution: Extract MultiSigAddress from root_hash service
@tomtau
Copy link
Copy Markdown
Contributor

tomtau commented Nov 18, 2019

bors r+

@bors
Copy link
Copy Markdown
Contributor

bors bot commented Nov 18, 2019

try

Build failed

@calvinaco
Copy link
Copy Markdown
Collaborator

bors retry

@bors
Copy link
Copy Markdown
Contributor

bors bot commented Nov 18, 2019

Already running a review

@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

Build failed (retrying...)

bors bot added a commit that referenced this pull request Nov 18, 2019
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

598: Bump abci from 0.6.3 to 0.6.4 r=tomtau a=dependabot-preview[bot]

Bumps [abci](https://github.com/tendermint/rust-abci) from 0.6.3 to 0.6.4.
<details>
<summary>Changelog</summary>

*Sourced from [abci's changelog](https://github.com/tendermint/rust-abci/blob/develop/CHANGELOG.md).*

> ## v0.6.4
> 
> ### IMPROVEMENTS:
> 
> - [\#100](https://github-redirect.dependabot.com/tendermint/rust-abci/pull/100): worker panic propagated to the abci process
> 
> _November 11, 2019_
</details>
<details>
<summary>Commits</summary>

- See full diff in [compare view](https://github.com/tendermint/rust-abci/commits)
</details>
<br />

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

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: Calvin Lau <calvinlauco@gmail.com>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
@bors
Copy link
Copy Markdown
Contributor

bors bot commented Nov 18, 2019

@bors bors bot merged commit 3f40511 into crypto-com:master Nov 18, 2019
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.

4 participants