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

Problem: (CRO-215) TransactionBuilder is not integrated with TransactionCipher#229

Merged
devashishdxt merged 1 commit intocrypto-com:masterfrom
devashishdxt:transaction-builder
Jul 24, 2019
Merged

Problem: (CRO-215) TransactionBuilder is not integrated with TransactionCipher#229
devashishdxt merged 1 commit intocrypto-com:masterfrom
devashishdxt:transaction-builder

Conversation

@devashishdxt
Copy link
Copy Markdown
Contributor

Solution: Added TransactionCipher in TransactionBuilder and started using it for transaction encryption.

…ionCipher

Solution: Added `TransactionCipher` in `TransactionBuilder` and started using it for transaction encryption.
/// 7. If `new_fees > fees`, then change `fees = new_fees` and goto step 3, otherwise return signed transaction.
/// 6. Encrypt/obfuscate transaction.
/// 7. Calculate `new_fees`.
/// 8. If `new_fees > fees`, then change `fees = new_fees` and goto step 3, otherwise return signed transaction.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this could potentially be simplified (i.e. no need to have several round trips -- the fee can be estimated correctly upfront) once there's a concrete implementation: if it's obfuscated by a stream cipher, it should be the same... if it's a block cipher, it'll be rounded by the block size.
I think it'll most likely be AES_128_GCM_SIV

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes.

Currently, we have to do this because 1-of-n signatures consist of a schnorr signature and a merkle proof which can be of variable size. So, we cannot deterministically estimate the size and structure of a 1-of-n signature.

Once we have a transaction format where size can be estimated deterministically, we can change this.

@codecov
Copy link
Copy Markdown

codecov bot commented Jul 24, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@a93c893). Click here to learn what that means.
The diff coverage is 44.28%.

@@            Coverage Diff            @@
##             master     #229   +/-   ##
=========================================
  Coverage          ?   78.64%           
=========================================
  Files             ?       91           
  Lines             ?     9085           
  Branches          ?        0           
=========================================
  Hits              ?     7145           
  Misses            ?     1940           
  Partials          ?        0
Impacted Files Coverage Δ
client-cli/src/command.rs 0% <0%> (ø)
client-rpc/src/server.rs 9.23% <0%> (ø)
client-rpc/src/client_rpc.rs 53.41% <0%> (ø)
...transaction_builder/default_transaction_builder.rs 90.9% <72.72%> (ø)
client-core/src/wallet/default_wallet_client.rs 90.88% <78.94%> (ø)

@devashishdxt devashishdxt merged commit a4e833a into crypto-com:master Jul 24, 2019
@devashishdxt devashishdxt deleted the transaction-builder branch July 24, 2019 10:03
bors bot added a commit that referenced this pull request Oct 2, 2019
441: Bump ethbloom from 0.7.0 to 0.8.0 r=devashishdxt a=dependabot-preview[bot]

Bumps [ethbloom](https://github.com/paritytech/parity-common) from 0.7.0 to 0.8.0.
<details>
<summary>Commits</summary>

- [`1e9f990`](paritytech/parity-common@1e9f990) update rand to 0.7 (breaking change) ([#217](https://github-redirect.dependabot.com/paritytech/parity-common/issues/217))
- [`f884d77`](paritytech/parity-common@f884d77) Fix deprecation warning ([#168](https://github-redirect.dependabot.com/paritytech/parity-common/issues/168))
- [`b0ec18d`](paritytech/parity-common@b0ec18d) Fix typos ([#229](https://github-redirect.dependabot.com/paritytech/parity-common/issues/229))
- [`28781a0`](paritytech/parity-common@28781a0) Bump parking_lot version ([#227](https://github-redirect.dependabot.com/paritytech/parity-common/issues/227))
- [`bf0ba84`](paritytech/parity-common@bf0ba84) [kvdb-web] bump futures-preview to 0.3.0-alpha.18 ([#225](https://github-redirect.dependabot.com/paritytech/parity-common/issues/225))
- [`31b6479`](paritytech/parity-common@31b6479) [kvdb-web] indexeddb implementation ([#202](https://github-redirect.dependabot.com/paritytech/parity-common/issues/202))
- [`085d18b`](paritytech/parity-common@085d18b) [kvdb-memorydb] Migrated code to 2018 edition, updated parking_lot ([#222](https://github-redirect.dependabot.com/paritytech/parity-common/issues/222))
- [`baf1df9`](paritytech/parity-common@baf1df9) Migrated code to 2018 edition, updated dependencies ([#221](https://github-redirect.dependabot.com/paritytech/parity-common/issues/221))
- [`6a580c1`](paritytech/parity-common@6a580c1) Bump version ([#219](https://github-redirect.dependabot.com/paritytech/parity-common/issues/219))
- [`67a9e7d`](paritytech/parity-common@67a9e7d) Find PendingIterator in Transaction Pool ([#218](https://github-redirect.dependabot.com/paritytech/parity-common/issues/218))
- Additional commits viewable in [compare view](paritytech/parity-common@ethbloom-v0.7.0...ethbloom-v0.8.0)
</details>
<br />

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

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)

Finally, you can contact us by mentioning @dependabot.

</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.

3 participants