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

Construction API Tester #81

Merged
merged 93 commits into from
Jul 29, 2020
Merged

Construction API Tester #81

merged 93 commits into from
Jul 29, 2020

Conversation

patrick-ogrady
Copy link
Contributor

@patrick-ogrady patrick-ogrady commented Jul 27, 2020

Fixes #68
Closes #73

This is one of the most substantial PRs ever added to the rosetta-cli. It enables, for the first time, automated testing of the Construction API for both account-based and UTXO-based blockchains.

Examples of configurations for both Bitcoin and Ethereum can be found in /examples.

Changes

  • Update to latest SDK commit (v1.4.1 Specification Support mesh-sdk-go#84)
  • Migrate CoinStorage to use Coin model from spec
  • Merge miscellaneous fixes (Miscellaneous Fixes Before Release mesh-sdk-go#85)
  • More misc fixes in SDK (Parse Coins mesh-sdk-go#86)
  • support change addresses
  • get balance from balance storage instead of account balance
  • example configuration files for Bitcoin and Ethereum
  • view:network -> view:networks
  • v0.4.0 in cmd/root.go
  • don't print scientific notation for small big floats
  • address creation limit
  • define "at tip" as time-based instead of block based
  • move concurrency settings to main config
  • move largest coin function to coin storage
  • ensure no extra keys in config file
  • polish + tests (link to bitcoin and ethereum examples in README)

Future PRs

  • Fee Tuning
  • Mempool Confirmation
  • Multi-currency tests (i.e. send multiple currencies in a transaction)
  • On-Chain Address Generation (i.e. create a transaction to generate an address)
  • Enhanced end conditions (stop processing when certain conditions are met and exit with status 0)

@coveralls
Copy link

coveralls commented Jul 27, 2020

Pull Request Test Coverage Report for Build 3055

  • 627 of 890 (70.45%) changed or added relevant lines in 8 files are covered.
  • 3 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+4.7%) to 71.376%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/utils/utils.go 49 52 94.23%
internal/storage/block_storage.go 14 18 77.78%
internal/storage/key_storage.go 3 12 25.0%
internal/storage/broadcast_storage.go 72 102 70.59%
internal/storage/coin_storage.go 80 121 66.12%
internal/constructor/constructor.go 340 516 65.89%
Files with Coverage Reduction New Missed Lines %
internal/storage/broadcast_storage.go 1 70.33%
internal/storage/coin_storage.go 2 67.41%
Totals Coverage Status
Change from base Build 2332: 4.7%
Covered Lines: 1541
Relevant Lines: 2159

💛 - Coveralls

@patrick-ogrady patrick-ogrady requested review from juliankoh, qiwu7, yfl92 and a team July 29, 2020 16:29
Makefile Outdated Show resolved Hide resolved
Copy link
Contributor

@qiwu7 qiwu7 left a comment

Choose a reason for hiding this comment

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

🔥

@patrick-ogrady patrick-ogrady force-pushed the patrick/construction-tester branch 3 times, most recently from 4c2e981 to 506d9ec Compare July 29, 2020 19:53
Copy link
Contributor

@qiwu7 qiwu7 left a comment

Choose a reason for hiding this comment

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

🔥

@patrick-ogrady patrick-ogrady merged commit e77ad26 into master Jul 29, 2020
@patrick-ogrady patrick-ogrady deleted the patrick/construction-tester branch July 29, 2020 23:12
@patrick-ogrady patrick-ogrady mentioned this pull request Aug 4, 2020
20 tasks
@patrick-ogrady patrick-ogrady mentioned this pull request Aug 18, 2020
30 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Automated Construction API Testing
4 participants