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

[Rosetta] Document the types of Tx Operations #1346

Open
LindaOrtega opened this issue Jan 19, 2022 · 1 comment
Open

[Rosetta] Document the types of Tx Operations #1346

LindaOrtega opened this issue Jan 19, 2022 · 1 comment
Labels
component: rosetta Updates to the Rosetta endpoints

Comments

@LindaOrtega
Copy link
Contributor

Document which types of Transaction Operations the Chainweb Rosetta implementation returns, as well as the scenario that trigger these different types.

The Rosetta organization documents the endpoint expectations, but there are still some open-ended aspects that are implementation specific.

@LindaOrtega
Copy link
Contributor Author

First draft of a potential explanation:

Blocks are made of Transactions and Transactions are made of "Operations".

Each block has 1 Transaction with an Operation labeled CoinbaseReward.

Let's say that this block then has 2 other block transactions: Tx A (a transfer) and Tx B (just a + 1 1 tx).
Then Tx A will have the following operations:

  • FundTx Operation (this is when we charge the gas payer all of the gas they allocated)
  • TransferOrCreateAcct Operation that takes the amount from the sender account
  • TransferOrCreateAcct Operation that deposits the amount to the receiver account
  • GasPayment to the Miner for the gas amount that the transaction consumed.
  • Gas Payment to the Gas Payer refunding any unused gas amount. If there's no amount to refund, then this extra operation might not be there, but I'm not sure.
  • NOTE: gas payment to miner + refund to gas payer = total amount of gas allocated in the FundTx Operation

Tx B will have the same types of Operations as Tx A but without the TransferOrCreateAcct since no KDA was moved around by users.

@LindaOrtega LindaOrtega added the component: rosetta Updates to the Rosetta endpoints label Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: rosetta Updates to the Rosetta endpoints
Projects
None yet
Development

No branches or pull requests

1 participant