STEEM Internals #11: Dynamic Global Property ObjectsteemCreated with Sketch.

in #steem8 years ago


What is the global property object.

Global property object is an object that contains values of STEEM blockchain runtime state variables at any given time. The object contains values that may change and are set during STEEM blockchain operation. The object together with the values that it holds is accessible from outside of the STEEM via RPC (Remote Procedure Call) to STEEM daemons.

Dynamic nature of the object.

The DGPO is dynamic, because values that it keeps are calculated during normal blockchain operations. The values reflect the current property values of STEEM blockchain.

What exactly does DPGO contain.

The information stored in DPGO is quite low level but crucial to understand STEEM blockchain dynamics. I will try to describe most of available information one by one.

Head Block Number

This is the number of the most recent block in the blockchain. Currently around 5.2-5.3 million.

Head Block ID

ID of the head block. E.g. 004f9d4441ce837670050a10ee374d151d2d0ab2.

Blockchain time

STEEM Blockchain time happens to be GMT time: e.g. 2016-09-23T10:04:03.

Maximum block size

Maximum block size decided by witness nodes. A quote from the source code:

Maximum block size is decided by the set of active witnesses which change every round. Each witness posts what they think > the maximum size should be as part of their witness properties, the median size is chosen to be the maximum block size for the round.

When I checked last time it was set to 65536.

Current witness

Last witness that delivered a new block. E.g. 'roadscape', 'smooth.witness' etc.

Average block size

The average block size value is updated with every new block and it is averaged from last 100 blocks:

average_block_size = (99 * average_block_size + new_block_size) / 100

Number of POW witnesses

This number contains current number of witness nodes trying to find new blocks and provide Proof Of Work. Greater the number, greater the difficulty of doing Proof Of Work, because many nodes compete.

When I last checked, 106 witnesses were actively trying to provide Proof of Work.

Total reward fund STEEM

This is interesting for you who would like to know how many STEEM currently sits in the reward fund.

As of the time when I am writing the post it was 69192.226 STEEM to be divided.

Total reward shares squared

This is similar to the above but contains a total number of reward shares squared.

Total vesting fund STEEM

This is how many STEEM all accounts keep in the STEEM bank ;) in form of STEEM Power.
Currently '155 738 649.064 STEEM' (> 150 million STEEM).

Total vesting shares

Similar to the above but contains a number of Vesting Shares (Vests).

Vote regeneration per day

Vote regeneration per day variable says how fast your voting power will recover. Currently it is set to 40. See my previous post if you would like to learn more about it. The value was to be changed during last hardfork but the change was postponed.

How to access the properties from live system?

The easiest way to access STEEM dynamic properties is by using Piston tool. This is possible in 1..2..3... lines

>>> from piston.steem import Steem
>>> steem = Steem()
>>> pprint.pprint(steem.rpc.get_dynamic_global_properties())

gives current snapshot of the global properties object:

{'average_block_size': 652,
 'confidential_sbd_supply': '0.000 SBD',
 'confidential_supply': '0.000 STEEM',
 'current_aslot': 5263144,
 'current_reserve_ratio': 20000,
 'current_sbd_supply': '2276088.092 SBD',
 'current_supply': '164397007.494 STEEM',
 'current_witness': 'pharesim',
 'head_block_id': '004f9cbbd5aad0bf7093a5881bad5b4796bd5d31',
 'head_block_number': 5217467,
 'id': '2.0.0',
 'last_irreversible_block_num': 5217452,
 'max_virtual_bandwidth': '5986734968066277376',
 'maximum_block_size': 65536,
 'num_pow_witnesses': 107,
 'participation_count': 128,
 'recent_slots_filled': '340282366920938463463374607431768211455',
 'sbd_interest_rate': 1000,
 'sbd_print_rate': 7033,
 'time': '2016-09-23T09:57:12',
 'total_pow': 248600,
 'total_reward_fund_steem': '68918.620 STEEM',
 'total_reward_shares2': '741699764662137551156428418176',
 'total_vesting_fund_steem': '155713605.486 STEEM',
 'total_vesting_shares': '449532135732.081550 VESTS',
 'virtual_supply': '169302369.761 STEEM',
 'vote_regeneration_per_day': 40}

Next time I will try to describe printing of the STEEM Dollars and STEEM (SBD supply, Virtual supply, SBD print rate) and how it relates to STEEM Dollars interest rate, what is STEEM Dollars inflation and how it is calculated.

Have a nice weekend and don't forget to upvote the post if you liked it!


DISCLAIMER: THE INFORMATION IS DELIVERED FREE OF CHARGE AND 'AS IS' WITHOUT WARRANTY OF ANY KIND. I HOPE IT IS ACCURATE AND FREE OF ERRORS AND YOU FIND IT USEFUL.

Sort:  

Beatiful work man, i will be using this data to properly calculate steem power when displayed on STEEMSTARS. Keep up the good work man!

Coin Marketplace

STEEM 0.18
TRX 0.14
JST 0.030
BTC 58639.60
ETH 3167.30
USDT 1.00
SBD 2.43