An EOS Smart Contract for Block Producer Information

in #eos5 years ago (edited)

There is a long road ahead of us on EOS with both developing and enforcing Block Producer standards. However, one improvement that many of us can agree on right now, is that it's time we all started putting our information on-chain, rather than only on our websites.

Currently, most Block Producers are following a standard "bp.json" format (see here), to explain extended information about their candidacy. For example, you can see ours here. However, with this information only being on a candidates website, we run the risk of issues such as public defacing, DNS changes, non-verifiability, and more.

The solution to these issues is simple: store this information on-chain, signed by the producer themselves. Doing so brings multiple new benefits as well: we can have dApps parse all block producer candidates' json files, we will have a verifiable history of changes, and finally we allow validators to have a single consistent place to look up all candidates' publicly posted information (rather than scraping individual websites).

In order to help facilitate the transition to storing this information on chain, we have created, purchased RAM for, and deployed a new smart contract producerjson that enables this. We now open it for peer review, feedback and suggestions, and if desired -- immediate use.

See The Contract

The contract code is open source here:

As you will see, the code itself is fairly simple -- it does not attempt to validate the contents of the producer's json at this time. This choice was made in order to allow external validators to be as strict or relaxed as they choose to be when grading a given producers information, as well as allow quick changes to the BP standard format without a contract update.

Try It Out

Pushing your bp.json file on chain is a simple two step process. Just grab your bp.json file, and push it to the blockchain with a cleos command like our example:

cleos push action producerjson set '{"owner":"teamgreymass", "json": "'`printf %q $(cat bp.json | tr -d "\r")`'"}' -p teamgreymass@active

Here's the result of that action, on the blockchain.

As you can see, your information will be published to the chain in the producerjson table right away. You can see yours and everyone else's information with one simple command:

cleos get table producerjson producerjson producerjson

It takes about 1.5 kB of RAM to store a bp.json, which is not expensive at all -- this is less than creating a new account. Due to it being so cheap and easy, we hope everyone will join us in putting their information on-chain, organized and verifiable for the public to see.

Future Contract Changes

If this standard takes off, we are happy to convert this contract account into a multi-sig account and allow shared control with other top Block Producers. This would slow down any required changes to the contract, but also ensure the longevity of it.

Any feedback is welcome, and we'd love to see any recommendations on how to modify the contract. Feel free to comment below, or contact us on telegram!

This project is an effort lead by Team Greymass, a Block Producer candidate for EOS. If you like what we're doing, don't forget to vote for teamgreymass on EOS!


This is huge. The EOS community has been waiting for something like this. Thank you for putting this together. Greymass rocks!

Yes, it is great work.. But validation has to be an independent process...

Hello you are keep changing this with high pace... And I understand that it takes time to mature... Security is a continuous improvement process. But are you involving all block producers or just few hands are involved in changing parameters and validation process... We are already too afraid to give lot of power to top 21 block producers ad we hope that their should be INDEPENDENT VALIDATION process.... and Future Contract Changes could be managed by INDEPENDENT VALIDATORS, NOT by top 21 BPs..

I fully support this initiative. We should store BP information on Blockchain instead of relying on off chain web sites.
My only feedback is to add JSON validation to smart contract (if possible) to make sure we are storing valid data on Blockchain.

@EOSTribe published it's bp.json on Blockchain as well!

This is EOSTribe... What exactly is not matching? I also have similer error:


Great job Greymass! This is a great approach to store Block Producer bp.json on chain. Looking forward to see more Block Producers host their bp.json on chain!

Thanks for that! We thought so too, and it seemed like a low hanging fruit we could try to knock out for the entire community. Hopefully we'll start seeing some user interfaces adopt it's usage :)

Are we just hosting bp.json on chain? Or how does it ensures the validity and correctness of data provided in bp.json?

A really good idea and it works perfectly, good job. I've added the @blockgenesys bp.json file to the table.

sweet initiative. tip of the hat from EOS Romania.
thanks to this eosromania22 bp.json is now on chain

This works especially well on mobile, one call to chain/get_producers and another call to getTableRows->producerjson and we have a filtered list of eligible block producers and their information.

Coin Marketplace

STEEM 0.17
TRX 0.09
JST 0.023
BTC 27413.51
ETH 1641.69
USDT 1.00
SBD 2.22