0

In order to find reward for a block in any cycle we use the formula (cycle + 6) * 4096.

Suppose we want to find rewards for 10th cycle then the block in which the rewards would be available is (10 + 6)* 4096 = 65536 , BlockHash - BKnpxH7vFwG91XsBbixDadf8yBGBs9pk8tzGvdTE9HtdG2h76a

When i Query this particular block as below

http://xxxxx/chains/main/blocks/BKnpxH7vFwG91XsBbixDadf8yBGBs9pk8tzGvdTE9HtdG2h76a

I need to to look into "metadata" section for "balance_updates" in order to get the rewards but in "metadata" section i find one section called "deactivated" like below

"deactivated": [

        "tz1iYx2zSFkhP2WMpVKQiMNhHoU3auUXAxtt",
        "tz1hwLebmYJgbNtFXUbKJCQMAt16oprCuNaQ",
        "tz1hu1rvo2ehr3RjhptxTqVGZzhGVNjink1z",
        "tz1hjNbTne7k8JosQHavyw3ycwXLNYg6xha5"

]

  1. What is the "deactivated" section for.
  2. In "metadata" -> "balance_update" section there are some records like this

    "balance_updates":

    [

           {
            "kind": "contract",
            "contract": "tz1hThMBD8jQjFt78heuCnKxJnJtQo9Ao25X",
            "change": "-120000000"
        },
    
        {
            "kind": "freezer",
            "category": "deposits",
            "delegate": "tz1hThMBD8jQjFt78heuCnKxJnJtQo9Ao25X",
            "level": 15,
            "change": "120000000"
        },
        {
            "kind": "freezer",
            "category": "rewards",
            "delegate": "tz1hThMBD8jQjFt78heuCnKxJnJtQo9Ao25X",
            "level": 15,
            "change": "16000000"
        }
    

    ]

-The kind - contract in all the other records for this block is positive -The kind - freezer in all the records is negative -The kind - reward in all the records is negative

but for this particular record all are opposite can any one help to understand .

Thanks in Advance

1

Please only ask 1 question per post.

  1. Deactivated are bakers which have been deactivated due to no longer participating in the baking process. These accounts will have to re-register as bakers if they want to bake again.

  2. Cycle rewards are found in the last block of cycle; not the first. Blocks are numbered 0-4095 in each cycle. When you find this block, "balance_updates" contains all rewards for cycle - 5 and all unfrozen deposits from cycle - 5. If you look at the first block of a cycle, you'll see balance_updates which are the normal updates for the baker of that block.

Note that when looking at blocks pre-Babylon, you will see level in balance_updates. This was a bug and fixed in Babylon to correctly label as cycle

| improve this answer | |
  • yes you are correct the cycle rewards are found in the last block of the cycle but for cycle 1 the block rewards are not not available at the end of cycle 1 they will be available at (1+6) * 4096 =28,672 as per this tezos.stackexchange.com/questions/1125/…. Could you please validate – user3759202 Feb 26 at 1:59
  • 1
    Yes, correct. If you want to know the rewards for cycle X, look forward to the last block of cycle X+5. If you are looking at the last block of cycle Y, that will contain rewards from cycle Y-5 (which is what I said above). Yes, block 28672 is the last block of cycle 6 which contains the rewards for 6-5=C1 – utdrmac Feb 26 at 16:03
  • Thanks @utdrmac your answer helped me . I would like to know one small thing the rewards that are given in the last block of Cycle Y do they contain all kind of rewards like baker , endorsment , double_baking etc.. – user3759202 Feb 26 at 18:17
  • Yes. Take a look at block 759890. Look for this operation in the block and you'll see that it has its own balance_updates giving "reward" to the baker. – utdrmac Feb 26 at 20:03
  • I understand the double_baking reward but i wanted to ask does the double_baking reward , baker reward and endorsement reward are given at the same end block of the cycle ever time ? – user3759202 Feb 26 at 20:15

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.