比特帝国

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫描二维码登录本站

全部文章详情

YOYOW Block Producer Creation Tutorial and Common Commands

2019-06-13阅读 98 YOYOW 我要关注

The user identity of the block producer on the YOYOW blockchain is the witness. After the YOYOW Mainnet 2.0 was released, some commands of the block producer have changed. The new tutorial is for your reference.

New Tutorial

YOYOW


I. The Server Configuration:

Server configuration: The minimum configuration is recommended for 2 core CPUs with at least 4GB of RAM and 40GB hard drive.

This tutorial will take the Ubuntu 16.04 system as an example to introduce the process of creating and deploying a block producer.


II. The Software Installation: 

Go to https://github.com/yoyow-org/yoyow-core/releases and download the latest executable file released depending on your operating system or get the source code from https://github.com/yoyow-org/yoyow-core/ to compile. The following will demonstrate how to configure by downloading the executable file:

Download the file:

# wget https://github.com/yoyow-org/yoyow-core/releases/download/v2.0.0-190531/yoyow-v2.0.0-ubuntu16-20190531.tgz

Decompress:

# tar zxvf yoyow-v2.0.0-ubuntu16-20190531.tgz

 

After decompression, two files will be obtained under the yoyow-v2.0.0-ubuntu16-20190531 folder: yoyow_node and yoyow_client.

Yoyow_node is a node program that is responsible for synchronizing data on blockchains, broadcasting transactions, and packaging transactions to produce new blocks.

Yoyow_client is a client program, also called a wallet program, that manages private keys, generates transaction information, and signs. Yoyow_client needs to connect to yoyow_node to use it.

 

III. The Node Synchronization Block

The block producer needs to maintain at least one full node (the yoyow_node process that synchronizes all data). It is recommended to use screen on linux to prevent the process from exiting.

# cd yoyow-v2.0.0-ubuntu16-20190531

# ./yoyow_node --rpc-endpoint 127.0.0.1:8090


Seeing the "Got block" message means that the operation is successful and the data is being synchronized.

1585526ms th_a       application.cpp:522           handle_block         ] Got block: #10000 00002710f9480417d70a548a44a4ca3dbae10d17 time: 2017-09-06T18:30:09 latency: 55007776526 ms from: 28182/init10  irreversible: 9991 (-9)

 

Whether or not the latest block has been synchronized can be judged based on the time of the block in the print information and the delay (the blue part). If the latest block is synchronized, the latest block information will be output every 3 seconds.

 

IV. Configure the Wallet

After yoyow_node is synchronized to the latest block, you can run "./yoyow_client" directly, and the default will be connected to the local 8090 port.

If the synchronization is not completed temporarily, you can connect to the public node by specifying the -s parameter, such as:

# ./yoyow_client -s wss://api-bj.yoyow.org

 

1. Set the key

When the prompt is displayed as new, you need to set the wallet password first. For example, the password is yoyow-pass, as follows

new >>> set_password yoyow-pass

set_password yoyow-pass

null

locked >>>

 

After setting the password, unlock the wallet (enter the previously entered password), and the wallet displays Unlock>>> to operate the wallet.

locked >>> unlock yoyow-pass

unlock yoyow-pass

null

unlocked >>>

 

2. Register an account

Log in to the web wallet URL: https://wallet.yoyow.org/ and follow the prompts to register your yoyow account. After the account is registered, for example, the account number is 25638, you can use the command to view:

unlocked >>> get_account 25638

get_account 25638

