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

tx_signer: add "JSONRPC" request params; refactor response #170

Merged
merged 1 commit into from Oct 15, 2020

Conversation

tony-iqlusion
Copy link
Member

This commit sends a JSON-serialized body of parameters with each request to a "transaction source" (i.e. oracle):

  • Chain ID
  • Arbitrary context string (optional; taken from tmkms config)
  • Last Tendermint RPC /status response
  • Commit response from last broadcasted transaction

This should make it possible for Delphi to detect that an error occurred broadcasting the last transaction and skip voting during that period.

Additionally it makes a somewhat breaking change to the response format expected from a transaction source: it now (optionally) expects a single transaction, rather than a vec of them. This simplifies the response error handling, and encourages sources to pack more messages into a single transaction rather than using multiple transactions.

This commit sends a JSON-serialized body of parameters with each request
to a "transaction source" (i.e. oracle):

- Chain ID
- Arbitrary context string (optional; taken from tmkms config)
- Last Tendermint RPC `/status` response
- Commit response from last broadcasted transaction

This should make it possible for Delphi to detect that an error occured
broadcasting the last transaction and skip voting during that period.

Additionally it makes a somewhat breaking change to the response format
expected from a transaction source: it now (optionally) expects a single
transaction, rather than a vec of them. This simplifies the response
error handling, and encourages sources to pack more messages into a
single transaction rather than using multiple transactions.
@tony-iqlusion tony-iqlusion merged commit b5459e2 into develop Oct 15, 2020
@tony-iqlusion tony-iqlusion deleted the tx_signer/request-params branch October 15, 2020 19:13
tarcieri pushed a commit to iqlusioninc/delphi that referenced this pull request Oct 15, 2020
Adds support for a JSON-serialized request body, corresponding to the
one introduced to the KMS in:

iqlusioninc/tmkms#170

So far it just prints out the contents as a `dbg` statement, but this
can be used in integration testing to cross-check that the body is being
sent and parsed correctly.

After confirming that, we can add handling for its contents.
tarcieri pushed a commit to iqlusioninc/delphi that referenced this pull request Oct 15, 2020
Adds support for a JSON-serialized request body, corresponding to the
one introduced to the KMS in:

iqlusioninc/tmkms#170

So far it just prints out the contents as a `dbg` statement, but this
can be used in integration testing to cross-check that the body is being
sent and parsed correctly.

After confirming that, we can add handling for its contents.
tony-iqlusion added a commit to iqlusioninc/delphi that referenced this pull request Oct 15, 2020
Adds support for a JSON-serialized request body, corresponding to the
one introduced to the KMS in:

iqlusioninc/tmkms#170

So far it just prints out the contents as a `dbg` statement, but this
can be used in integration testing to cross-check that the body is being
sent and parsed correctly.

After confirming that, we can add handling for its contents.
@tony-iqlusion tony-iqlusion mentioned this pull request Oct 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants