What is a bp.json?
The bp.json contains the most important pieces of information about the block producer and their nodes, such as API-Endpoints, geographical location, emergency contacts, and more. The standardized form of the bp.json makes it easy for companies and individuals to use the block producer’s nodes and information. Through this method sites such as (bloks.io) can e.g. get the profile picture for your guild. If you want to get a rough overview of how a bp.json looks, feel free to take a glance at our bp.json for the WAX Chain: https://blacklusion.com/wax.json
Creating the bp.json
Writing the bp.json is pretty straight forward, since how the name already suggest, it is just a plain old json. Start by opening you favourite text editor such as Sublime Text or Atom.
Next copy the template bp.json (https://github.com/eosrio/bp-info-standard/blob/master/bp.json) into your Texteditor of choice.
Every information you have to fill out should be pretty straight forward, however we will cover the most important anyways. If you need further information, have a look at the GitHub repo above and read some bp.json from other guilds:
Self-explanatory. However, if you are not familiar with the naming scheme in the EOSIO ecosystem: It is important to note, that you have to use the name that you also have used (or are planning to use) for the action “regproducer”. That means that your official guild name may differ from the guild name you use on-chain. For example, our official name is “Blacklusion”, but our producer is registered under the account “blacklusionx”, since EOSIO requires that you have a name with 12 letters or bid on a name.
This is the field, where you can fill in the official name of your guild. Spaces are allowed.
Social accounts: I think we don’t have to explain how to fill in your social information here. However, it is important that someone of your guild actually regularly checks these accounts since this is how someone may contact you in case of an emergency.
nodes (Getting to the interesting part)
- Node location:
How to get the coordinates of the nodes? The simplest way is to use Google Maps (https://www.google.com/maps). Just click with the mouse on to the map where you want to have the location of the node. A small popup should appear, containing two numbers. The first number is the latitude and the latter the longitude.
- Node type:
Pick producer, if you are listing a producer node. Pick seed if you are listing a p2p-node. Pick full if you are listing an API node. If you are hosting additional services such as a Hyperion history, there is no need to further specify nodes or URLs. The Hyperion history will be automatically be suspected behind the full node’s URL. All that is left to do, is to set up your server’s internal routes, to actually direct the history traffic to Hyperion.
Endpoints: Self-explanatory. However keep in mind that you may want to produce on multiple chains, therefore choosing domains such as “peer.blacklusion.io” is not suitable. Instead, use a domain containing the chain’s name. Such as “peer1.wax.blacklusion.io”. To get an idea, what domains to use, have a look at the endpoints of other block producers (https://validate.eosnation.io/wax/reports/endpoints.html).
Naming your bp.json not bp.json
Since many block producers are active on multiple chains (this is even the case when you are producing on both the Mainnet and Testnet of a chain), the bp.json is not actually named bp.json but after the chains name (different names for Testnet and Mainnet). So for the WAX Mainnet, this would be “wax.json” and for the Testnet “waxtest.json”.
Hosting your bp.json
Now, that we have written and named your bp.json. All that is left to do, is to host the JSON on your website. This has to be the same URL you have used (or are planning to use) for the “regproducer” action. So basically just your standard domain. Please don’t use something like “resources.blacklusion.com”, jut stick to e.g.“blacklusion.com”.
Just host the bp.json at the root of that domain. So for example “blacklusion.com/wax.json”. We at blacklusion own both the “.io” and “.com” domain ending. In case you have multiple domains for your guild, you can optionally host the bp.json on all domains to make the lives of peoples easier. However, this is technically not mandatory.
Important: You have to change your chains.json to contain the bp.json’s name the according chain-Id.
Updating your bp.json
This should go without saying, however, this can be easily forgotten. When changing anything about your servers’/nodes’ configuration or other information, you have to keep your bp.json up-to-date.
Pushing your bp.json on-chain
I have written a separate article about this, to don’t force people to scroll through a complete article if there just want to learn how to push it on-chain.