{

 "uid": 25638,

 "name": "init",

 "owner": {

   "weight_threshold": 1,

   "account_auths": [],

"account_uid_auths": [],

 

3. Import the private key

The private key can be viewed in the web wallet at https://wallet.yoyow.org/#/settings/viewpurview, click on the "active key" to view the private key, enter the password, and copy the private key.

Import the private key through import_key, followed by two parameters, one is the yoyow account name, and the other is the private key (here is your YOYOW wallet active key).

unlocked >>> import_key 25638 5Hqwx3xXMYZ55Pko9nzw34234234nXHcGfNQjNEL23424w7Py

 

4. Test transfer

You can transfer your second yoyow account to test the transfer, for example, transfer 100 YOYO tokens from the account “25638” to the account “test”.

unlocked >>> transfer 25638 test 100 YOYO "" true

 

The command deducts points to pay fees by default. If the points are insufficient, you can collect the accumulated points in the web wallet. If you have not accumulated enough points, you need to use the transfer_new interface, add the false value to the penultimate parameter, and use the tippings to pay fees, and you can refer to: transfer_new.

You can check if the transfer is received through the web wallet.

 

V. Create a Block Producer

1. Generate a signing key

Prepare a block producer by generating a key with suggest_brain_key. Remember to save this key and public key and they will be used in the later operation.

unlocked >>> suggest_brain_key

suggest_brain_key

{

 "brain_priv_key": "NONCOME WOG LIGULE FARAWAY ADEVISMALOOSE SORCER",

 "wif_priv_key":"5A34DFDSFereGDGGERTRT87UJLKDFHGSHFFKDSFSDFHE4532624535G",

 "pub_key":"YYW4UOIUFDSfjoiw750alsjfoiujasdjflsajdfaiyuhoasifjdOISUJKfsdh"

}

 

Inside the YYW is the public key, the wif_priv_key private key is stored by itself, do not leak (red for the public key, blue for the private key)

 

2. Create a block producer

The key used by create_witness here is the pub_key generated in the previous step.

unlocked >>> create_witness 25638 YYW4UOIUFDSfjoiw750alsjfoiujasdjflsajdfaiyuhoasifjdOISUJKfsdh 10000 YOYO "https://yoyow.org" true true

 

Note: The parameters of create_witness are as follows

<owner_account>

account id

<block_signing_key>

block signing key of the block producer

<pledge_amount>

pledge amount, at least 10,000 YOYOs

<pledge_asset_symbol>

pledge token type, currently only YOYO

<url>

block producer profile url

<csaf_fee>

Whether to use the points to pay fees, true: deduct points to pay fees, false: use tippings to pay fees

<broadcast>

Whether to broadcast a transaction


At present, creating a block producer on the Mainnet requires a pledge of at least 10,000 YOYOs, and consumes 1000 YOYOs. The handling fees cannot be paid by points or tippings, and must be deducted from the balance, so please ensure that there are enough YOYOs in the balance.

 

3. Check the block producer

unlocked >>> get_witness 25638

 

4. update_witness Modify the super node mortgage amount (mortgage 10,000 yoyow coins, ensure that the wallet balance has at least 10,000 yoyow coins)

unlocked >>> update_witness 25638 null 10000 YOYO null true true

 

The update_witness parameter is the same as the create_witness parameter. If you don't want to modify a parameter, the parameter needs to be set to null.

The update_witness fee is the same as most operations. You can use the point deduction or the tippings to pay. If you have not accumulated enough points, you can set the second-to-last parameter to false and use the YOYOs in the tippings to pay fees.

 

5. Block producer voting

Vote for yourself

unlocked >>> update_witness_votes 25638 [25638] [] true true

 

 Vote for others (for example, 25638 to vote for 23456)

unlocked >>> update_witness_votes 25638 [23456] [] true true

 

6. Then use the get_witness command to see the number of votes ("total_votes"), and the number of pledge ("pledge")

 

7. Ctrl + C to exit the wallet command line

 

VI. Run the Block Producer Program

The third step is to synchronize the nodes. After synchronizing to the latest block, you can end the process by Ctrl+C and add the parameters of the block producer. It is important to note that Ctrl+C only needs to be pressed once and then waits for the exit.

Run the following command to bring the uid and the signing key of the block producer as parameters (here, the private key and the public key are the keys generated when the block producer is created)

# ./yoyow_node --rpc-endpoint -w 25638 --private-key

'["YYW4UOIUFDSfjoiw750alsjfoiujasdjflsajdfaiyuhoasifjdOISUJKfsdh","5A34DFDSFereGDGGERTRT87UJLKDFHGSHFFKDSFSDFHE4532624535G"]'

 

When the block is normally produced, a message similar to the following is displayed.

3249002ms th_a      witness.cpp:183              block_production_loo ] Generated block #192100000781196d14610bc781ce1880193d153c0200 with timestamp 2017-08-18T01:54:09 attime 2017-08-18T01:54:09 by 28182/init10

 

VII. Block Producer Adjusting Pledge, Getting Income

Restart the command line wallet, connect to the node, and perform other inspection tests.

1. Use the get_witness command to see the block information, such as

unlocked >>> get_witness 25638

get_witness 25638

{

...

"last_confirmed_block_num": 1975,

  …


If you see

"signing_key": "YYW1111111111111111111111111111111114T1Anm",

It indicates that the block producer is offline. You need to reset the block signing key with the update_witness command to produce blocks normally.

unlocked >>> update_witness 25638 YYW4UOIUFDSfjoiw750alsjfoiujasdjflsajdfaiyuhoasifjdOISUJKfsdh null null null true true

 

2. Use the get_full_account command to see more detailed account information, including block rewards, etc.

unlocked >>> get_full_account 25638

get_full_account 25638

{

...

"uncollected_witness_pay": 55500000,

The value divided by 100,000 is the actual YOYO amount, that is, the profit to be received is 555 YOYOs.


3. Receive a block reward / wage

Collect_witness_pay can receive the block producer block reward, the parameters are:

<account>

account id

<amount>

amount of wage received

<asset >

asset name, currently only YOYO

<csaf_fee>

Whether to use the point deduction to pay fees, true: deduct points to pay fees, false: use tippings to pay fees

<broadcast>

Whether to broadcast a transaction

 

For example, to receive the block producer reward (100 YOYOs) of account 25638:

unlocked >>> collect_witness_pay 25638 100 YOYO true true

 

 4. If you don't want to be a block producer, set offline first.

unlocked >>> update_witness 25638 YYW1111111111111111111111111111111114T1Anm null null null true true

 

Then change the deposit to 0 and return it after a certain period of time (if not deducted for malicious behaviors)

unlocked >>> update_witness 25638 null 0 YOYO null true true

 

VIII. Security Configuration

After the node is running normally, it is recommended to change the ssh port and change to the key login for node security.

 

A previous tutorial can also be referred to:

https://bitsharestalk.org/index.php/topic,24851.0.html

 

If you have any questions or other errors in the tutorial, please leave a message below the article, we will update the tutorial to everyone.




- 相关阅读 -

【解读YOYOW】如何参与YOYOW网络

项目进展 I YOYOW进展周报(2019/5/24-2019/6/10)

YOYOW主网2.0将于6月30日正式上线

YOYOW基金会正式发布YOYOW主网2.0源代码

YOYOW区块链浏览器全新版本上线

见证人解读

如何快速购买YOYOW教程

时艳强对话白菜:区块链只存在骗局,不存在泡沫

永远不会被刷的内容激励价值网路——YOYOW


YOYOW的价值是什么?

(向上滑动查看内容)



YOYOW的目标是构建一套基于区块链技术的内容价值网络。在区块链技术出现之前,社交媒体大公司多采用中心化的网络结构,把持着大量由用户贡献的流量红利。YOYOW则希望借助区块链技术的优势,让流量红利能够更加公平、合理的下沉到内容生产者、内容支持者、内容筛选者和生态建设者身上,实现去中心化的内容价值分配机制。

 

内容平台通过接入基于YOYOW的底层网络,由用户掌控统一的私钥,就可以实现跨站登陆内容平台,不依赖中心化的网站。用户的浏览、点赞、高价值内容创作所带来的流量将不会集中在大公司手上,而是通过YOYOW网络变现到参与者手上。YOYOW将公有链技术落地内容场景的努力,将为UGC行业带来改变。

 

自2017年3月项目启动至今的两年来,YOYOW经历了一系列的产品开发迭代:YOYOW钱包APP更新了多个版本,源代码也从部分开源逐步到完全开源。合作的伙伴也日渐壮大:从接入YOYOW网络的合作伙伴到竞选YOYOW主网2.0的超级节点,YOYOW的发展在成长中不断被行业和专业认可。


此次主网2.0的发布,为保证YOYOW全体用户的安全利益,YOYOW基金会团队在测试阶段以最严谨的态度,对主网网络的安全性和稳定性进行测试,排除了潜在问题。

最后,由衷感谢YOYOW社区用户一直以来的关注与支持!


更多YOYOW官方资讯平台


关注微博:@YOYOW区块链


Twitter: 

https://twitter.com/@infoYoyow



Telegram:

https://t.me/HelloYOYOW




相关平台跟踪最新动态:

Medium:https://medium.com/@dacnow/

Reddit:https://www.reddit.com/r/YOYOW/

Facebook: https://www.facebook.com/yo.yow.125/

Github:https://github.com/yoyow-org/

Steemit: https://steemit.com/@yo-yow


YOYOW官方信息:

官方网站:https://yoyow.org

网页钱包:https://wallet.yoyow.org

区块链浏览器:https://explorer.yoyow.org

区块链浏览器:https://explorer.yoyow.org

上一篇:YOYOW超级节点创建教程以及常用命令

下一篇:YOYOW基金会启动公开市场回购计划

分享到:

相关文章

帝国区交所
返回顶部