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

End-to-end agent down to submit #5772

Merged
merged 7 commits into from
Aug 27, 2020
Merged

End-to-end agent down to submit #5772

merged 7 commits into from
Aug 27, 2020

Conversation

bkase
Copy link
Member

@bkase bkase commented Aug 26, 2020

Extends rosetta agent test all the way through submit. The test passes.

A follow-up PR will ensure that the transaction appears in the mempool and the operations align with those that were specified for construction.

@bkase bkase marked this pull request as ready for review August 27, 2020 17:07
@bkase bkase requested a review from a team as a code owner August 27, 2020 17:07
in
Transaction.Signed.Rendered.to_yojson rendered_signed_transaction
|> Yojson.Safe.to_string
[%test_eq: string] signature signature' ;
Copy link
Member

Choose a reason for hiding this comment

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

maybe it would be better to compare the signatures at type Signature.t, then you only have to encode the one you're returning

Copy link
Member Author

Choose a reason for hiding this comment

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

I tried this originally but it's a bit complicated because we need to derive sexp and compare on too many things.

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe you can follow up and fix this in another PR if you can see an easy way to do so

assert (
String.equal hash_res.Construction_hash_response.transaction_hash
submit_res.transaction_identifier.hash ) ;
[%log debug] "Construction_submit is finalize" ;
Copy link
Member

Choose a reason for hiding this comment

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

"finalized"

"Construction_parse : Expected $expected, after payloads+parse $actual" ;
failwith "Operations are not equal before and after payloads+parse" ) ;
let%bind signature =
Copy link
Member

Choose a reason for hiding this comment

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

could you remove the %bind and the Deferred.return ?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm binding here with the Deferred.return to bind over the Result part (we're in the Deferred.Result monad)

Base automatically changed from rosetta/construction-payloads-parse to develop August 27, 2020 17:41
@bkase bkase requested a review from a team as a code owner August 27, 2020 18:09
@bkase bkase requested a review from a team as a code owner August 27, 2020 21:03
@bkase bkase added ready-to-merge Adding this label will trigger mergify and trigger CI to run and merge the PR ci-build-me Add this label to trigger a circle+buildkite build for this branch labels Aug 27, 2020
@bkase bkase requested a review from a team as a code owner August 27, 2020 21:10
@bkase bkase merged commit 0ddce2d into develop Aug 27, 2020
@bkase bkase deleted the rosetta/end-to-end-submit branch August 27, 2020 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-build-me Add this label to trigger a circle+buildkite build for this branch ready-to-merge Adding this label will trigger mergify and trigger CI to run and merge the PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants