3

I have found the the below operations in Tezos :

  1. "endorsement"

  2. "seed_nonce_revelation"

  3. "double_endorsement_evidence"
  4. "double_baking_evidence"
  5. "activate_account"
  6. "proposals"
  7. "ballot"
  8. "reveal"
  9. "transaction"
  10. "origination"
  11. "delegation"

Requirement:

I want to construct a Ledger/ UI in which User provides the address and the block level. I need to get the balance of the address till that block level and fetch all the operations performed for that account and when i sum up all the transaction values it should be equall to balance.

So for the above requirement need to know the below

  1. Amount involved in the operation
  2. Fees Consumed

Need help on this .

  1. Which of the operations includes fees ? And is the fees fixed for a protocol

  2. which of the operations affect the balance of a contract or address?

Any help.

4

Only manager operations spend fees (and no, fees are not fixed):

  • delegation
  • origination
  • transaction
  • reveal

Also, if you sum up all the operations you won't get the correct balance (in many cases), because there are additional things or events which affect the account balance, such as balance updates inside the block metadata or context migration during protocol updates, etc.

For example, here you can see that the account received +0.000001 tez an that was not an ordinary operation which you can find in blockchain by hash, but some "Babylon's airdrop".

I recommend you use TzKT Explorer API (or just the indexer, it's open-source) because it extends existing operations with several "synthetic" types, such as migration, revelation_penalty and baking, that compensate for the missing parts in the account balance history.

Only then you can get the correct balance value by summing up the operations.

| improve this answer | |
  • Thanks Groxan but in protocol 004 it seems they have fixed the fees . Please find the link tezos.gitlab.io/protocols/004_Pt24m4xi.html – user3759202 Feb 15 at 19:27
  • 2
    @user3759202 No, it's not. They simply suggested the minimum recommended values (it's said fees >=, but not fees =). Nevertheless, I can still set any value. Look at this, the fee is 0, but operation is applied and everythin's fine: tzkt.io/ontMyM3cq1LFY6ZsEKbuN7q15NKdn3c8XA1BWuouucF9c9jQ2rv/… Or this one: tzkt.io/onkVut9fo6jyGu3ANRrFKGiYMjKhu9XdbmvCBhBNkM2eE5NnH5b/… – Groxan Feb 15 at 20:49
  • i have set up a tezos archival node and if i am pulling out the block info then i would not be getting the Bablyon's airdrop transactions. Then i cant rely on the node data itself . Is that Correct ? and why the tezos node / blockchain does not record these kind(babylon's airdrop transactions) Could you please help me with some of the other babylon's airdrop transactions. – user3759202 Feb 16 at 9:54
  • 1
    The node data itself is correct, and you can rely on it, but there are just some missed parts =) There are many things in Tezos which could be improved actually (e.g. returning context changes). I hope core devs will do that in the future... Here is the API endpoint to access all migration operations, just paginate over it: api.tzkt.io/#operation/Operations_GetMigrations What you need is "kind": "bootstrap" and "kind": "airdrop". Or use this endpoint to access all the account operations: api.tzkt.io/#operation/Accounts_GetOperations – Groxan Feb 16 at 12:19
  • 1
    @user3759202 you're welcome. Btw, if the answer helped, you can accept it by clicking on check mark ;) tezos.stackexchange.com/tour – Groxan Feb 17 at 15:10
2

This appears to be the latest. https://github.com/TezTech/eztz/blob/master/PROTO_004_FEES.md https://tezos.gitlab.io/protocols/004_Pt24m4xi.html#gas-and-fees

All other operations are fee-less.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.