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

[Constructor] Inject Public Keys During Transaction Construction #133

Merged
merged 4 commits into from
Sep 4, 2020

Conversation

patrick-ogrady
Copy link
Contributor

@patrick-ogrady patrick-ogrady commented Sep 3, 2020

Related Issue: coinbase/mesh-cli#112

The v1.4.3 release of the Rosetta Specification allows a Rosetta implementation to request the PublicKeys of any number of AccountIdentifiers for calls to /construction/metadata and /construction/payloads.

This PR adds support for the fetcher to accept PublicKeys in calls to /construction/metadata and /construction/payloads and for the constructor to inject requested public keys automatically.

Changes

  • Update fetcher methods for ConstructionPreprocess, ConstructionMetadata, and ConstructionPaylaods
  • Inject types.PublicKey during transaction construction in the coordinator
  • Add transactional key fetching from key storage

Future PR

  • Update rosetta specification to return AccountIdentifier in ConstructionDeriveResponse and SigningPayload (non-breaking by adding field + deprecating)
  • Store keys under AccountIdentifier instead of address (there may be multiple keys associated with the same AccountIdentifier.Address)
  • Modify broadcast storage to return locked account identifiers instead of addresses

@coveralls
Copy link

coveralls commented Sep 3, 2020

Pull Request Test Coverage Report for Build 5944

  • 13 of 25 (52.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.09%) to 79.402%

Changes Missing Coverage Covered Lines Changed/Added Lines %
constructor/coordinator/coordinator.go 13 19 68.42%
fetcher/construction.go 0 6 0.0%
Totals Coverage Status
Change from base Build 5889: -0.09%
Covered Lines: 3454
Relevant Lines: 4350

💛 - Coveralls

@patrick-ogrady patrick-ogrady changed the title Inject Public Keys During Construction Inject Public Keys During Transaction Construction Sep 3, 2020
@patrick-ogrady patrick-ogrady changed the title Inject Public Keys During Transaction Construction [WIP] Inject Public Keys During Transaction Construction Sep 3, 2020
@patrick-ogrady patrick-ogrady changed the title [WIP] Inject Public Keys During Transaction Construction Inject Public Keys During Transaction Construction Sep 3, 2020
@patrick-ogrady patrick-ogrady changed the title Inject Public Keys During Transaction Construction [Constructor] Inject Public Keys During Transaction Construction Sep 3, 2020
@patrick-ogrady patrick-ogrady merged commit 701531d into master Sep 4, 2020
@patrick-ogrady patrick-ogrady deleted the patrick/inject-pubkeys-during-construction branch September 4, 2020 00:39
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.

None yet

3 participants