-
Notifications
You must be signed in to change notification settings - Fork 87
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
Externally commit regular utxo #887
Conversation
Transactions CostsSizes and execution budgets for Hydra protocol transactions. Note that unlisted parameters are currently using
Script summary
Cost of Init Transaction
Cost of Commit TransactionThis is using ada-only outputs for better comparability.
Cost of CollectCom Transaction
Cost of Close Transaction
Cost of Contest Transaction
Cost of Abort TransactionSome variation because of random mixture of still initial and already committed outputs.
Cost of FanOut TransactionInvolves spending head output and burning head tokens. Uses ada-only UTxO for better comparability.
|
b6d16eb
to
8dc60f2
Compare
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 see the following issues with this feature:
- the hydra-node is paying the fees for the client, is it ok in the long run?
the hydra-node could spend the same UTxO twice for paying fees if it receives two draftTx in a row. Is it ok ?- the client could ask the hydra-node to spend a UTxO that is owned by the node and not the client. Is it ok in the long run?
I don't think those 3 points are ok. I would need to ensure that we keep track of them for future evolutions.
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.
Comments from our discussion today.
86fce02
to
d05ce7d
Compare
@pgrange I think your comments were addressed in the grooming session. |
29cad13
to
c828a59
Compare
c828a59
to
602d762
Compare
5a204be
to
408bbb4
Compare
summary: Hydra node drafted commit transaction responses. | ||
operationId: draftCommitTxResponse | ||
message: | ||
$ref: "#/components/messages/DraftCommitTxResponse" |
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.
Should: Document the possible error responses with status codes.
Could: inline response and error schemas as they likely are not going to be re-used
- Remove not needed pragma - Use consumeRequestBodyStrict - Rename router to chain
- Decide on what errors we should throw in a Chain handle - Improve haddocks
- update api version to 0.11.0 - update api description and operation ids - upgrade npm package to fix yarn run v1.22.19 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. cmd - add http bindings to api /commit channel - add tag to response to make yarn run v1.22.19 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. happy, but it is still broken for request
The query field represents a Schema object containing the definitions for each query parameter. We are not considering any query params, but just have a request body. The response does use a query parameters either, but only a response body.
9a691df
to
f37c49a
Compare
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.
Good enough to continue with the other work streams
0490cd3
to
d8a1942
Compare
This PR adds the option for our users to commit a regular utxo to the Head externally. Note that this is the initial chunk of work and we are still working on enabling script utxos to be spent in the Head too.
Why
We want to allow our users to commit externally.
What
Create a HTTP endpoint that can accept utxo user wants to commit to a head. Respond with a draft commit transaction that needs to be signed and submitted to the network by the user.
🌴 Added
DraftCommitTxRequest
to obtain client utxo in our server🌴 Added
DraftCommitTxResponse
to return draft tx to the user🌴 Added
APIRestInputReceived
to the logs so we can observe client contents sent🌴 Added new
PostTxError
calledFailedToDraftTxNotInitializing
in case we experience a failure while drafting a tx