-
Notifications
You must be signed in to change notification settings - Fork 550
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
Conversation
Fails to attach signature to transaction properly
…rse' into rosetta/end-to-end-submit
in | ||
Transaction.Signed.Rendered.to_yojson rendered_signed_transaction | ||
|> Yojson.Safe.to_string | ||
[%test_eq: string] signature signature' ; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
src/app/rosetta/test-agent/agent.ml
Outdated
assert ( | ||
String.equal hash_res.Construction_hash_response.transaction_hash | ||
submit_res.transaction_identifier.hash ) ; | ||
[%log debug] "Construction_submit is finalize" ; |
There was a problem hiding this comment.
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 = |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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)
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.