VOTING POWER100.00%
DOWNVOTE POWER100.00%
RESOURCE CREDITS100.00%
REPUTATION PROGRESS2.64%
Net Worth
6.555USD
STEEM
36.270STEEM
SBD
0.803SBD
Own SP
77.393SP
Detailed Balance
| STEEM | ||
| balance | 36.270STEEM | STEEM |
| market_balance | 0.000STEEM | STEEM |
| savings_balance | 0.000STEEM | STEEM |
| reward_steem_balance | 0.000STEEM | STEEM |
| STEEM POWER | ||
| Own SP | 77.393SP | SP |
| Delegated Out | 0.000SP | SP |
| Delegation In | 0.000SP | SP |
| Effective Power | 77.393SP | SP |
| Reward SP (pending) | 0.000SP | SP |
| SBD | ||
| sbd_balance | 0.803SBD | SBD |
| sbd_conversions | 0.000SBD | SBD |
| sbd_market_balance | 0.000SBD | SBD |
| savings_sbd_balance | 0.000SBD | SBD |
| reward_sbd_balance | 0.000SBD | SBD |
{
"balance": "36.270 STEEM",
"savings_balance": "0.000 STEEM",
"reward_steem_balance": "0.000 STEEM",
"vesting_shares": "126025.635732 VESTS",
"delegated_vesting_shares": "0.000000 VESTS",
"received_vesting_shares": "0.000000 VESTS",
"sbd_balance": "0.803 SBD",
"savings_sbd_balance": "0.000 SBD",
"reward_sbd_balance": "0.000 SBD",
"conversions": []
}Account Info
| name | ankar |
| id | 131886 |
| rank | 20,540 |
| reputation | 130030985850 |
| created | 2017-02-10T06:35:33 |
| recovery_account | steem |
| proxy | None |
| post_count | 16 |
| comment_count | 0 |
| lifetime_vote_count | 0 |
| witnesses_voted_for | 0 |
| last_post | 2018-01-26T10:45:54 |
| last_root_post | 2018-01-26T10:45:54 |
| last_vote_time | 2018-01-26T10:45:54 |
| proxied_vsf_votes | 0, 0, 0, 0 |
| can_vote | 1 |
| voting_power | 9,800 |
| delayed_votes | 0 |
| balance | 36.270 STEEM |
| savings_balance | 0.000 STEEM |
| sbd_balance | 0.803 SBD |
| savings_sbd_balance | 0.000 SBD |
| vesting_shares | 126025.635732 VESTS |
| delegated_vesting_shares | 0.000000 VESTS |
| received_vesting_shares | 0.000000 VESTS |
| reward_vesting_balance | 0.000000 VESTS |
| vesting_balance | 0.000 STEEM |
| vesting_withdraw_rate | 0.000000 VESTS |
| next_vesting_withdrawal | 1969-12-31T23:59:59 |
| withdrawn | 0 |
| to_withdraw | 0 |
| withdraw_routes | 0 |
| savings_withdraw_requests | 0 |
| last_account_recovery | 1970-01-01T00:00:00 |
| reset_account | null |
| last_owner_update | 1970-01-01T00:00:00 |
| last_account_update | 2018-01-02T08:35:27 |
| mined | No |
| sbd_seconds | 0 |
| sbd_last_interest_payment | 2018-03-01T08:51:51 |
| savings_sbd_last_interest_payment | 1970-01-01T00:00:00 |
{
"id": 131886,
"name": "ankar",
"owner": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"STM67peFvhJTUKFv26sQ5bAM2vqhF1sCAd1vXfAudkEy32TZvzMzh",
1
]
]
},
"active": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"STM78P9YGUT2Hi8xZd3Qo7UqpUJHsbqVWTJ7qPyQT5e2bC5m3CXT6",
1
]
]
},
"posting": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"STM8GpX5u9ZLpHSqNXk2LCV7YDcnyaMJkWEraUurU9tHdmeEq5GQR",
1
]
]
},
"memo_key": "STM5XEXcd4jih5gqUj98tcK5AfKjmFbMjytVMRVy7wdB1t2Q7x7ft",
"json_metadata": "{\"profile\":{\"profile_image\":\"https://i.imgur.com/aI2eaY6.jpg\",\"name\":\"Anderson\"}}",
"posting_json_metadata": "{\"profile\":{\"profile_image\":\"https://i.imgur.com/aI2eaY6.jpg\",\"name\":\"Anderson\"}}",
"proxy": "",
"last_owner_update": "1970-01-01T00:00:00",
"last_account_update": "2018-01-02T08:35:27",
"created": "2017-02-10T06:35:33",
"mined": false,
"recovery_account": "steem",
"last_account_recovery": "1970-01-01T00:00:00",
"reset_account": "null",
"comment_count": 0,
"lifetime_vote_count": 0,
"post_count": 16,
"can_vote": true,
"voting_manabar": {
"current_mana": 9800,
"last_update_time": 1516963554
},
"downvote_manabar": {
"current_mana": 0,
"last_update_time": 1486708533
},
"voting_power": 9800,
"balance": "36.270 STEEM",
"savings_balance": "0.000 STEEM",
"sbd_balance": "0.803 SBD",
"sbd_seconds": "0",
"sbd_seconds_last_update": "2018-03-01T08:51:51",
"sbd_last_interest_payment": "2018-03-01T08:51:51",
"savings_sbd_balance": "0.000 SBD",
"savings_sbd_seconds": "0",
"savings_sbd_seconds_last_update": "1970-01-01T00:00:00",
"savings_sbd_last_interest_payment": "1970-01-01T00:00:00",
"savings_withdraw_requests": 0,
"reward_sbd_balance": "0.000 SBD",
"reward_steem_balance": "0.000 STEEM",
"reward_vesting_balance": "0.000000 VESTS",
"reward_vesting_steem": "0.000 STEEM",
"vesting_shares": "126025.635732 VESTS",
"delegated_vesting_shares": "0.000000 VESTS",
"received_vesting_shares": "0.000000 VESTS",
"vesting_withdraw_rate": "0.000000 VESTS",
"next_vesting_withdrawal": "1969-12-31T23:59:59",
"withdrawn": 0,
"to_withdraw": 0,
"withdraw_routes": 0,
"curation_rewards": 1,
"posting_rewards": 49030,
"proxied_vsf_votes": [
0,
0,
0,
0
],
"witnesses_voted_for": 0,
"last_post": "2018-01-26T10:45:54",
"last_root_post": "2018-01-26T10:45:54",
"last_vote_time": "2018-01-26T10:45:54",
"post_bandwidth": 10000,
"pending_claimed_accounts": 0,
"vesting_balance": "0.000 STEEM",
"reputation": "130030985850",
"transfer_history": [],
"market_history": [],
"post_history": [],
"vote_history": [],
"other_history": [],
"witness_votes": [],
"tags_usage": [],
"guest_bloggers": [],
"rank": 20540
}Withdraw Routes
| Incoming | Outgoing |
|---|---|
Empty | Empty |
{
"incoming": [],
"outgoing": []
}From Date
To Date
2020/02/10 07:13:51
2020/02/10 07:13:51
| parent author | ankar |
| parent permlink | ethereum-infura-web3-js |
| author | steemitboard |
| permlink | steemitboard-notify-ankar-20200210t071351000z |
| title | |
| body | Congratulations @ankar! You received a personal award! <table><tr><td>https://steemitimages.com/70x70/http://steemitboard.com/@ankar/birthday3.png</td><td>Happy Birthday! - You are on the Steem blockchain for 3 years!</td></tr></table> <sub>_You can view [your badges on your Steem Board](https://steemitboard.com/@ankar) and compare to others on the [Steem Ranking](https://steemitboard.com/ranking/index.php?name=ankar)_</sub> ###### [Vote for @Steemitboard as a witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1) to get one more award and increased upvotes! |
| json metadata | {"image":["https://steemitboard.com/img/notify.png"]} |
| Transaction Info | Block #40690683/Trx a9a3ac68665a8497e304de379bdab68617737fa4 |
View Raw JSON Data
{
"trx_id": "a9a3ac68665a8497e304de379bdab68617737fa4",
"block": 40690683,
"trx_in_block": 10,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2020-02-10T07:13:51",
"op": [
"comment",
{
"parent_author": "ankar",
"parent_permlink": "ethereum-infura-web3-js",
"author": "steemitboard",
"permlink": "steemitboard-notify-ankar-20200210t071351000z",
"title": "",
"body": "Congratulations @ankar! You received a personal award!\n\n<table><tr><td>https://steemitimages.com/70x70/http://steemitboard.com/@ankar/birthday3.png</td><td>Happy Birthday! - You are on the Steem blockchain for 3 years!</td></tr></table>\n\n<sub>_You can view [your badges on your Steem Board](https://steemitboard.com/@ankar) and compare to others on the [Steem Ranking](https://steemitboard.com/ranking/index.php?name=ankar)_</sub>\n\n\n###### [Vote for @Steemitboard as a witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1) to get one more award and increased upvotes!",
"json_metadata": "{\"image\":[\"https://steemitboard.com/img/notify.png\"]}"
}
]
}2019/02/10 07:48:18
2019/02/10 07:48:18
| parent author | ankar |
| parent permlink | ethereum-infura-web3-js |
| author | steemitboard |
| permlink | steemitboard-notify-ankar-20190210t074817000z |
| title | |
| body | Congratulations @ankar! You received a personal award! <table><tr><td>https://steemitimages.com/70x70/http://steemitboard.com/@ankar/birthday2.png</td><td>Happy Birthday! - You are on the Steem blockchain for 2 years!</td></tr></table> <sub>_[Click here to view your Board](https://steemitboard.com/@ankar)_</sub> > Support [SteemitBoard's project](https://steemit.com/@steemitboard)! **[Vote for its witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1)** and **get one more award**! |
| json metadata | {"image":["https://steemitboard.com/img/notify.png"]} |
| Transaction Info | Block #30219426/Trx 80596335e1878f0bd097d779cb939045c3d3829c |
View Raw JSON Data
{
"trx_id": "80596335e1878f0bd097d779cb939045c3d3829c",
"block": 30219426,
"trx_in_block": 2,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2019-02-10T07:48:18",
"op": [
"comment",
{
"parent_author": "ankar",
"parent_permlink": "ethereum-infura-web3-js",
"author": "steemitboard",
"permlink": "steemitboard-notify-ankar-20190210t074817000z",
"title": "",
"body": "Congratulations @ankar! You received a personal award!\n\n<table><tr><td>https://steemitimages.com/70x70/http://steemitboard.com/@ankar/birthday2.png</td><td>Happy Birthday! - You are on the Steem blockchain for 2 years!</td></tr></table>\n\n<sub>_[Click here to view your Board](https://steemitboard.com/@ankar)_</sub>\n\n\n> Support [SteemitBoard's project](https://steemit.com/@steemitboard)! **[Vote for its witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1)** and **get one more award**!",
"json_metadata": "{\"image\":[\"https://steemitboard.com/img/notify.png\"]}"
}
]
}2018/04/15 09:41:36
2018/04/15 09:41:36
| parent author | ankar |
| parent permlink | ethereum-remix |
| author | jimi2018 |
| permlink | re-ankar-ethereum-remix-20180415t094410128z |
| title | |
| body | 区块链开发、以太坊开发的技术资料资源汇总 一个适合区块链新手的以太坊DApp开发教程: http://xc.hubwiz.com/course/5a952991adb3847553d205d1?affid=20180415steemit 一个用区块链、星际文件系统(IPFS)、Node.js和MongoDB来构建电商平台: http://xc.hubwiz.com/course/5abbb7acc02e6b6a59171dd6/?affid=20180415steemit |
| json metadata | {"tags":["cn"],"links":["http://xc.hubwiz.com/course/5a952991adb3847553d205d1?affid=20180415steemit","http://xc.hubwiz.com/course/5abbb7acc02e6b6a59171dd6/?affid=20180415steemit"],"app":"steemit/0.1"} |
| Transaction Info | Block #21585149/Trx c2b65960f594c48ed86cceb4e0f6bc00fd845a8d |
View Raw JSON Data
{
"trx_id": "c2b65960f594c48ed86cceb4e0f6bc00fd845a8d",
"block": 21585149,
"trx_in_block": 27,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-04-15T09:41:36",
"op": [
"comment",
{
"parent_author": "ankar",
"parent_permlink": "ethereum-remix",
"author": "jimi2018",
"permlink": "re-ankar-ethereum-remix-20180415t094410128z",
"title": "",
"body": "区块链开发、以太坊开发的技术资料资源汇总\n\n一个适合区块链新手的以太坊DApp开发教程:\nhttp://xc.hubwiz.com/course/5a952991adb3847553d205d1?affid=20180415steemit\n\n一个用区块链、星际文件系统(IPFS)、Node.js和MongoDB来构建电商平台:\nhttp://xc.hubwiz.com/course/5abbb7acc02e6b6a59171dd6/?affid=20180415steemit",
"json_metadata": "{\"tags\":[\"cn\"],\"links\":[\"http://xc.hubwiz.com/course/5a952991adb3847553d205d1?affid=20180415steemit\",\"http://xc.hubwiz.com/course/5abbb7acc02e6b6a59171dd6/?affid=20180415steemit\"],\"app\":\"steemit/0.1\"}"
}
]
}2018/04/13 09:49:21
2018/04/13 09:49:21
| parent author | ankar |
| parent permlink | ethereum-infura-web3-js |
| author | pupujiang |
| permlink | re-ankar-ethereum-infura-web3-js-20180413t094922090z |
| title | |
| body | 6666.......主要是為了更新合約嗎? |
| json metadata | {"tags":["cn"],"app":"steemit/0.1"} |
| Transaction Info | Block #21527718/Trx d255e8b89ff382ff84e45a18d4776e94b9f74f32 |
View Raw JSON Data
{
"trx_id": "d255e8b89ff382ff84e45a18d4776e94b9f74f32",
"block": 21527718,
"trx_in_block": 47,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-04-13T09:49:21",
"op": [
"comment",
{
"parent_author": "ankar",
"parent_permlink": "ethereum-infura-web3-js",
"author": "pupujiang",
"permlink": "re-ankar-ethereum-infura-web3-js-20180413t094922090z",
"title": "",
"body": "6666.......主要是為了更新合約嗎?",
"json_metadata": "{\"tags\":[\"cn\"],\"app\":\"steemit/0.1\"}"
}
]
}pupujiangupvoted (100.00%) @ankar / ethereum-infura-web3-js2018/04/13 09:48:57
pupujiangupvoted (100.00%) @ankar / ethereum-infura-web3-js
2018/04/13 09:48:57
| voter | pupujiang |
| author | ankar |
| permlink | ethereum-infura-web3-js |
| weight | 10000 (100.00%) |
| Transaction Info | Block #21527710/Trx 85c39d9865ce870fd4dc0eb044ea99804bebd36d |
View Raw JSON Data
{
"trx_id": "85c39d9865ce870fd4dc0eb044ea99804bebd36d",
"block": 21527710,
"trx_in_block": 62,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-04-13T09:48:57",
"op": [
"vote",
{
"voter": "pupujiang",
"author": "ankar",
"permlink": "ethereum-infura-web3-js",
"weight": 10000
}
]
}2018/03/22 04:48:00
2018/03/22 04:48:00
| required auths | [] |
| required posting auths | ["ankar"] |
| id | follow |
| json | ["follow",{"follower":"ankar","following":"gaoduzhu","what":["blog"]}] |
| Transaction Info | Block #20888568/Trx 4baa459680a7eb68d614873f3095312195417850 |
View Raw JSON Data
{
"trx_id": "4baa459680a7eb68d614873f3095312195417850",
"block": 20888568,
"trx_in_block": 36,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-03-22T04:48:00",
"op": [
"custom_json",
{
"required_auths": [],
"required_posting_auths": [
"ankar"
],
"id": "follow",
"json": "[\"follow\",{\"follower\":\"ankar\",\"following\":\"gaoduzhu\",\"what\":[\"blog\"]}]"
}
]
}2018/03/20 04:40:51
2018/03/20 04:40:51
| voter | ankar |
| author | gaoduzhu |
| permlink | status |
| weight | 10000 (100.00%) |
| Transaction Info | Block #20831297/Trx 380a838e6c74d303bc8cc2f6b9d932f08948b71c |
View Raw JSON Data
{
"trx_id": "380a838e6c74d303bc8cc2f6b9d932f08948b71c",
"block": 20831297,
"trx_in_block": 24,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-03-20T04:40:51",
"op": [
"vote",
{
"voter": "ankar",
"author": "gaoduzhu",
"permlink": "status",
"weight": 10000
}
]
}ankarclaimed reward balance: 0.055 SBD, 0.016 SP2018/03/01 08:51:51
ankarclaimed reward balance: 0.055 SBD, 0.016 SP
2018/03/01 08:51:51
| account | ankar |
| reward steem | 0.000 STEEM |
| reward sbd | 0.055 SBD |
| reward vests | 26.601435 VESTS |
| Transaction Info | Block #20289657/Trx 39a000f09f980986f350f583562947eb37f2eaa5 |
View Raw JSON Data
{
"trx_id": "39a000f09f980986f350f583562947eb37f2eaa5",
"block": 20289657,
"trx_in_block": 9,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-03-01T08:51:51",
"op": [
"claim_reward_balance",
{
"account": "ankar",
"reward_steem": "0.000 STEEM",
"reward_sbd": "0.055 SBD",
"reward_vests": "26.601435 VESTS"
}
]
}2018/02/18 22:33:42
2018/02/18 22:33:42
| parent author | ankar |
| parent permlink | buy-steem-with-bitcoin-on-steemit-com-step-by-step |
| author | g0t4y |
| permlink | re-ankar-buy-steem-with-bitcoin-on-steemit-com-step-by-step-20180218t223338882z |
| title | |
| body | Thanks need to know this. |
| json metadata | {"tags":["steem"],"app":"steemit/0.1"} |
| Transaction Info | Block #19989537/Trx 2b5a02e3c36917fbec6a0cefcc158bcdc3f2e40e |
View Raw JSON Data
{
"trx_id": "2b5a02e3c36917fbec6a0cefcc158bcdc3f2e40e",
"block": 19989537,
"trx_in_block": 63,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-18T22:33:42",
"op": [
"comment",
{
"parent_author": "ankar",
"parent_permlink": "buy-steem-with-bitcoin-on-steemit-com-step-by-step",
"author": "g0t4y",
"permlink": "re-ankar-buy-steem-with-bitcoin-on-steemit-com-step-by-step-20180218t223338882z",
"title": "",
"body": "Thanks need to know this.",
"json_metadata": "{\"tags\":[\"steem\"],\"app\":\"steemit/0.1\"}"
}
]
}2018/02/10 07:11:21
2018/02/10 07:11:21
| parent author | ankar |
| parent permlink | ethereum-infura-web3-js |
| author | steemitboard |
| permlink | steemitboard-notify-ankar-20180210t071120000z |
| title | |
| body | Congratulations @ankar! You have received a personal award! [](http://steemitboard.com/@ankar) 1 Year on Steemit Click on the badge to view your own Board of Honor on SteemitBoard. > By upvoting this notification, you can help all Steemit users. Learn how [here](https://steemit.com/steemitboard/@steemitboard/http-i-cubeupload-com-7ciqeo-png)! |
| json metadata | {"image":["https://steemitboard.com/img/notifications.png"]} |
| Transaction Info | Block #19740878/Trx 5a2f30e630a67dc7878bf4f70128d02dec3bf032 |
View Raw JSON Data
{
"trx_id": "5a2f30e630a67dc7878bf4f70128d02dec3bf032",
"block": 19740878,
"trx_in_block": 13,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-10T07:11:21",
"op": [
"comment",
{
"parent_author": "ankar",
"parent_permlink": "ethereum-infura-web3-js",
"author": "steemitboard",
"permlink": "steemitboard-notify-ankar-20180210t071120000z",
"title": "",
"body": "Congratulations @ankar! You have received a personal award!\n\n[](http://steemitboard.com/@ankar) 1 Year on Steemit\nClick on the badge to view your own Board of Honor on SteemitBoard.\n\n> By upvoting this notification, you can help all Steemit users. Learn how [here](https://steemit.com/steemitboard/@steemitboard/http-i-cubeupload-com-7ciqeo-png)!",
"json_metadata": "{\"image\":[\"https://steemitboard.com/img/notifications.png\"]}"
}
]
}2018/02/05 07:36:42
2018/02/05 07:36:42
| voter | ankar |
| author | dan |
| permlink | eos-io-developer-update-support-for-apple-s-secure-enclave-and-similar-technologies |
| weight | 10000 (100.00%) |
| Transaction Info | Block #19597683/Trx 334372c89f60019bbff5db68a21c57989dba118d |
View Raw JSON Data
{
"trx_id": "334372c89f60019bbff5db68a21c57989dba118d",
"block": 19597683,
"trx_in_block": 22,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-02-05T07:36:42",
"op": [
"vote",
{
"voter": "ankar",
"author": "dan",
"permlink": "eos-io-developer-update-support-for-apple-s-secure-enclave-and-similar-technologies",
"weight": 10000
}
]
}ankarreceived 0.014 SBD, 0.005 SP author reward for @ankar / ethereum-infura-web3-js2018/02/02 10:45:54
ankarreceived 0.014 SBD, 0.005 SP author reward for @ankar / ethereum-infura-web3-js
2018/02/02 10:45:54
| author | ankar |
| permlink | ethereum-infura-web3-js |
| sbd payout | 0.014 SBD |
| steem payout | 0.000 STEEM |
| vesting payout | 8.183509 VESTS |
| Transaction Info | Block #19515231/Virtual Operation #18 |
View Raw JSON Data
{
"trx_id": "0000000000000000000000000000000000000000",
"block": 19515231,
"trx_in_block": 4294967295,
"op_in_trx": 0,
"virtual_op": 18,
"timestamp": "2018-02-02T10:45:54",
"op": [
"author_reward",
{
"author": "ankar",
"permlink": "ethereum-infura-web3-js",
"sbd_payout": "0.014 SBD",
"steem_payout": "0.000 STEEM",
"vesting_payout": "8.183509 VESTS"
}
]
}ankarreceived 0.028 SBD, 0.006 SP author reward for @ankar / decentraland2018/01/31 02:47:42
ankarreceived 0.028 SBD, 0.006 SP author reward for @ankar / decentraland
2018/01/31 02:47:42
| author | ankar |
| permlink | decentraland |
| sbd payout | 0.028 SBD |
| steem payout | 0.000 STEEM |
| vesting payout | 10.230617 VESTS |
| Transaction Info | Block #19448157/Virtual Operation #5 |
View Raw JSON Data
{
"trx_id": "0000000000000000000000000000000000000000",
"block": 19448157,
"trx_in_block": 4294967295,
"op_in_trx": 0,
"virtual_op": 5,
"timestamp": "2018-01-31T02:47:42",
"op": [
"author_reward",
{
"author": "ankar",
"permlink": "decentraland",
"sbd_payout": "0.028 SBD",
"steem_payout": "0.000 STEEM",
"vesting_payout": "10.230617 VESTS"
}
]
}ankarpublished a new post: ethereum-infura-web3-js2018/01/29 03:57:42
ankarpublished a new post: ethereum-infura-web3-js
2018/01/29 03:57:42
| parent author | |
| parent permlink | cn |
| author | ankar |
| permlink | ethereum-infura-web3-js |
| title | 【Ethereum 智能合約開發筆記】不用自己跑節點,使用 Infura 和 web3.js 呼叫合約 |
| body | @@ -5311,103 +5311,16 @@ dTx. -function function function toString() %7B %5Bnative code%5D %7D() %7B %5Bnative code%5D %7D() %7B %5Bnative code%5D %7D +toString ('he @@ -5462,16 +5462,29 @@ %7D);%0A%0A +#### Result%0A%0A %E6%88%90%E5%8A%9F%E5%B0%B1%E6%9C%83%E5%9B%9E%E5%82%B3%E4%B8%80%E5%80%8B |
| json metadata | {"tags":["cn","blockchain","ethereum","infura","web3"],"image":["https://i.imgur.com/doEO8gu.jpg","https://i.imgur.com/yz9kOFo.png","https://i.imgur.com/vVx5L4A.png","https://i.imgur.com/YRtWIGr.png","https://i.imgur.com/RdDK54y.png"],"links":["https://infura.io/signup","https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sendtransaction","https://github.com/ethereum/wiki/wiki/JavaScript-API#web3versionapi","https://medium.com/taipei-ethereum-meetup/%E4%BD%BF%E7%94%A8ethereum-browser%E8%A8%88%E7%AE%97gas-cost-9122950a04f7","https://medium.com/@twedusuck/%E5%9C%A8%E5%8D%80%E5%A1%8A%E9%8F%88%E4%B8%8A%E5%BB%BA%E7%AB%8B%E5%8F%AF%E6%9B%B4%E6%96%B0%E7%9A%84%E6%99%BA%E6%85%A7%E5%90%88%E7%B4%84-cbe015bdb339","https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_gettransactioncount","https://github.com/ethereum/wiki/wiki/JavaScript-API"],"app":"steemit/0.1","format":"markdown"} |
| Transaction Info | Block #19392015/Trx 208b8ba0e64e787f156288bf76ed99fc0704741e |
View Raw JSON Data
{
"trx_id": "208b8ba0e64e787f156288bf76ed99fc0704741e",
"block": 19392015,
"trx_in_block": 12,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-29T03:57:42",
"op": [
"comment",
{
"parent_author": "",
"parent_permlink": "cn",
"author": "ankar",
"permlink": "ethereum-infura-web3-js",
"title": "【Ethereum 智能合約開發筆記】不用自己跑節點,使用 Infura 和 web3.js 呼叫合約",
"body": "@@ -5311,103 +5311,16 @@\n dTx.\n-function function function toString() %7B %5Bnative code%5D %7D() %7B %5Bnative code%5D %7D() %7B %5Bnative code%5D %7D\n+toString\n ('he\n@@ -5462,16 +5462,29 @@\n %7D);%0A%0A\n+#### Result%0A%0A\n %E6%88%90%E5%8A%9F%E5%B0%B1%E6%9C%83%E5%9B%9E%E5%82%B3%E4%B8%80%E5%80%8B\n",
"json_metadata": "{\"tags\":[\"cn\",\"blockchain\",\"ethereum\",\"infura\",\"web3\"],\"image\":[\"https://i.imgur.com/doEO8gu.jpg\",\"https://i.imgur.com/yz9kOFo.png\",\"https://i.imgur.com/vVx5L4A.png\",\"https://i.imgur.com/YRtWIGr.png\",\"https://i.imgur.com/RdDK54y.png\"],\"links\":[\"https://infura.io/signup\",\"https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sendtransaction\",\"https://github.com/ethereum/wiki/wiki/JavaScript-API#web3versionapi\",\"https://medium.com/taipei-ethereum-meetup/%E4%BD%BF%E7%94%A8ethereum-browser%E8%A8%88%E7%AE%97gas-cost-9122950a04f7\",\"https://medium.com/@twedusuck/%E5%9C%A8%E5%8D%80%E5%A1%8A%E9%8F%88%E4%B8%8A%E5%BB%BA%E7%AB%8B%E5%8F%AF%E6%9B%B4%E6%96%B0%E7%9A%84%E6%99%BA%E6%85%A7%E5%90%88%E7%B4%84-cbe015bdb339\",\"https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_gettransactioncount\",\"https://github.com/ethereum/wiki/wiki/JavaScript-API\"],\"app\":\"steemit/0.1\",\"format\":\"markdown\"}"
}
]
}coin.infoupvoted (6.94%) @ankar / ethereum-infura-web3-js2018/01/26 12:15:45
coin.infoupvoted (6.94%) @ankar / ethereum-infura-web3-js
2018/01/26 12:15:45
| voter | coin.info |
| author | ankar |
| permlink | ethereum-infura-web3-js |
| weight | 694 (6.94%) |
| Transaction Info | Block #19315620/Trx 01e86d56e60ac8893e8d4152767ec63f3ce2e938 |
View Raw JSON Data
{
"trx_id": "01e86d56e60ac8893e8d4152767ec63f3ce2e938",
"block": 19315620,
"trx_in_block": 26,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-26T12:15:45",
"op": [
"vote",
{
"voter": "coin.info",
"author": "ankar",
"permlink": "ethereum-infura-web3-js",
"weight": 694
}
]
}2018/01/26 12:15:42
2018/01/26 12:15:42
| parent author | ankar |
| parent permlink | ethereum-infura-web3-js |
| author | coin.info |
| permlink | re-ankar-ethereum-infura-web3-js-20180126t121542019z |
| title | |
| body | **Coins mentioned in post:** Coin | | Price (USD) | 📉 24h | 📈 7d - | - | - | - | - **AE** | Aeternity | 2.179$ | _4.49%_ | _41.71%_ **EOS** | EOS | 13.420$ | _-4.43%_ | _21.64%_ **ETH** | Ethereum | 1014.840$ | _-4.38%_ | _-4.61%_ **ZRX** | 0x | 1.567$ | _-3.62%_ | _-11.2%_ |
| json metadata | {"app":"coininfo/1.0.0","format":"markdown"} |
| Transaction Info | Block #19315619/Trx a2add390a8944f97c427e398f7809afe69e58bf4 |
View Raw JSON Data
{
"trx_id": "a2add390a8944f97c427e398f7809afe69e58bf4",
"block": 19315619,
"trx_in_block": 12,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-26T12:15:42",
"op": [
"comment",
{
"parent_author": "ankar",
"parent_permlink": "ethereum-infura-web3-js",
"author": "coin.info",
"permlink": "re-ankar-ethereum-infura-web3-js-20180126t121542019z",
"title": "",
"body": "**Coins mentioned in post:**\n\nCoin | | Price (USD) | 📉 24h | 📈 7d\n- | - | - | - | -\n**AE** | Aeternity | 2.179$ | _4.49%_ | _41.71%_\n**EOS** | EOS | 13.420$ | _-4.43%_ | _21.64%_\n**ETH** | Ethereum | 1014.840$ | _-4.38%_ | _-4.61%_\n**ZRX** | 0x | 1.567$ | _-3.62%_ | _-11.2%_",
"json_metadata": "{\"app\":\"coininfo/1.0.0\",\"format\":\"markdown\"}"
}
]
}xiaoshancunupvoted (100.00%) @ankar / ethereum-infura-web3-js2018/01/26 11:52:24
xiaoshancunupvoted (100.00%) @ankar / ethereum-infura-web3-js
2018/01/26 11:52:24
| voter | xiaoshancun |
| author | ankar |
| permlink | ethereum-infura-web3-js |
| weight | 10000 (100.00%) |
| Transaction Info | Block #19315154/Trx cb184b9711216eafea6033afd3197548687b5199 |
View Raw JSON Data
{
"trx_id": "cb184b9711216eafea6033afd3197548687b5199",
"block": 19315154,
"trx_in_block": 30,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-26T11:52:24",
"op": [
"vote",
{
"voter": "xiaoshancun",
"author": "ankar",
"permlink": "ethereum-infura-web3-js",
"weight": 10000
}
]
}ankarupvoted (100.00%) @ankar / ethereum-remix2018/01/26 10:46:54
ankarupvoted (100.00%) @ankar / ethereum-remix
2018/01/26 10:46:54
| voter | ankar |
| author | ankar |
| permlink | ethereum-remix |
| weight | 10000 (100.00%) |
| Transaction Info | Block #19313847/Trx b6fbc0866a5c69cd00d4944362997d47433b3418 |
View Raw JSON Data
{
"trx_id": "b6fbc0866a5c69cd00d4944362997d47433b3418",
"block": 19313847,
"trx_in_block": 41,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-26T10:46:54",
"op": [
"vote",
{
"voter": "ankar",
"author": "ankar",
"permlink": "ethereum-remix",
"weight": 10000
}
]
}cn-naughty.boyreplied to @ankar / 20180126t104551219z-post2018/01/26 10:46:18
cn-naughty.boyreplied to @ankar / 20180126t104551219z-post
2018/01/26 10:46:18
| parent author | ankar |
| parent permlink | ethereum-infura-web3-js |
| author | cn-naughty.boy |
| permlink | 20180126t104551219z-post |
| title | |
| body | @ankar, 帅呆了! |
| json metadata | {"tags":["cn"]} |
| Transaction Info | Block #19313835/Trx dba5bbc1aeec1b5c2dc782b0b2fef5b3dc69e7d4 |
View Raw JSON Data
{
"trx_id": "dba5bbc1aeec1b5c2dc782b0b2fef5b3dc69e7d4",
"block": 19313835,
"trx_in_block": 38,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-26T10:46:18",
"op": [
"comment",
{
"parent_author": "ankar",
"parent_permlink": "ethereum-infura-web3-js",
"author": "cn-naughty.boy",
"permlink": "20180126t104551219z-post",
"title": "",
"body": "@ankar, 帅呆了!",
"json_metadata": "{\"tags\":[\"cn\"]}"
}
]
}cn-naughty.boyupvoted (5.79%) @ankar / ethereum-infura-web3-js2018/01/26 10:46:15
cn-naughty.boyupvoted (5.79%) @ankar / ethereum-infura-web3-js
2018/01/26 10:46:15
| voter | cn-naughty.boy |
| author | ankar |
| permlink | ethereum-infura-web3-js |
| weight | 579 (5.79%) |
| Transaction Info | Block #19313834/Trx faec64cab2f466256c0ab33db51408a2cc7458c0 |
View Raw JSON Data
{
"trx_id": "faec64cab2f466256c0ab33db51408a2cc7458c0",
"block": 19313834,
"trx_in_block": 43,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-26T10:46:15",
"op": [
"vote",
{
"voter": "cn-naughty.boy",
"author": "ankar",
"permlink": "ethereum-infura-web3-js",
"weight": 579
}
]
}ankarupvoted (100.00%) @ankar / ethereum-infura-web3-js2018/01/26 10:45:54
ankarupvoted (100.00%) @ankar / ethereum-infura-web3-js
2018/01/26 10:45:54
| voter | ankar |
| author | ankar |
| permlink | ethereum-infura-web3-js |
| weight | 10000 (100.00%) |
| Transaction Info | Block #19313827/Trx 6c84acbcfa90885767424cb74be326f9cd3ee2e6 |
View Raw JSON Data
{
"trx_id": "6c84acbcfa90885767424cb74be326f9cd3ee2e6",
"block": 19313827,
"trx_in_block": 15,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-26T10:45:54",
"op": [
"vote",
{
"voter": "ankar",
"author": "ankar",
"permlink": "ethereum-infura-web3-js",
"weight": 10000
}
]
}ankarpublished a new post: ethereum-infura-web3-js2018/01/26 10:45:54
ankarpublished a new post: ethereum-infura-web3-js
2018/01/26 10:45:54
| parent author | |
| parent permlink | cn |
| author | ankar |
| permlink | ethereum-infura-web3-js |
| title | 【Ethereum 智能合約開發筆記】不用自己跑節點,使用 Infura 和 web3.js 呼叫合約 |
| body |  > Infura 提供公開的 Ethereum 主網和測試網路節點。到 [Infura 官網申請](https://infura.io/signup),只要輸入一點基本資料和 Email,就可以收到 API-key。  --- ## 使用 RPC 查詢合約內儲存的狀態 最常需要查詢的狀態就是 Token 的餘額啦。我就用 EOS 代幣合約最為範例試看看。 ### 取得合約資訊 可以透過 Etherscan,大部分知名的合約可以直接搜尋到。  要呼叫合約,至少需要: - **合約地址**,例如 0x86Fa049857E0209aa7D9e616F7eb3b3B78ECfdb0 - **要呼叫的 function signature**,例如以 ERC 20 代幣合約來說,查詢餘額要呼叫的 function 是 `balanceOf(address)`,其對應的 function signature 是 `70a08231`。 如何取得 function signature 呢?以 `balanceOf(address)` 為例: 1. 把 `balanceOf(address)` 經過 sha3 0x70a08231b98ef4ca268c9cc3f6b4590e4bfec28280db06bb5d45e689f2a360be 2. 取除了 `0x` 外,前面的 8 位 70a08231 以上流程可以用任何工具完成,以 web3.js 為例: var functionSig = we3.sha3("balanceOf(address)").substr(2,8) 另外也可以把 contract code 貼到 remix。在合約的 Details 中可以看到完整的合約介面和對應的 function signature。  ### 使用 RPC 可以透過一個簡單的 POST 用 Infura 提供的節點呼叫一個 RPC。有哪些 RPC method 可以看 [Ethereum RPC doc](https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sendtransaction)。 如果要呼叫的 function 只是查詢,而沒有要更新合約的狀態,那就用 `eth_call` 這個 RPC。POST Data 如下: { "jsonrpc":"2.0", "method":"eth_call", "params":[ { "to":"0x86Fa049857E0209aa7D9e616F7eb3b3B78ECfdb0", "data":"0x70a0823100000000000000000000000033b8287511ac7F003902e83D642Be4603afCd876" }, "latest" ], "id":123 } 其中 `params` 的值包含: - `"to"`:合約地址 - `"data"`:丟給合約的參數。由三個部分組成:`0x`、`70a08231`和一個 32 bytes 的參數 `00000000000000000000000033b8287511ac7F003902e83D642Be46`(也就是我要查詢的帳戶) - `"latest"`,代表使用最新的區塊鏈資料 #### 範例 // Request curl https://mainnet.infura.io/<your-api-key> -X POST --data '{"jsonrpc":"2.0","method":"eth_call","params":[{"to":"0x86Fa049857E0209aa7D9e616F7eb3b3B78ECfdb0", "data":"0x70a0823100000000000000000000000033b8287511ac7F003902e83D642Be4603afCd876"}, "latest"],"id":123 }' // Result { "jsonrpc": "2.0", "id": 123, "result": "0x000000000000000000000000000000000000000000000000b1d16ec625a59d3e" } `0x000000000000000000000000000000000000000000000000b1d16ec625a59d3e` 是十六進位,換算成十進位是 `12813144212159962430`。也就是小弟只有少少的 **12.x** 個 EOS token。 --- ## web3.js(JavaScript API) 如果要更新合約的狀態,就需要送 transaction,要送 transaction 就需要錢包或是說 private key 來 sign transaction 和提供 Ether 做手續費。因為送 transaction 要手續費,為了省點錢,我就部一個合約在 **Ropsten 測試鏈**上做這次的試驗。以上步驟比較麻煩,**我就用 web3.js 寫兩個簡單的程式,一個查詢合約狀態、一個更新合約狀態**。web3.js 的功能和 RPC 差不多,但是個 JavaScript 套件。有哪些 API 可以用請看 [JavaScript API doc](https://github.com/ethereum/wiki/wiki/JavaScript-API#web3versionapi)。 ### 安裝 npm install web3, ethereumjs-tx ### 官方建議的初始化方式 var Web3 = require('web3'); if (typeof web3 !== 'undefined') { web3 = new Web3(web3.currentProvider); } else { // set the provider you want from Web3.providers web3 = new Web3(new Web3.providers.HttpProvider("https://ropsten.infura.io/<your-api-key>")); } ### 部署測試合約 這次部署一個很簡單的合約。合約只儲存一個狀態 `data`,並可透過 `set()` 更新狀態。 合約程式碼: pragma solidity ^0.4.19; contract SimpleStorage { uint public data; function set(uint x) public { data = x; } } 合約地址:`0x5fb30123b9efedcd15094266948fb7c862279ee1` 合約的 function signatures: { "73d4a13a": "data()", "60fe47b1": "set(uint256)" } --- ### 查詢合約狀態 使用 `web3.eth.call`。 // Request var result = web3.eth.call({ to: "0x5fb30123b9efedcd15094266948fb7c862279ee1", data: "0x" + "73d4a13a" }); // Print Result console.log(parseInt(result, 16)); Print 出來結果會是 `0`,因為還沒更新過狀態。 --- ### 更新合約狀態 使用 `web3.eth.sendRawTransaction`。 > RPC 和 web3.js 提供的 `SendTransaction` 都是連到一節點,使用節點中的帳戶發送 transaction。而如果要用自己的帳戶就要用 `sendRawTransaction`,也就是說要自己建立 transaction、自己 sign 過,再透過 `sendRawTransaction` 發送。 #### Define raw transaction var rawTx = { nonce: '0x14', gasPrice: '0x3B9ACA00', gasLimit: '0xC20A', to: '0x5fb30123b9efedcd15094266948fb7c862279ee1', value: '0x00', data: '0x' + '60fe47b1' + '000000000000000000000000000000000000000000000000000000000000000a' } `rawTx` 中包含: - `nonce`:紀錄目前帳戶送出的交易數,用來避免 replay attack,每次送要加 1。可以用 RPC `eth_getTransactionCount` 查詢目前帳戶的 nonce。也可以用 Etherscan 查,但 Etherscan 顯示的 `No Of Transactions` 會包含送出去但沒有成功的交易,所以會不準 - `gasPrice`:一般用 1 Gwei(= 1000000000 = 0x3B9ACA00) - `gasLimit`:gaslimit 估算可參考 [使用ethereum browser計算gas cost](https://medium.com/taipei-ethereum-meetup/%E4%BD%BF%E7%94%A8ethereum-browser%E8%A8%88%E7%AE%97gas-cost-9122950a04f7) - `to`:合約地址 - `value`:要送的 Ether 數量,因為只是要呼叫合約所以設 0 - `data`:丟給合約的參數。由三個部分組成:`0x`、`60fe47b1`和一個 32 bytes 的參數 `000000000000000000000000000000000000000000000000000000000000000a`(我要更新的值,這邊設 10) #### Create and Sign raw transaction 要引入另一個套件 `ethereumjs-tx`。記得先用 npm 安裝。 var Tx = require('ethereumjs-tx'); 建立 raw transaction。 var tx = new Tx(rawTx); 用自己的 private key sign。 const privateKey = new Buffer('<your-private-key>', 'hex') tx.sign(privateKey); #### Send raw transaction var serializedTx = tx.serialize(); web3.eth.sendRawTransaction('0x' + serializedTx.function function function toString() { [native code] }() { [native code] }() { [native code] }('hex'), function(err, hash) { if (!err) { console.log(hash); } else { console.log(err) } }); 成功就會回傳一個 transaction hash,像是: 0x2a9d89b0f329853b5c0f83c83cea4cfa2e38ddd1041d9abd0afcc9af5ed1bf1b 交易成功送出且被收進 block 後,再次查詢合約狀態,Print 出來結果就會是 **10**。 可以透過 Etherscan 確認交易有沒有被收進 block 以及合約執行的結果(可能因為參數錯誤導致執行失敗)。  ## References - [在區塊鏈上建立可更新的智慧合約(一)](https://medium.com/@twedusuck/%E5%9C%A8%E5%8D%80%E5%A1%8A%E9%8F%88%E4%B8%8A%E5%BB%BA%E7%AB%8B%E5%8F%AF%E6%9B%B4%E6%96%B0%E7%9A%84%E6%99%BA%E6%85%A7%E5%90%88%E7%B4%84-cbe015bdb339) - [Ethereum JSON RPC Document](https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_gettransactioncount) - [We3.js API Document](https://github.com/ethereum/wiki/wiki/JavaScript-API) |
| json metadata | {"tags":["cn","blockchain","ethereum","infura","web3"],"image":["https://i.imgur.com/doEO8gu.jpg","https://i.imgur.com/yz9kOFo.png","https://i.imgur.com/vVx5L4A.png","https://i.imgur.com/YRtWIGr.png","https://i.imgur.com/RdDK54y.png"],"links":["https://infura.io/signup","https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sendtransaction","https://github.com/ethereum/wiki/wiki/JavaScript-API#web3versionapi","https://medium.com/taipei-ethereum-meetup/%E4%BD%BF%E7%94%A8ethereum-browser%E8%A8%88%E7%AE%97gas-cost-9122950a04f7","https://medium.com/@twedusuck/%E5%9C%A8%E5%8D%80%E5%A1%8A%E9%8F%88%E4%B8%8A%E5%BB%BA%E7%AB%8B%E5%8F%AF%E6%9B%B4%E6%96%B0%E7%9A%84%E6%99%BA%E6%85%A7%E5%90%88%E7%B4%84-cbe015bdb339","https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_gettransactioncount","https://github.com/ethereum/wiki/wiki/JavaScript-API"],"app":"steemit/0.1","format":"markdown"} |
| Transaction Info | Block #19313827/Trx 6c84acbcfa90885767424cb74be326f9cd3ee2e6 |
View Raw JSON Data
{
"trx_id": "6c84acbcfa90885767424cb74be326f9cd3ee2e6",
"block": 19313827,
"trx_in_block": 15,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-26T10:45:54",
"op": [
"comment",
{
"parent_author": "",
"parent_permlink": "cn",
"author": "ankar",
"permlink": "ethereum-infura-web3-js",
"title": "【Ethereum 智能合約開發筆記】不用自己跑節點,使用 Infura 和 web3.js 呼叫合約",
"body": "\n\n> Infura 提供公開的 Ethereum 主網和測試網路節點。到 [Infura 官網申請](https://infura.io/signup),只要輸入一點基本資料和 Email,就可以收到 API-key。\n\n\n\n---\n\n## 使用 RPC 查詢合約內儲存的狀態\n\n最常需要查詢的狀態就是 Token 的餘額啦。我就用 EOS 代幣合約最為範例試看看。\n\n### 取得合約資訊\n\n可以透過 Etherscan,大部分知名的合約可以直接搜尋到。\n\n\n\n要呼叫合約,至少需要:\n\n- **合約地址**,例如 0x86Fa049857E0209aa7D9e616F7eb3b3B78ECfdb0\n- **要呼叫的 function signature**,例如以 ERC 20 代幣合約來說,查詢餘額要呼叫的 function 是 `balanceOf(address)`,其對應的 function signature 是 `70a08231`。\n\n如何取得 function signature 呢?以 `balanceOf(address)` 為例:\n1. 把 `balanceOf(address)` 經過 sha3\n\n 0x70a08231b98ef4ca268c9cc3f6b4590e4bfec28280db06bb5d45e689f2a360be\n\n2. 取除了 `0x` 外,前面的 8 位\n \n 70a08231\n\n以上流程可以用任何工具完成,以 web3.js 為例:\n\n var functionSig = we3.sha3(\"balanceOf(address)\").substr(2,8)\n\n另外也可以把 contract code 貼到 remix。在合約的 Details 中可以看到完整的合約介面和對應的 function signature。\n\n\n\n### 使用 RPC\n\n可以透過一個簡單的 POST 用 Infura 提供的節點呼叫一個 RPC。有哪些 RPC method 可以看 [Ethereum RPC doc](https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sendtransaction)。\n\n如果要呼叫的 function 只是查詢,而沒有要更新合約的狀態,那就用 `eth_call` 這個 RPC。POST Data 如下:\n\n {\n \"jsonrpc\":\"2.0\",\n \"method\":\"eth_call\",\n \"params\":[\n {\n \"to\":\"0x86Fa049857E0209aa7D9e616F7eb3b3B78ECfdb0\",\n \"data\":\"0x70a0823100000000000000000000000033b8287511ac7F003902e83D642Be4603afCd876\"\n },\n \"latest\"\n ],\n \"id\":123\n }\n\n其中 `params` 的值包含:\n\n- `\"to\"`:合約地址\n- `\"data\"`:丟給合約的參數。由三個部分組成:`0x`、`70a08231`和一個 32 bytes 的參數 `00000000000000000000000033b8287511ac7F003902e83D642Be46`(也就是我要查詢的帳戶)\n- `\"latest\"`,代表使用最新的區塊鏈資料\n\n#### 範例\n\n // Request\n curl https://mainnet.infura.io/<your-api-key> -X POST --data '{\"jsonrpc\":\"2.0\",\"method\":\"eth_call\",\"params\":[{\"to\":\"0x86Fa049857E0209aa7D9e616F7eb3b3B78ECfdb0\", \"data\":\"0x70a0823100000000000000000000000033b8287511ac7F003902e83D642Be4603afCd876\"}, \"latest\"],\"id\":123 }'\n\n // Result\n {\n \"jsonrpc\": \"2.0\",\n \"id\": 123,\n \"result\": \"0x000000000000000000000000000000000000000000000000b1d16ec625a59d3e\"\n }\n\n`0x000000000000000000000000000000000000000000000000b1d16ec625a59d3e` 是十六進位,換算成十進位是 `12813144212159962430`。也就是小弟只有少少的 **12.x** 個 EOS token。\n\n---\n\n## web3.js(JavaScript API)\n\n如果要更新合約的狀態,就需要送 transaction,要送 transaction 就需要錢包或是說 private key 來 sign transaction 和提供 Ether 做手續費。因為送 transaction 要手續費,為了省點錢,我就部一個合約在 **Ropsten 測試鏈**上做這次的試驗。以上步驟比較麻煩,**我就用 web3.js 寫兩個簡單的程式,一個查詢合約狀態、一個更新合約狀態**。web3.js 的功能和 RPC 差不多,但是個 JavaScript 套件。有哪些 API 可以用請看 [JavaScript API doc](https://github.com/ethereum/wiki/wiki/JavaScript-API#web3versionapi)。\n\n### 安裝\n\n npm install web3, ethereumjs-tx\n \n### 官方建議的初始化方式\n\n var Web3 = require('web3');\n\n if (typeof web3 !== 'undefined') {\n web3 = new Web3(web3.currentProvider);\n } else {\n // set the provider you want from Web3.providers\n web3 = new Web3(new Web3.providers.HttpProvider(\"https://ropsten.infura.io/<your-api-key>\"));\n }\n\n### 部署測試合約\n\n這次部署一個很簡單的合約。合約只儲存一個狀態 `data`,並可透過 `set()` 更新狀態。\n\n合約程式碼:\n\n pragma solidity ^0.4.19;\n\n contract SimpleStorage {\n uint public data;\n \n function set(uint x) public {\n data = x;\n }\n }\n\n合約地址:`0x5fb30123b9efedcd15094266948fb7c862279ee1`\n\n合約的 function signatures:\n\n {\n \"73d4a13a\": \"data()\",\n \"60fe47b1\": \"set(uint256)\"\n }\n\n---\n\n### 查詢合約狀態\n\n使用 `web3.eth.call`。\n\n // Request\n var result = web3.eth.call({\n to: \"0x5fb30123b9efedcd15094266948fb7c862279ee1\", \n data: \"0x\" + \"73d4a13a\"\n });\n\n // Print Result\n console.log(parseInt(result, 16));\n\nPrint 出來結果會是 `0`,因為還沒更新過狀態。\n\n---\n\n### 更新合約狀態\n\n使用 `web3.eth.sendRawTransaction`。\n\n> RPC 和 web3.js 提供的 `SendTransaction` 都是連到一節點,使用節點中的帳戶發送 transaction。而如果要用自己的帳戶就要用 `sendRawTransaction`,也就是說要自己建立 transaction、自己 sign 過,再透過 `sendRawTransaction` 發送。\n\n#### Define raw transaction\n\n var rawTx = {\n nonce: '0x14',\n gasPrice: '0x3B9ACA00', \n gasLimit: '0xC20A',\n to: '0x5fb30123b9efedcd15094266948fb7c862279ee1', \n value: '0x00', \n data: '0x' + '60fe47b1' + '000000000000000000000000000000000000000000000000000000000000000a'\n }\n\n`rawTx` 中包含:\n\n- `nonce`:紀錄目前帳戶送出的交易數,用來避免 replay attack,每次送要加 1。可以用 RPC `eth_getTransactionCount` 查詢目前帳戶的 nonce。也可以用 Etherscan 查,但 Etherscan 顯示的 `No Of Transactions` 會包含送出去但沒有成功的交易,所以會不準\n- `gasPrice`:一般用 1 Gwei(= 1000000000 = 0x3B9ACA00)\n- `gasLimit`:gaslimit 估算可參考 [使用ethereum browser計算gas cost](https://medium.com/taipei-ethereum-meetup/%E4%BD%BF%E7%94%A8ethereum-browser%E8%A8%88%E7%AE%97gas-cost-9122950a04f7)\n- `to`:合約地址\n- `value`:要送的 Ether 數量,因為只是要呼叫合約所以設 0\n- `data`:丟給合約的參數。由三個部分組成:`0x`、`60fe47b1`和一個 32 bytes 的參數 `000000000000000000000000000000000000000000000000000000000000000a`(我要更新的值,這邊設 10)\n\n#### Create and Sign raw transaction\n\n要引入另一個套件 `ethereumjs-tx`。記得先用 npm 安裝。\n \n var Tx = require('ethereumjs-tx');\n\n建立 raw transaction。\n\n var tx = new Tx(rawTx);\n\n用自己的 private key sign。\n\n const privateKey = new Buffer('<your-private-key>', 'hex')\n tx.sign(privateKey);\n\n#### Send raw transaction\n\n var serializedTx = tx.serialize();\n web3.eth.sendRawTransaction('0x' + serializedTx.function function function toString() { [native code] }() { [native code] }() { [native code] }('hex'), function(err, hash) {\n if (!err) {\n console.log(hash);\n } else {\n console.log(err)\n }\n });\n\n成功就會回傳一個 transaction hash,像是:\n\n 0x2a9d89b0f329853b5c0f83c83cea4cfa2e38ddd1041d9abd0afcc9af5ed1bf1b\n\n交易成功送出且被收進 block 後,再次查詢合約狀態,Print 出來結果就會是 **10**。\n\n可以透過 Etherscan 確認交易有沒有被收進 block 以及合約執行的結果(可能因為參數錯誤導致執行失敗)。\n\n\n\n## References\n\n- [在區塊鏈上建立可更新的智慧合約(一)](https://medium.com/@twedusuck/%E5%9C%A8%E5%8D%80%E5%A1%8A%E9%8F%88%E4%B8%8A%E5%BB%BA%E7%AB%8B%E5%8F%AF%E6%9B%B4%E6%96%B0%E7%9A%84%E6%99%BA%E6%85%A7%E5%90%88%E7%B4%84-cbe015bdb339)\n- [Ethereum JSON RPC Document](https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_gettransactioncount)\n- [We3.js API Document](https://github.com/ethereum/wiki/wiki/JavaScript-API)",
"json_metadata": "{\"tags\":[\"cn\",\"blockchain\",\"ethereum\",\"infura\",\"web3\"],\"image\":[\"https://i.imgur.com/doEO8gu.jpg\",\"https://i.imgur.com/yz9kOFo.png\",\"https://i.imgur.com/vVx5L4A.png\",\"https://i.imgur.com/YRtWIGr.png\",\"https://i.imgur.com/RdDK54y.png\"],\"links\":[\"https://infura.io/signup\",\"https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sendtransaction\",\"https://github.com/ethereum/wiki/wiki/JavaScript-API#web3versionapi\",\"https://medium.com/taipei-ethereum-meetup/%E4%BD%BF%E7%94%A8ethereum-browser%E8%A8%88%E7%AE%97gas-cost-9122950a04f7\",\"https://medium.com/@twedusuck/%E5%9C%A8%E5%8D%80%E5%A1%8A%E9%8F%88%E4%B8%8A%E5%BB%BA%E7%AB%8B%E5%8F%AF%E6%9B%B4%E6%96%B0%E7%9A%84%E6%99%BA%E6%85%A7%E5%90%88%E7%B4%84-cbe015bdb339\",\"https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_gettransactioncount\",\"https://github.com/ethereum/wiki/wiki/JavaScript-API\"],\"app\":\"steemit/0.1\",\"format\":\"markdown\"}"
}
]
}tyzernupvoted (100.00%) @ankar / decentraland2018/01/24 12:29:00
tyzernupvoted (100.00%) @ankar / decentraland
2018/01/24 12:29:00
| voter | tyzern |
| author | ankar |
| permlink | decentraland |
| weight | 10000 (100.00%) |
| Transaction Info | Block #19258308/Trx ee5c8f24e7c115025a15b477e79efa1b45efd07e |
View Raw JSON Data
{
"trx_id": "ee5c8f24e7c115025a15b477e79efa1b45efd07e",
"block": 19258308,
"trx_in_block": 28,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-24T12:29:00",
"op": [
"vote",
{
"voter": "tyzern",
"author": "ankar",
"permlink": "decentraland",
"weight": 10000
}
]
}ankarreceived 0.013 SBD, 0.005 SP author reward for @ankar / ethereum-remix2018/01/24 08:45:24
ankarreceived 0.013 SBD, 0.005 SP author reward for @ankar / ethereum-remix
2018/01/24 08:45:24
| author | ankar |
| permlink | ethereum-remix |
| sbd payout | 0.013 SBD |
| steem payout | 0.000 STEEM |
| vesting payout | 8.187309 VESTS |
| Transaction Info | Block #19253835/Virtual Operation #24 |
View Raw JSON Data
{
"trx_id": "0000000000000000000000000000000000000000",
"block": 19253835,
"trx_in_block": 4294967295,
"op_in_trx": 0,
"virtual_op": 24,
"timestamp": "2018-01-24T08:45:24",
"op": [
"author_reward",
{
"author": "ankar",
"permlink": "ethereum-remix",
"sbd_payout": "0.013 SBD",
"steem_payout": "0.000 STEEM",
"vesting_payout": "8.187309 VESTS"
}
]
}cqfupvoted (1.00%) @ankar / decentraland2018/01/24 02:55:39
cqfupvoted (1.00%) @ankar / decentraland
2018/01/24 02:55:39
| voter | cqf |
| author | ankar |
| permlink | decentraland |
| weight | 100 (1.00%) |
| Transaction Info | Block #19246844/Trx 9cda2eb01525f9493fce4f94f4140079e755036f |
View Raw JSON Data
{
"trx_id": "9cda2eb01525f9493fce4f94f4140079e755036f",
"block": 19246844,
"trx_in_block": 0,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-24T02:55:39",
"op": [
"vote",
{
"voter": "cqf",
"author": "ankar",
"permlink": "decentraland",
"weight": 100
}
]
}ankarpublished a new post: decentraland2018/01/24 02:54:42
ankarpublished a new post: decentraland
2018/01/24 02:54:42
| parent author | |
| parent permlink | cn |
| author | ankar |
| permlink | decentraland |
| title | 【白皮书略读笔记】如何构成 Decentraland? |
| body | @@ -3389,16 +3389,55 @@ epaper%5D( +https://decentraland.org/whitepaper.pdf )%0A- %5BDec |
| json metadata | {"tags":["cn","decentraland","blockchain","ethereum","vr"],"image":["https://i.imgur.com/tnCzltI.jpg","https://i.imgur.com/rDTlz5v.png","https://i.imgur.com/KOlfo0g.png","https://i.imgur.com/HtbJ5RU.png"],"links":["https://decentraland.org/whitepaper.pdf","https://decentraland.org/","https://mp.weixin.qq.com/s/ke-j4UBXrj1TO-EPXa_IBg","https://www.youtube.com/watch?v=esjFLqNx4e8","https://github.com/decentraland/land","https://etherscan.io/address/0xf87e31492faf9a91b02ee0deaad50d51d56d5d4d#code","https://etherscan.io/address/0x7e06a9512086bc44c51c07c2bf0af338420c2a13#code","https://wiki.decentraland.org/index.php?title=The_Genesis_City_Auction","https://wiki.decentraland.org/index.php?title=Buying_Land","https://blog.decentraland.org/why-we-use-a-frame-fc5c1d4c3e90","https://cn.bitcoin.com/archives/5678","https://github.com/decentraland/marketplace","https://wiki.decentraland.org/index.php?title=Main_Page","https://blog.decentraland.org/"],"app":"steemit/0.1","format":"markdown"} |
| Transaction Info | Block #19246825/Trx c759e2c60351ef800c5141ac49fe5f55a2c20ab8 |
View Raw JSON Data
{
"trx_id": "c759e2c60351ef800c5141ac49fe5f55a2c20ab8",
"block": 19246825,
"trx_in_block": 52,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-24T02:54:42",
"op": [
"comment",
{
"parent_author": "",
"parent_permlink": "cn",
"author": "ankar",
"permlink": "decentraland",
"title": "【白皮书略读笔记】如何构成 Decentraland?",
"body": "@@ -3389,16 +3389,55 @@\n epaper%5D(\n+https://decentraland.org/whitepaper.pdf\n )%0A- %5BDec\n",
"json_metadata": "{\"tags\":[\"cn\",\"decentraland\",\"blockchain\",\"ethereum\",\"vr\"],\"image\":[\"https://i.imgur.com/tnCzltI.jpg\",\"https://i.imgur.com/rDTlz5v.png\",\"https://i.imgur.com/KOlfo0g.png\",\"https://i.imgur.com/HtbJ5RU.png\"],\"links\":[\"https://decentraland.org/whitepaper.pdf\",\"https://decentraland.org/\",\"https://mp.weixin.qq.com/s/ke-j4UBXrj1TO-EPXa_IBg\",\"https://www.youtube.com/watch?v=esjFLqNx4e8\",\"https://github.com/decentraland/land\",\"https://etherscan.io/address/0xf87e31492faf9a91b02ee0deaad50d51d56d5d4d#code\",\"https://etherscan.io/address/0x7e06a9512086bc44c51c07c2bf0af338420c2a13#code\",\"https://wiki.decentraland.org/index.php?title=The_Genesis_City_Auction\",\"https://wiki.decentraland.org/index.php?title=Buying_Land\",\"https://blog.decentraland.org/why-we-use-a-frame-fc5c1d4c3e90\",\"https://cn.bitcoin.com/archives/5678\",\"https://github.com/decentraland/marketplace\",\"https://wiki.decentraland.org/index.php?title=Main_Page\",\"https://blog.decentraland.org/\"],\"app\":\"steemit/0.1\",\"format\":\"markdown\"}"
}
]
}bitcoinboxupvoted (100.00%) @ankar / decentraland2018/01/24 02:49:30
bitcoinboxupvoted (100.00%) @ankar / decentraland
2018/01/24 02:49:30
| voter | bitcoinbox |
| author | ankar |
| permlink | decentraland |
| weight | 10000 (100.00%) |
| Transaction Info | Block #19246721/Trx dfbbd614eac6af5ceb9dcb237be1d101812a725d |
View Raw JSON Data
{
"trx_id": "dfbbd614eac6af5ceb9dcb237be1d101812a725d",
"block": 19246721,
"trx_in_block": 42,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-24T02:49:30",
"op": [
"vote",
{
"voter": "bitcoinbox",
"author": "ankar",
"permlink": "decentraland",
"weight": 10000
}
]
}ajah025upvoted (100.00%) @ankar / decentraland2018/01/24 02:49:24
ajah025upvoted (100.00%) @ankar / decentraland
2018/01/24 02:49:24
| voter | ajah025 |
| author | ankar |
| permlink | decentraland |
| weight | 10000 (100.00%) |
| Transaction Info | Block #19246719/Trx 76d0fd2896e559a01a7eb2463a856119f7eb1780 |
View Raw JSON Data
{
"trx_id": "76d0fd2896e559a01a7eb2463a856119f7eb1780",
"block": 19246719,
"trx_in_block": 52,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-24T02:49:24",
"op": [
"vote",
{
"voter": "ajah025",
"author": "ankar",
"permlink": "decentraland",
"weight": 10000
}
]
}ankarupvoted (100.00%) @ankar / decentraland2018/01/24 02:47:54
ankarupvoted (100.00%) @ankar / decentraland
2018/01/24 02:47:54
| voter | ankar |
| author | ankar |
| permlink | decentraland |
| weight | 10000 (100.00%) |
| Transaction Info | Block #19246689/Trx 76479517a3840ad174eaacb1f2e29931cc71b8ba |
View Raw JSON Data
{
"trx_id": "76479517a3840ad174eaacb1f2e29931cc71b8ba",
"block": 19246689,
"trx_in_block": 41,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-24T02:47:54",
"op": [
"vote",
{
"voter": "ankar",
"author": "ankar",
"permlink": "decentraland",
"weight": 10000
}
]
}ankarpublished a new post: decentraland2018/01/24 02:47:42
ankarpublished a new post: decentraland
2018/01/24 02:47:42
| parent author | |
| parent permlink | cn |
| author | ankar |
| permlink | decentraland |
| title | 【白皮书略读笔记】如何构成 Decentraland? |
| body |  > Decentraland 是架构于 Ethereum 区块链上的虚拟世界。Decentraland 的土地(Land)是纪录在区块链上的虚拟资产,所有权可以像真实世界中一样转移。土地是数量固定的有限资源,每ㄧ笔土地都有固定的座标(x, y)。土地拥有者可以任意创造土地上呈现的内容,像是静态的 3D 场景或是一间虚拟电商甚至一个可和使用者互动的游戏(请发挥想像力)。**本篇希望根据[白皮书](https://decentraland.org/whitepaper.pdf),了解构成 Decentraland 主要的技术架构。**  本篇专注在技术上如何构成 Decentraland。想从其他面向了解 Decentraland 可以先参考[官网](https://decentraland.org/),也可以听听创办人怎么说: - [对谈 Project Lead of Decentraland - Ari Meilich](https://mp.weixin.qq.com/s/ke-j4UBXrj1TO-EPXa_IBg) - [SF WebVR/AR Monthly: Esteban Ordano - Decentraland](https://www.youtube.com/watch?v=esjFLqNx4e8) ## 在 Decentraland 之上 Decentraland 的架构包含三层: - Consensus layer(共识层):管理土地(所有权、内容的连结等)和 MANA 代币。 - Land content layer(内容层):透过分布式的档案系统储存内容。 - Real-time layer(实时呈现层):让使用者能实际体验这个虚拟世界(所有土地上的内容),并与其他使用者彼此互动。  ### Consensus layer(共识层) #### 土地(LAND) Decentraland 使用 Ethereum 智能合约来管理土地,将土地的所有权和交易历史等记录在难以窜改的区块链上。在他们撰写的 [LAND 智能合约](https://github.com/decentraland/land) 中,定义 **土地(Land)** 为一种虚拟资产,且是不可替代的(non-fungible)。都有唯一的(x, y)座标、一个拥有者和一个参考(可以是一个 IPFS Hash 或是一个 HTTPS 网址等)连结到描述内容的文件。Decentraland Client(目前还没实作出来) 会连结这个 LAND 智能合约,取得土地最新的参考,并从参考下载描述土地上内容的文件,再将内容呈现给使用者。 另外实际上 LAND 智能合约分成两部分:[LANDProxy](https://etherscan.io/address/0xf87e31492faf9a91b02ee0deaad50d51d56d5d4d#code) 和 [LANDRegistry](https://etherscan.io/address/0x7e06a9512086bc44c51c07c2bf0af338420c2a13#code),目的是让实作管理土地的 LANDRegistry 合约可以更新。使用者透过 LANDProxy 调用 LANDRegistry,当要更新 LANDRegistry 时只需重新部署并取得新的合约地址,再更新 LANDProxy 中纪录的合约地址就可以了。 #### MANA Decentraland 另外使用 Ethereum 智能合约发行一种代币叫 **MANA**。MANA 是符合 ERC20 的代币,用来购买土地。起初可以透过花掉 1000 MANA 取得一块土地(MANA 会被销毁,这个角度来看购买 MANA 就像预购土地)。另外[ Genesis City 的土地在 2017 年底时透过拍卖出售](https://wiki.decentraland.org/index.php?title=The_Genesis_City_Auction)。关于购买土地详细请看 [wiki](https://wiki.decentraland.org/index.php?title=Buying_Land)。 ### Land content layer(内容层) 每块土地都有对应的文件描述土地的内容,这份文件可用 IPFS(Inter-Planetary File System) 来储存。这让 Decentraland 的运行不需要中心化的 server,避免 single-point of faliure,且可以做到 censorship-resistance。至于 IPFS 对提供储存空间、频宽的人缺发奖励机制,未来可望用 Filecoin 这类 protocol 解决。 实际上一块土地实际需要多份文件才能描述其完整的内容,这些内容包括: - 物件内容:描述土地上物件的 3D 模型、纹理或一切渲染所需要的资讯。目前官方正在开发一个[基于 A-Frame 的土地编辑器](https://blog.decentraland.org/why-we-use-a-frame-fc5c1d4c3e90)。 - 脚本:描述的土地上的物件如何放置、移动,还有每个物件和使用者互动的行为。这让在 Decentraland 的世界中制作动画或是游戏成为可能。这个脚本语言也正在开发中。 - P2P 互动:这部分官方描述比较模糊,应该还没定案。目的是希望使用者可以彼此互动,像是语音、讯息甚至支付的功能。可能就要描述由哪个 server 提供服务,如何使用等。 ### Real-time layer(实时呈现层) 除了用各种 3D 渲染技术呈现内容(主要透过虚拟实境装置),还希望使用者之间可以彼此互动透过讯息或语音等。比较可行的方式是土地拥有者架设 server,让使用者透过 server 进行互动。但在 Decentraland 中使用者需要透过 centralized 的 server 才能互动,这个世界好像就不这么美丽了,所以白皮书中计划未来会开发一个 P2P 沟通系统。此外,还要开发在 Decentraland 中的支付网路,提供快速、低手续费的支付方式。用来购买 P2P 服务或奖励内容提供者。虽然已经有 MANA 这个代币,但作为一个 ERC20 代币,以目前 Ethereum 区块链网路的情况用做支付可能会又慢又贵([以太坊区块链被猫咪堵住](https://cn.bitcoin.com/archives/5678))。 ## 目前与未来发展  Decentraland 在 2017 年 8 月才 ICO 并发行 MANA 的代币。至今与社群共同完成 Decentraland 中各街区的规划、并在部署 Land 智能合约后开放使用者取得土地所有权。整个项目还在早期,根据[官网](https://decentraland.org/)的 Roadmap,目前正进入开发阶段中的 “Iron Age“,包括要释出基于 A-Frame 的土地编辑器和脚本系统,让土地拥有者可以开始创造土地上的内容。脚本系统所能提供的功能和创造出来的使用体验,会是影响 Decentraland 发展的重要因素。目前也正在开发去中心化的[土地交易所](https://github.com/decentraland/marketplace)。未来的挑战还有快速、低手续费的支付网路和 P2P 沟通系统等。期待 Decentraland 未来的发展。 ## 参考资料 - [Decentraland Whitepaper]() - [Decentraland Wiki](https://wiki.decentraland.org/index.php?title=Main_Page) - [Decentraland Blog](https://blog.decentraland.org/) |
| json metadata | {"tags":["cn","decentraland","blockchain","ethereum","vr"],"image":["https://i.imgur.com/tnCzltI.jpg","https://i.imgur.com/rDTlz5v.png","https://i.imgur.com/KOlfo0g.png","https://i.imgur.com/HtbJ5RU.png"],"links":["https://decentraland.org/whitepaper.pdf","https://decentraland.org/","https://mp.weixin.qq.com/s/ke-j4UBXrj1TO-EPXa_IBg","https://www.youtube.com/watch?v=esjFLqNx4e8","https://github.com/decentraland/land","https://etherscan.io/address/0xf87e31492faf9a91b02ee0deaad50d51d56d5d4d#code","https://etherscan.io/address/0x7e06a9512086bc44c51c07c2bf0af338420c2a13#code","https://wiki.decentraland.org/index.php?title=The_Genesis_City_Auction","https://wiki.decentraland.org/index.php?title=Buying_Land","https://blog.decentraland.org/why-we-use-a-frame-fc5c1d4c3e90","https://cn.bitcoin.com/archives/5678","https://github.com/decentraland/marketplace","https://wiki.decentraland.org/index.php?title=Main_Page","https://blog.decentraland.org/"],"app":"steemit/0.1","format":"markdown"} |
| Transaction Info | Block #19246685/Trx 760873659be788ac7559422a9b8c00b526877699 |
View Raw JSON Data
{
"trx_id": "760873659be788ac7559422a9b8c00b526877699",
"block": 19246685,
"trx_in_block": 24,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-24T02:47:42",
"op": [
"comment",
{
"parent_author": "",
"parent_permlink": "cn",
"author": "ankar",
"permlink": "decentraland",
"title": "【白皮书略读笔记】如何构成 Decentraland?",
"body": "\n\n> Decentraland 是架构于 Ethereum 区块链上的虚拟世界。Decentraland 的土地(Land)是纪录在区块链上的虚拟资产,所有权可以像真实世界中一样转移。土地是数量固定的有限资源,每ㄧ笔土地都有固定的座标(x, y)。土地拥有者可以任意创造土地上呈现的内容,像是静态的 3D 场景或是一间虚拟电商甚至一个可和使用者互动的游戏(请发挥想像力)。**本篇希望根据[白皮书](https://decentraland.org/whitepaper.pdf),了解构成 Decentraland 主要的技术架构。**\n\n\n\n本篇专注在技术上如何构成 Decentraland。想从其他面向了解 Decentraland 可以先参考[官网](https://decentraland.org/),也可以听听创办人怎么说:\n\n- [对谈 Project Lead of Decentraland - Ari Meilich](https://mp.weixin.qq.com/s/ke-j4UBXrj1TO-EPXa_IBg)\n- [SF WebVR/AR Monthly: Esteban Ordano - Decentraland](https://www.youtube.com/watch?v=esjFLqNx4e8)\n\n## 在 Decentraland 之上\n\nDecentraland 的架构包含三层:\n\n- Consensus layer(共识层):管理土地(所有权、内容的连结等)和 MANA 代币。\n- Land content layer(内容层):透过分布式的档案系统储存内容。\n- Real-time layer(实时呈现层):让使用者能实际体验这个虚拟世界(所有土地上的内容),并与其他使用者彼此互动。\n\n\n\n### Consensus layer(共识层)\n\n#### 土地(LAND)\n\nDecentraland 使用 Ethereum 智能合约来管理土地,将土地的所有权和交易历史等记录在难以窜改的区块链上。在他们撰写的 [LAND 智能合约](https://github.com/decentraland/land) 中,定义 **土地(Land)** 为一种虚拟资产,且是不可替代的(non-fungible)。都有唯一的(x, y)座标、一个拥有者和一个参考(可以是一个 IPFS Hash 或是一个 HTTPS 网址等)连结到描述内容的文件。Decentraland Client(目前还没实作出来) 会连结这个 LAND 智能合约,取得土地最新的参考,并从参考下载描述土地上内容的文件,再将内容呈现给使用者。\n\n另外实际上 LAND 智能合约分成两部分:[LANDProxy](https://etherscan.io/address/0xf87e31492faf9a91b02ee0deaad50d51d56d5d4d#code) 和 [LANDRegistry](https://etherscan.io/address/0x7e06a9512086bc44c51c07c2bf0af338420c2a13#code),目的是让实作管理土地的 LANDRegistry 合约可以更新。使用者透过 LANDProxy 调用 LANDRegistry,当要更新 LANDRegistry 时只需重新部署并取得新的合约地址,再更新 LANDProxy 中纪录的合约地址就可以了。\n\n#### MANA\n\nDecentraland 另外使用 Ethereum 智能合约发行一种代币叫 **MANA**。MANA 是符合 ERC20 的代币,用来购买土地。起初可以透过花掉 1000 MANA 取得一块土地(MANA 会被销毁,这个角度来看购买 MANA 就像预购土地)。另外[ Genesis City 的土地在 2017 年底时透过拍卖出售](https://wiki.decentraland.org/index.php?title=The_Genesis_City_Auction)。关于购买土地详细请看 [wiki](https://wiki.decentraland.org/index.php?title=Buying_Land)。\n\n### Land content layer(内容层)\n\n每块土地都有对应的文件描述土地的内容,这份文件可用 IPFS(Inter-Planetary File System) 来储存。这让 Decentraland 的运行不需要中心化的 server,避免 single-point of faliure,且可以做到 censorship-resistance。至于 IPFS 对提供储存空间、频宽的人缺发奖励机制,未来可望用 Filecoin 这类 protocol 解决。\n\n实际上一块土地实际需要多份文件才能描述其完整的内容,这些内容包括:\n\n- 物件内容:描述土地上物件的 3D 模型、纹理或一切渲染所需要的资讯。目前官方正在开发一个[基于 A-Frame 的土地编辑器](https://blog.decentraland.org/why-we-use-a-frame-fc5c1d4c3e90)。\n- 脚本:描述的土地上的物件如何放置、移动,还有每个物件和使用者互动的行为。这让在 Decentraland 的世界中制作动画或是游戏成为可能。这个脚本语言也正在开发中。\n- P2P 互动:这部分官方描述比较模糊,应该还没定案。目的是希望使用者可以彼此互动,像是语音、讯息甚至支付的功能。可能就要描述由哪个 server 提供服务,如何使用等。\n\n### Real-time layer(实时呈现层)\n\n除了用各种 3D 渲染技术呈现内容(主要透过虚拟实境装置),还希望使用者之间可以彼此互动透过讯息或语音等。比较可行的方式是土地拥有者架设 server,让使用者透过 server 进行互动。但在 Decentraland 中使用者需要透过 centralized 的 server 才能互动,这个世界好像就不这么美丽了,所以白皮书中计划未来会开发一个 P2P 沟通系统。此外,还要开发在 Decentraland 中的支付网路,提供快速、低手续费的支付方式。用来购买 P2P 服务或奖励内容提供者。虽然已经有 MANA 这个代币,但作为一个 ERC20 代币,以目前 Ethereum 区块链网路的情况用做支付可能会又慢又贵([以太坊区块链被猫咪堵住](https://cn.bitcoin.com/archives/5678))。\n\n## 目前与未来发展\n\n\n\nDecentraland 在 2017 年 8 月才 ICO 并发行 MANA 的代币。至今与社群共同完成 Decentraland 中各街区的规划、并在部署 Land 智能合约后开放使用者取得土地所有权。整个项目还在早期,根据[官网](https://decentraland.org/)的 Roadmap,目前正进入开发阶段中的 “Iron Age“,包括要释出基于 A-Frame 的土地编辑器和脚本系统,让土地拥有者可以开始创造土地上的内容。脚本系统所能提供的功能和创造出来的使用体验,会是影响 Decentraland 发展的重要因素。目前也正在开发去中心化的[土地交易所](https://github.com/decentraland/marketplace)。未来的挑战还有快速、低手续费的支付网路和 P2P 沟通系统等。期待 Decentraland 未来的发展。\n\n## 参考资料\n\n- [Decentraland Whitepaper]()\n- [Decentraland Wiki](https://wiki.decentraland.org/index.php?title=Main_Page)\n- [Decentraland Blog](https://blog.decentraland.org/)",
"json_metadata": "{\"tags\":[\"cn\",\"decentraland\",\"blockchain\",\"ethereum\",\"vr\"],\"image\":[\"https://i.imgur.com/tnCzltI.jpg\",\"https://i.imgur.com/rDTlz5v.png\",\"https://i.imgur.com/KOlfo0g.png\",\"https://i.imgur.com/HtbJ5RU.png\"],\"links\":[\"https://decentraland.org/whitepaper.pdf\",\"https://decentraland.org/\",\"https://mp.weixin.qq.com/s/ke-j4UBXrj1TO-EPXa_IBg\",\"https://www.youtube.com/watch?v=esjFLqNx4e8\",\"https://github.com/decentraland/land\",\"https://etherscan.io/address/0xf87e31492faf9a91b02ee0deaad50d51d56d5d4d#code\",\"https://etherscan.io/address/0x7e06a9512086bc44c51c07c2bf0af338420c2a13#code\",\"https://wiki.decentraland.org/index.php?title=The_Genesis_City_Auction\",\"https://wiki.decentraland.org/index.php?title=Buying_Land\",\"https://blog.decentraland.org/why-we-use-a-frame-fc5c1d4c3e90\",\"https://cn.bitcoin.com/archives/5678\",\"https://github.com/decentraland/marketplace\",\"https://wiki.decentraland.org/index.php?title=Main_Page\",\"https://blog.decentraland.org/\"],\"app\":\"steemit/0.1\",\"format\":\"markdown\"}"
}
]
}ankarpublished a new post: ethereum-remix2018/01/22 03:32:06
ankarpublished a new post: ethereum-remix
2018/01/22 03:32:06
| parent author | |
| parent permlink | cn |
| author | ankar |
| permlink | ethereum-remix |
| title | 【Ethereum 智能合约开发笔记】编译和部署合约的第一种姿势:使用 Remix |
| body | @@ -1,15 +1,10 @@ !%5B -Remix %5D(https: @@ -30,16 +30,16 @@ tW.png)%0A + %0A%E4%B9%8B%E5%89%8D%E6%9C%89%E8%87%AA%E5%B7%B1%E5%BC%80%E5%8F%91 @@ -496,15 +496,15 @@ com/ -U7KrIxB +8Ldz9TK .png @@ -611,16 +611,45 @@ OKEN%EF%BC%89%EF%BC%9A%0A%0A + pragma solidity %5E0.4.0;%0A%0A cont @@ -939,16 +939,23 @@ ) + public %7B%0A @@ -1142,16 +1142,23 @@ _value) + public %7B%0A @@ -1800,64 +1800,43 @@ %E8%87%AA%E5%8A%A8%E7%BC%96%E8%AF%91 -%E3%80%82%E4%BC%9A%E7%9C%8B%E5%88%B0%E6%97%81%E8%BE%B9%E6%9C%89%E6%A9%98%E6%A9%98%E7%9A%84 warning%EF%BC%8C%E4%BB%A3%E8%A1%A8%E7%BC%96%E8%AF%91%E5%AE%8C%E4%BA%86%EF%BC%8C%E4%BD%86 warning %E5%8F%AF%E5%85%88%E4%B8%8D%E7%AE%A1%EF%BC%8C%E4%B8%8D%E5%BD%B1%E5%93%8D%E5%90%88%E7%BA%A6%E6%89%A7%E8%A1%8C +%EF%BC%8C%E6%97%81%E8%BE%B9%E6%B2%A1%E6%9C%89%E8%B7%B3%E5%87%BA%E7%BA%A2%E8%89%B2%E7%9A%84 ERROR %E5%B0%B1%E4%BB%A3%E8%A1%A8%E7%BC%96%E8%AF%91%E6%88%90%E5%8A%9F %E3%80%82%0A +%0A !%5B%E7%BC%96%E8%AF%91%E5%90%88%E7%BA%A6 +%E6%88%90%E5%8A%9F %5D(ht @@ -1857,15 +1857,15 @@ com/ -8kVODQS +HZx6rcr .png |
| json metadata | {"tags":["cn","blockchain","ethereum","solidity","smartcontract"],"image":["https://i.imgur.com/cpeSvtW.png","https://i.imgur.com/8Ldz9TK.png","https://i.imgur.com/hRs9XhP.png","https://i.imgur.com/HZx6rcr.png","https://i.imgur.com/s4b2Xwo.png","https://i.imgur.com/RD1ZQTc.png","https://i.imgur.com/QEEJNBb.png","https://i.imgur.com/bsDeerq.png","https://i.imgur.com/OK0OKJi.png","https://i.imgur.com/xhpkjSS.png","https://i.imgur.com/kboosK7.png","https://i.imgur.com/D4sArGs.png","https://i.imgur.com/5f0dHwl.png","https://i.imgur.com/kn6TCCL.png","https://i.imgur.com/JSuJo5z.png","https://i.imgur.com/TFDNEMw.png","https://i.imgur.com/7Tnp9GQ.png","https://i.imgur.com/ZAwCW5E.png","https://i.imgur.com/6vJYX9A.png","https://i.imgur.com/XYjK7Ck.png","https://i.imgur.com/Q64wrRT.png"],"links":["https://remix.ethereum.org","https://github.com/ethereum/remix","https://solidity.readthedocs.io/en/develop/","https://www.ethereum.org/token","https://metamask.io/","https://medium.com/taipei-ethereum-meetup/%E6%95%99%E7%B7%B4-%E6%88%91-%E5%8F%AA-%E6%83%B3%E5%AD%B8solidity-92b7ba8054f5","https://blog.zeppelin.solutions/designing-the-architecture-for-your-ethereum-application-9cec086f8317","http://truffleframework.com/tutorials/building-testing-frontend-app-truffle-3","http://truffle.tryblockchain.org/truffle3.0-integrate-nodejs.html","https://medium.com/taipei-ethereum-meetup/%E5%88%A9%E7%94%A8%E5%B7%A5%E5%85%B7%E5%8A%A0%E9%80%9Fdapp%E5%BB%BA%E7%BD%AE%E5%92%8C%E6%B8%AC%E8%A9%A6-fb08e77f208e"],"app":"steemit/0.1","format":"markdown"} |
| Transaction Info | Block #19189999/Trx fe71029debf0c2e42048967dabe3d758023f4630 |
View Raw JSON Data
{
"trx_id": "fe71029debf0c2e42048967dabe3d758023f4630",
"block": 19189999,
"trx_in_block": 27,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-22T03:32:06",
"op": [
"comment",
{
"parent_author": "",
"parent_permlink": "cn",
"author": "ankar",
"permlink": "ethereum-remix",
"title": "【Ethereum 智能合约开发笔记】编译和部署合约的第一种姿势:使用 Remix",
"body": "@@ -1,15 +1,10 @@\n !%5B\n-Remix\n %5D(https:\n@@ -30,16 +30,16 @@\n tW.png)%0A\n+\n %0A%E4%B9%8B%E5%89%8D%E6%9C%89%E8%87%AA%E5%B7%B1%E5%BC%80%E5%8F%91\n@@ -496,15 +496,15 @@\n com/\n-U7KrIxB\n+8Ldz9TK\n .png\n@@ -611,16 +611,45 @@\n OKEN%EF%BC%89%EF%BC%9A%0A%0A\n+ pragma solidity %5E0.4.0;%0A%0A\n cont\n@@ -939,16 +939,23 @@\n )\n+ public\n %7B%0A \n@@ -1142,16 +1142,23 @@\n _value)\n+ public\n %7B%0A \n@@ -1800,64 +1800,43 @@\n %E8%87%AA%E5%8A%A8%E7%BC%96%E8%AF%91\n-%E3%80%82%E4%BC%9A%E7%9C%8B%E5%88%B0%E6%97%81%E8%BE%B9%E6%9C%89%E6%A9%98%E6%A9%98%E7%9A%84 warning%EF%BC%8C%E4%BB%A3%E8%A1%A8%E7%BC%96%E8%AF%91%E5%AE%8C%E4%BA%86%EF%BC%8C%E4%BD%86 warning %E5%8F%AF%E5%85%88%E4%B8%8D%E7%AE%A1%EF%BC%8C%E4%B8%8D%E5%BD%B1%E5%93%8D%E5%90%88%E7%BA%A6%E6%89%A7%E8%A1%8C\n+%EF%BC%8C%E6%97%81%E8%BE%B9%E6%B2%A1%E6%9C%89%E8%B7%B3%E5%87%BA%E7%BA%A2%E8%89%B2%E7%9A%84 ERROR %E5%B0%B1%E4%BB%A3%E8%A1%A8%E7%BC%96%E8%AF%91%E6%88%90%E5%8A%9F\n %E3%80%82%0A\n+%0A\n !%5B%E7%BC%96%E8%AF%91%E5%90%88%E7%BA%A6\n+%E6%88%90%E5%8A%9F\n %5D(ht\n@@ -1857,15 +1857,15 @@\n com/\n-8kVODQS\n+HZx6rcr\n .png\n",
"json_metadata": "{\"tags\":[\"cn\",\"blockchain\",\"ethereum\",\"solidity\",\"smartcontract\"],\"image\":[\"https://i.imgur.com/cpeSvtW.png\",\"https://i.imgur.com/8Ldz9TK.png\",\"https://i.imgur.com/hRs9XhP.png\",\"https://i.imgur.com/HZx6rcr.png\",\"https://i.imgur.com/s4b2Xwo.png\",\"https://i.imgur.com/RD1ZQTc.png\",\"https://i.imgur.com/QEEJNBb.png\",\"https://i.imgur.com/bsDeerq.png\",\"https://i.imgur.com/OK0OKJi.png\",\"https://i.imgur.com/xhpkjSS.png\",\"https://i.imgur.com/kboosK7.png\",\"https://i.imgur.com/D4sArGs.png\",\"https://i.imgur.com/5f0dHwl.png\",\"https://i.imgur.com/kn6TCCL.png\",\"https://i.imgur.com/JSuJo5z.png\",\"https://i.imgur.com/TFDNEMw.png\",\"https://i.imgur.com/7Tnp9GQ.png\",\"https://i.imgur.com/ZAwCW5E.png\",\"https://i.imgur.com/6vJYX9A.png\",\"https://i.imgur.com/XYjK7Ck.png\",\"https://i.imgur.com/Q64wrRT.png\"],\"links\":[\"https://remix.ethereum.org\",\"https://github.com/ethereum/remix\",\"https://solidity.readthedocs.io/en/develop/\",\"https://www.ethereum.org/token\",\"https://metamask.io/\",\"https://medium.com/taipei-ethereum-meetup/%E6%95%99%E7%B7%B4-%E6%88%91-%E5%8F%AA-%E6%83%B3%E5%AD%B8solidity-92b7ba8054f5\",\"https://blog.zeppelin.solutions/designing-the-architecture-for-your-ethereum-application-9cec086f8317\",\"http://truffleframework.com/tutorials/building-testing-frontend-app-truffle-3\",\"http://truffle.tryblockchain.org/truffle3.0-integrate-nodejs.html\",\"https://medium.com/taipei-ethereum-meetup/%E5%88%A9%E7%94%A8%E5%B7%A5%E5%85%B7%E5%8A%A0%E9%80%9Fdapp%E5%BB%BA%E7%BD%AE%E5%92%8C%E6%B8%AC%E8%A9%A6-fb08e77f208e\"],\"app\":\"steemit/0.1\",\"format\":\"markdown\"}"
}
]
}ankarclaimed reward balance: 0.017 SBD, 0.005 SP2018/01/17 08:46:54
ankarclaimed reward balance: 0.017 SBD, 0.005 SP
2018/01/17 08:46:54
| account | ankar |
| reward steem | 0.000 STEEM |
| reward sbd | 0.017 SBD |
| reward vests | 8.190552 VESTS |
| Transaction Info | Block #19052361/Trx 64f89adff33fcd6050d804189636f04f3187a562 |
View Raw JSON Data
{
"trx_id": "64f89adff33fcd6050d804189636f04f3187a562",
"block": 19052361,
"trx_in_block": 65,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-17T08:46:54",
"op": [
"claim_reward_balance",
{
"account": "ankar",
"reward_steem": "0.000 STEEM",
"reward_sbd": "0.017 SBD",
"reward_vests": "8.190552 VESTS"
}
]
}ankarpublished a new post: ethereum-remix2018/01/17 08:46:27
ankarpublished a new post: ethereum-remix
2018/01/17 08:46:27
| parent author | |
| parent permlink | cn |
| author | ankar |
| permlink | ethereum-remix |
| title | 【Ethereum 智能合约开发笔记】编译和部署合约的第一种姿势:使用 Remix |
| body |  之前有自己开发过 Ethereum 智能合约,但没有好好纪录开发的过程和碰到的问题,觉得满可惜。这次想重新开始,从最傻的姿势开始,一步步成长。**本篇希望将一个很简单的代币合约(只能发行和转帐),部署在本地和测试网路上,并测试其功能。**本篇是较详细描述使用 Remix 的步骤及使用上可能碰到的问题。 ## 开发环境 > **不需要安装**,直接在任何浏览器开启 [Remix](https://remix.ethereum.org)。 Remix 是一个 [Open Source](https://github.com/ethereum/remix) 的 [Solidity](https://solidity.readthedocs.io/en/develop/) 智能合约开发环境,提供基本的编译、部署至本地或测试网路、执行合约等功能。Solidity 是 Ethereum 官方设计和支援的程式语言,专门用于编写智能合约。  ## 取得代币合约 代币合约的范例很多,[Ethereum 官网](https://www.ethereum.org/token)有提供一个最小可行的代币合约(MINIMUM VIABLE TOKEN): contract MyToken { /* This creates an array with all balances */ mapping (address => uint256) public balanceOf; /* Initializes contract with initial supply tokens to the creator of the contract */ function MyToken( uint256 initialSupply ) { balanceOf[msg.sender] = initialSupply; // Give the creator all initial tokens } /* Send coins */ function transfer(address _to, uint256 _value) { require(balanceOf[msg.sender] >= _value); // Check if the sender has enough require(balanceOf[_to] + _value >= balanceOf[_to]); // Check for overflows balanceOf[msg.sender] -= _value; // Subtract from the sender balanceOf[_to] += _value; // Add the same to the recipient } } 这个 MyToken 合约真的很傻,只能做两件事: - 创造代币:发起合约时创造指定数量的代币,代币拥有者是发起合约的 Ethereum 帐户 - 转移代币:转移指定数量的代币到指定的 Ethereum 帐户 --- ## 使用 Remix 编译合约 #### 1. 点选右上角 **+** 新增一个档案 名称任意只要副档名是 ".sol"。  #### 2. 复制合约内容到该档案并编译 Remix 预设会自动编译。会看到旁边有橘橘的 warning,代表编译完了,但 warning 可先不管,不影响合约执行。  ## 在本地部署合约 #### 1. 设定网路 点选左边上面的 **run**。  Environment 选择 **JavaScript VM** 代表所有资料都是存在本地记忆体(功能类似 testrpc)。它会提供 5 个虚拟帐户每个有 100 ETH,随便选一个帐户(要记住)。  #### 2. 发送交易部署合约 选择 **MyToken**。可以看到 **create** 按钮。且已根据合约内容显示必须填入 `initialSupply`(也就是要发行的代币数量)。输入一个数目并按 **create**,就会发送交易部署合约。  合约部署成功后,可以看到合约的使用介面。Remix 会自动根据合约的内容,产生对应的合约使用介面。可以看到合约有两个功能:**balanceOf(查询余额)** 和 **transfer(转移代币)**。  底下可以看到 log(纪录每一次的操作)。实际上部署合约是透过一个 Ethereum 交易完成,点 **Details** 可以看到该笔交易详细资料。  --- ## 执行合约 - 查询余额 #### 1. 选择刚刚发起合约的帐户  #### 2. 输入帐户 注意要用 **""** 把帐户包起来,范例: "0xca35b7d915458ef540ade6068dfe2f44e8fa733c" #### 3. 点击 **balanceOf** 可以在旁边看到执行结果,也就是目前这个帐户的代币余额。  #### 错误情况 说明一下,因为资料传送是用 JSON 格式,所以要加上 ""。如果忘记输入 "" 就会在 log 看到错误:  ### 执行合约 - 转移代币 #### 1. 选择要转出的帐户 选择刚刚发起合约的帐户。  #### 2. 输入要转入的帐户 选择并复制另一个帐户。在合约介面 **transfer** 后面的栏位,输入**转入帐户**和要**转移的代币数量**。帐户同样用 "" 包起来,范例: "0x4b0897b0513fdc7c541b6d9d7e929c4e5364d2db", 10 #### 3. 点击 **transfer** 点击 **transfer**,成功后会看到 log 更新。  #### 4. 确认余额更新 再查询转入帐户的余额,就可以看到代币余额增加啦!  #### 错误情况 如果选择要转出的帐户代币余额不足,这笔交易会失败,就会在 log 看到错误。  --- ## 在测试网路部署合约 #### 1. 安装 [MetaMask](https://metamask.io/) 首先,要连到测试网路,就要安装 [MetaMask](https://metamask.io/)。他是浏览器端的 Ethereum 钱包,可以连结 Ethereum 主要和测试网路。安奘后需要建立 Ethereum 帐户,[教练,我”只”想学Solidity](https://medium.com/taipei-ethereum-meetup/%E6%95%99%E7%B7%B4-%E6%88%91-%E5%8F%AA-%E6%83%B3%E5%AD%B8solidity-92b7ba8054f5) 这篇有详细的步骤。    #### 2. 选择测试网路 回到 Remix,这次 Environment 选择 **Injected Web3**,Remix 会自动连结 MetaMask。  #### 3. 部署合约 接著用刚才同样的方式,按 **create** 部署合约,就会看到 MetaMask 的弹出视窗。直接按 **submit** 发送交易。  稍等一点时间(因为要等这个交易被确认),部署成功后合约的使用介面就会跑出来。  就可以用同样的方式使用合约啦! --- ## 总结 Remix 提供一个 Solidity 智能合约的开发环境,可以简易的编译、部署、执行甚至除错,适合编程经验不多的初学者。但无法做到版本控制、测试及和其他开发工具一起使用等,实际要开发 [DApp](https://blog.zeppelin.solutions/designing-the-architecture-for-your-ethereum-application-9cec086f8317) 的话会比较不方便。下一篇会参考以下文章: - [BUILDING AND TESTING A FRONTEND APP WITH TRUFFLE](http://truffleframework.com/tutorials/building-testing-frontend-app-truffle-3) - [Truffle3.0集成NodeJS并完全跑通(附详细实例,可能的错误)](http://truffle.tryblockchain.org/truffle3.0-integrate-nodejs.html) - [利用工具加速Dapp建置和测试](https://medium.com/taipei-ethereum-meetup/%E5%88%A9%E7%94%A8%E5%B7%A5%E5%85%B7%E5%8A%A0%E9%80%9Fdapp%E5%BB%BA%E7%BD%AE%E5%92%8C%E6%B8%AC%E8%A9%A6-fb08e77f208e) 使用 Truffle3、Ganache、web3.js 来编译和部署合约。 |
| json metadata | {"tags":["cn","blockchain","ethereum","solidity","smartcontract"],"image":["https://i.imgur.com/cpeSvtW.png","https://i.imgur.com/U7KrIxB.png","https://i.imgur.com/hRs9XhP.png","https://i.imgur.com/8kVODQS.png","https://i.imgur.com/s4b2Xwo.png","https://i.imgur.com/RD1ZQTc.png","https://i.imgur.com/QEEJNBb.png","https://i.imgur.com/bsDeerq.png","https://i.imgur.com/OK0OKJi.png","https://i.imgur.com/xhpkjSS.png","https://i.imgur.com/kboosK7.png","https://i.imgur.com/D4sArGs.png","https://i.imgur.com/5f0dHwl.png","https://i.imgur.com/kn6TCCL.png","https://i.imgur.com/JSuJo5z.png","https://i.imgur.com/TFDNEMw.png","https://i.imgur.com/7Tnp9GQ.png","https://i.imgur.com/ZAwCW5E.png","https://i.imgur.com/6vJYX9A.png","https://i.imgur.com/XYjK7Ck.png","https://i.imgur.com/Q64wrRT.png"],"links":["https://remix.ethereum.org","https://github.com/ethereum/remix","https://solidity.readthedocs.io/en/develop/","https://www.ethereum.org/token","https://metamask.io/","https://medium.com/taipei-ethereum-meetup/%E6%95%99%E7%B7%B4-%E6%88%91-%E5%8F%AA-%E6%83%B3%E5%AD%B8solidity-92b7ba8054f5","https://blog.zeppelin.solutions/designing-the-architecture-for-your-ethereum-application-9cec086f8317","http://truffleframework.com/tutorials/building-testing-frontend-app-truffle-3","http://truffle.tryblockchain.org/truffle3.0-integrate-nodejs.html","https://medium.com/taipei-ethereum-meetup/%E5%88%A9%E7%94%A8%E5%B7%A5%E5%85%B7%E5%8A%A0%E9%80%9Fdapp%E5%BB%BA%E7%BD%AE%E5%92%8C%E6%B8%AC%E8%A9%A6-fb08e77f208e"],"app":"steemit/0.1","format":"markdown"} |
| Transaction Info | Block #19052352/Trx b7cfed195891f83c353215701e6dcd89c726e2ba |
View Raw JSON Data
{
"trx_id": "b7cfed195891f83c353215701e6dcd89c726e2ba",
"block": 19052352,
"trx_in_block": 4,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-17T08:46:27",
"op": [
"comment",
{
"parent_author": "",
"parent_permlink": "cn",
"author": "ankar",
"permlink": "ethereum-remix",
"title": "【Ethereum 智能合约开发笔记】编译和部署合约的第一种姿势:使用 Remix",
"body": "\n\n之前有自己开发过 Ethereum 智能合约,但没有好好纪录开发的过程和碰到的问题,觉得满可惜。这次想重新开始,从最傻的姿势开始,一步步成长。**本篇希望将一个很简单的代币合约(只能发行和转帐),部署在本地和测试网路上,并测试其功能。**本篇是较详细描述使用 Remix 的步骤及使用上可能碰到的问题。\n\n## 开发环境\n\n> **不需要安装**,直接在任何浏览器开启 [Remix](https://remix.ethereum.org)。\n\nRemix 是一个 [Open Source](https://github.com/ethereum/remix) 的 [Solidity](https://solidity.readthedocs.io/en/develop/) 智能合约开发环境,提供基本的编译、部署至本地或测试网路、执行合约等功能。Solidity 是 Ethereum 官方设计和支援的程式语言,专门用于编写智能合约。\n\n\n\n## 取得代币合约\n\n代币合约的范例很多,[Ethereum 官网](https://www.ethereum.org/token)有提供一个最小可行的代币合约(MINIMUM VIABLE TOKEN):\n\n contract MyToken {\n /* This creates an array with all balances */\n mapping (address => uint256) public balanceOf;\n\n /* Initializes contract with initial supply tokens to the creator of the contract */\n function MyToken(\n uint256 initialSupply\n ) {\n balanceOf[msg.sender] = initialSupply; // Give the creator all initial tokens\n }\n\n /* Send coins */\n function transfer(address _to, uint256 _value) {\n require(balanceOf[msg.sender] >= _value); // Check if the sender has enough\n require(balanceOf[_to] + _value >= balanceOf[_to]); // Check for overflows\n balanceOf[msg.sender] -= _value; // Subtract from the sender\n balanceOf[_to] += _value; // Add the same to the recipient\n }\n }\n\n这个 MyToken 合约真的很傻,只能做两件事:\n- 创造代币:发起合约时创造指定数量的代币,代币拥有者是发起合约的 Ethereum 帐户\n- 转移代币:转移指定数量的代币到指定的 Ethereum 帐户\n\n---\n\n## 使用 Remix 编译合约\n\n#### 1. 点选右上角 **+** 新增一个档案\n名称任意只要副档名是 \".sol\"。\n\n\n\n#### 2. 复制合约内容到该档案并编译\nRemix 预设会自动编译。会看到旁边有橘橘的 warning,代表编译完了,但 warning 可先不管,不影响合约执行。\n\n\n## 在本地部署合约\n\n#### 1. 设定网路\n点选左边上面的 **run**。\n\n\n\nEnvironment 选择 **JavaScript VM** 代表所有资料都是存在本地记忆体(功能类似 testrpc)。它会提供 5 个虚拟帐户每个有 100 ETH,随便选一个帐户(要记住)。\n\n\n\n#### 2. 发送交易部署合约\n选择 **MyToken**。可以看到 **create** 按钮。且已根据合约内容显示必须填入 `initialSupply`(也就是要发行的代币数量)。输入一个数目并按 **create**,就会发送交易部署合约。\n\n\n\n合约部署成功后,可以看到合约的使用介面。Remix 会自动根据合约的内容,产生对应的合约使用介面。可以看到合约有两个功能:**balanceOf(查询余额)** 和 **transfer(转移代币)**。\n\n\n\n底下可以看到 log(纪录每一次的操作)。实际上部署合约是透过一个 Ethereum 交易完成,点 **Details** 可以看到该笔交易详细资料。\n\n\n---\n\n## 执行合约 - 查询余额\n\n#### 1. 选择刚刚发起合约的帐户\n\n\n#### 2. 输入帐户\n注意要用 **\"\"** 把帐户包起来,范例:\n\n \"0xca35b7d915458ef540ade6068dfe2f44e8fa733c\"\n\n#### 3. 点击 **balanceOf**\n可以在旁边看到执行结果,也就是目前这个帐户的代币余额。\n\n\n#### 错误情况\n说明一下,因为资料传送是用 JSON 格式,所以要加上 \"\"。如果忘记输入 \"\" 就会在 log 看到错误:\n\n\n\n### 执行合约 - 转移代币\n\n#### 1. 选择要转出的帐户\n\n选择刚刚发起合约的帐户。\n\n\n\n\n#### 2. 输入要转入的帐户\n选择并复制另一个帐户。在合约介面 **transfer** 后面的栏位,输入**转入帐户**和要**转移的代币数量**。帐户同样用 \"\" 包起来,范例:\n \n \"0x4b0897b0513fdc7c541b6d9d7e929c4e5364d2db\", 10\n\n#### 3. 点击 **transfer**\n点击 **transfer**,成功后会看到 log 更新。\n\n\n#### 4. 确认余额更新\n再查询转入帐户的余额,就可以看到代币余额增加啦!\n\n\n#### 错误情况\n如果选择要转出的帐户代币余额不足,这笔交易会失败,就会在 log 看到错误。\n\n\n---\n\n## 在测试网路部署合约\n\n#### 1. 安装 [MetaMask](https://metamask.io/)\n首先,要连到测试网路,就要安装 [MetaMask](https://metamask.io/)。他是浏览器端的 Ethereum 钱包,可以连结 Ethereum 主要和测试网路。安奘后需要建立 Ethereum 帐户,[教练,我”只”想学Solidity](https://medium.com/taipei-ethereum-meetup/%E6%95%99%E7%B7%B4-%E6%88%91-%E5%8F%AA-%E6%83%B3%E5%AD%B8solidity-92b7ba8054f5) 这篇有详细的步骤。\n\n\n\n\n\n\n\n#### 2. 选择测试网路\n回到 Remix,这次 Environment 选择 **Injected Web3**,Remix 会自动连结 MetaMask。\n\n\n\n#### 3. 部署合约\n接著用刚才同样的方式,按 **create** 部署合约,就会看到 MetaMask 的弹出视窗。直接按 **submit** 发送交易。\n\n\n\n稍等一点时间(因为要等这个交易被确认),部署成功后合约的使用介面就会跑出来。\n\n\n\n就可以用同样的方式使用合约啦!\n\n---\n\n## 总结\n\nRemix 提供一个 Solidity 智能合约的开发环境,可以简易的编译、部署、执行甚至除错,适合编程经验不多的初学者。但无法做到版本控制、测试及和其他开发工具一起使用等,实际要开发 [DApp](https://blog.zeppelin.solutions/designing-the-architecture-for-your-ethereum-application-9cec086f8317) 的话会比较不方便。下一篇会参考以下文章:\n- [BUILDING AND TESTING A FRONTEND APP WITH TRUFFLE](http://truffleframework.com/tutorials/building-testing-frontend-app-truffle-3)\n\n- [Truffle3.0集成NodeJS并完全跑通(附详细实例,可能的错误)](http://truffle.tryblockchain.org/truffle3.0-integrate-nodejs.html)\n\n- [利用工具加速Dapp建置和测试](https://medium.com/taipei-ethereum-meetup/%E5%88%A9%E7%94%A8%E5%B7%A5%E5%85%B7%E5%8A%A0%E9%80%9Fdapp%E5%BB%BA%E7%BD%AE%E5%92%8C%E6%B8%AC%E8%A9%A6-fb08e77f208e)\n\n使用 Truffle3、Ganache、web3.js 来编译和部署合约。",
"json_metadata": "{\"tags\":[\"cn\",\"blockchain\",\"ethereum\",\"solidity\",\"smartcontract\"],\"image\":[\"https://i.imgur.com/cpeSvtW.png\",\"https://i.imgur.com/U7KrIxB.png\",\"https://i.imgur.com/hRs9XhP.png\",\"https://i.imgur.com/8kVODQS.png\",\"https://i.imgur.com/s4b2Xwo.png\",\"https://i.imgur.com/RD1ZQTc.png\",\"https://i.imgur.com/QEEJNBb.png\",\"https://i.imgur.com/bsDeerq.png\",\"https://i.imgur.com/OK0OKJi.png\",\"https://i.imgur.com/xhpkjSS.png\",\"https://i.imgur.com/kboosK7.png\",\"https://i.imgur.com/D4sArGs.png\",\"https://i.imgur.com/5f0dHwl.png\",\"https://i.imgur.com/kn6TCCL.png\",\"https://i.imgur.com/JSuJo5z.png\",\"https://i.imgur.com/TFDNEMw.png\",\"https://i.imgur.com/7Tnp9GQ.png\",\"https://i.imgur.com/ZAwCW5E.png\",\"https://i.imgur.com/6vJYX9A.png\",\"https://i.imgur.com/XYjK7Ck.png\",\"https://i.imgur.com/Q64wrRT.png\"],\"links\":[\"https://remix.ethereum.org\",\"https://github.com/ethereum/remix\",\"https://solidity.readthedocs.io/en/develop/\",\"https://www.ethereum.org/token\",\"https://metamask.io/\",\"https://medium.com/taipei-ethereum-meetup/%E6%95%99%E7%B7%B4-%E6%88%91-%E5%8F%AA-%E6%83%B3%E5%AD%B8solidity-92b7ba8054f5\",\"https://blog.zeppelin.solutions/designing-the-architecture-for-your-ethereum-application-9cec086f8317\",\"http://truffleframework.com/tutorials/building-testing-frontend-app-truffle-3\",\"http://truffle.tryblockchain.org/truffle3.0-integrate-nodejs.html\",\"https://medium.com/taipei-ethereum-meetup/%E5%88%A9%E7%94%A8%E5%B7%A5%E5%85%B7%E5%8A%A0%E9%80%9Fdapp%E5%BB%BA%E7%BD%AE%E5%92%8C%E6%B8%AC%E8%A9%A6-fb08e77f208e\"],\"app\":\"steemit/0.1\",\"format\":\"markdown\"}"
}
]
}cheetahreplied to @ankar / cheetah-re-ankarethereum-remix2018/01/17 08:45:51
cheetahreplied to @ankar / cheetah-re-ankarethereum-remix
2018/01/17 08:45:51
| parent author | ankar |
| parent permlink | ethereum-remix |
| author | cheetah |
| permlink | cheetah-re-ankarethereum-remix |
| title | |
| body | Hi! I am a robot. I just upvoted you! I found similar content that readers might be interested in: https://www.jianshu.com/p/e1bae30a998f |
| json metadata | |
| Transaction Info | Block #19052340/Trx cacdcf3d88715f9d46c34846e316ecdc34e78bf8 |
View Raw JSON Data
{
"trx_id": "cacdcf3d88715f9d46c34846e316ecdc34e78bf8",
"block": 19052340,
"trx_in_block": 72,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-17T08:45:51",
"op": [
"comment",
{
"parent_author": "ankar",
"parent_permlink": "ethereum-remix",
"author": "cheetah",
"permlink": "cheetah-re-ankarethereum-remix",
"title": "",
"body": "Hi! I am a robot. I just upvoted you! I found similar content that readers might be interested in:\nhttps://www.jianshu.com/p/e1bae30a998f",
"json_metadata": ""
}
]
}cheetahupvoted (0.08%) @ankar / ethereum-remix2018/01/17 08:45:48
cheetahupvoted (0.08%) @ankar / ethereum-remix
2018/01/17 08:45:48
| voter | cheetah |
| author | ankar |
| permlink | ethereum-remix |
| weight | 8 (0.08%) |
| Transaction Info | Block #19052339/Trx a2c774cff7ab1c57c153d2a9b3f594ec9b42ad59 |
View Raw JSON Data
{
"trx_id": "a2c774cff7ab1c57c153d2a9b3f594ec9b42ad59",
"block": 19052339,
"trx_in_block": 16,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-17T08:45:48",
"op": [
"vote",
{
"voter": "cheetah",
"author": "ankar",
"permlink": "ethereum-remix",
"weight": 8
}
]
}cn-naughty.boyreplied to @ankar / 20180117t084517806z-post2018/01/17 08:45:33
cn-naughty.boyreplied to @ankar / 20180117t084517806z-post
2018/01/17 08:45:33
| parent author | ankar |
| parent permlink | ethereum-remix |
| author | cn-naughty.boy |
| permlink | 20180117t084517806z-post |
| title | |
| body | 沙发! |
| json metadata | {"tags":["cn"]} |
| Transaction Info | Block #19052334/Trx f2728a9c8a2759673e8d83a304d8e2967ec08a66 |
View Raw JSON Data
{
"trx_id": "f2728a9c8a2759673e8d83a304d8e2967ec08a66",
"block": 19052334,
"trx_in_block": 51,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-17T08:45:33",
"op": [
"comment",
{
"parent_author": "ankar",
"parent_permlink": "ethereum-remix",
"author": "cn-naughty.boy",
"permlink": "20180117t084517806z-post",
"title": "",
"body": "沙发!",
"json_metadata": "{\"tags\":[\"cn\"]}"
}
]
}cn-naughty.boyupvoted (7.91%) @ankar / ethereum-remix2018/01/17 08:45:30
cn-naughty.boyupvoted (7.91%) @ankar / ethereum-remix
2018/01/17 08:45:30
| voter | cn-naughty.boy |
| author | ankar |
| permlink | ethereum-remix |
| weight | 791 (7.91%) |
| Transaction Info | Block #19052333/Trx feafcc46711f0683bdbda2ce3f416745fa24ac21 |
View Raw JSON Data
{
"trx_id": "feafcc46711f0683bdbda2ce3f416745fa24ac21",
"block": 19052333,
"trx_in_block": 52,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-17T08:45:30",
"op": [
"vote",
{
"voter": "cn-naughty.boy",
"author": "ankar",
"permlink": "ethereum-remix",
"weight": 791
}
]
}ankarpublished a new post: ethereum-remix2018/01/17 08:45:24
ankarpublished a new post: ethereum-remix
2018/01/17 08:45:24
| parent author | |
| parent permlink | cn |
| author | ankar |
| permlink | ethereum-remix |
| title | 【Ethereum 智能合约开发笔记】编译和部署合约的第一种姿势:使用 Remix |
| body |  之前有自己开发过 Ethereum 智能合约,但没有好好纪录开发的过程和碰到的问题,觉得满可惜。这次想重新开始,从最傻的姿势开始,一步步成长。**本篇希望将一个很简单的代币合约(只能发行和转帐),部署在本地和测试网路上,并测试其功能。**本篇是较详细描述使用 Remix 的步骤及使用上可能碰到的问题。 ## 开发环境 > **不需要安装**,直接在任何浏览器开启 [Remix](https://remix.ethereum.org)。 Remix 是一个 [Open Source](https://github.com/ethereum/remix) 的 [Solidity](https://solidity.readthedocs.io/en/develop/) 智能合约开发环境,提供基本的编译、部署至本地或测试网路、执行合约等功能。Solidity 是 Ethereum 官方设计和支援的程式语言,专门用于编写智能合约。  ## 取得代币合约 代币合约的范例很多,[Ethereum 官网](https://www.ethereum.org/token)有提供一个最小可行的代币合约(MINIMUM VIABLE TOKEN): contract MyToken { /* This creates an array with all balances */ mapping (address => uint256) public balanceOf; /* Initializes contract with initial supply tokens to the creator of the contract */ function MyToken( uint256 initialSupply ) { balanceOf[msg.sender] = initialSupply; // Give the creator all initial tokens } /* Send coins */ function transfer(address _to, uint256 _value) { require(balanceOf[msg.sender] >= _value); // Check if the sender has enough require(balanceOf[_to] + _value >= balanceOf[_to]); // Check for overflows balanceOf[msg.sender] -= _value; // Subtract from the sender balanceOf[_to] += _value; // Add the same to the recipient } } 这个 MyToken 合约真的很傻,只能做两件事: - 创造代币:发起合约时创造指定数量的代币,代币拥有者是发起合约的 Ethereum 帐户 - 转移代币:转移指定数量的代币到指定的 Ethereum 帐户 --- ## 使用 Remix 编译合约 #### 1. 点选右上角 **+** 新增一个档案 名称任意只要副档名是 ".sol"。  #### 2. 复制合约内容到该档案并编译 Remix 预设会自动编译。会看到旁边有橘橘的 warning,代表编译完了,但 warning 可先不管,不影响合约执行。  ## 在本地部署合约 #### 1. 设定网路 点选左边上面的 **run**。  Environment 选择 **JavaScript VM** 代表所有资料都是存在本地记忆体(功能类似 testrpc)。它会提供 5 个虚拟帐户每个有 100 ETH,随便选一个帐户(要记住)。  #### 2. 发送交易部署合约 选择 **MyToken**。可以看到 **create** 按钮。且已根据合约内容显示必须填入 `initialSupply`(也就是要发行的代币数量)。输入一个数目并按 **create**,就会发送交易部署合约。  合约部署成功后,可以看到合约的使用介面。Remix 会自动根据合约的内容,产生对应的合约使用介面。可以看到合约有两个功能:**balanceOf(查询余额)** 和 **transfer(转移代币)**。  底下可以看到 log(纪录每一次的操作)。实际上部署合约是透过一个 Ethereum 交易完成,点 **Details** 可以看到该笔交易详细资料。  --- ## 执行合约 - 查询余额 #### 1. 选择刚刚发起合约的帐户  #### 2. 输入帐户 注意要用 **""** 把帐户包起来,范例: "0xca35b7d915458ef540ade6068dfe2f44e8fa733c" #### 3. 点击 **balanceOf** 可以在旁边看到执行结果,也就是目前这个帐户的代币余额。  #### 错误情况 说明一下,因为资料传送是用 JSON 格式,所以要加上 ""。如果忘记输入 "" 就会在 log 看到错误:  ### 执行合约 - 转移代币 #### 1. 选择要转出的帐户 选择刚刚发起合约的帐户。  #### 2. 输入要转入的帐户 选择并复制另一个帐户。在合约介面 **transfer** 后面的栏位,输入**转入帐户**和要**转移的代币数量**。帐户同样用 "" 包起来,范例: "0x4b0897b0513fdc7c541b6d9d7e929c4e5364d2db", 10 #### 3. 点击 **transfer** 点击 **transfer**,成功后会看到 log 更新。  #### 4. 确认余额更新 再查询转入帐户的余额,就可以看到代币余额增加啦!  #### 错误情况 如果选择要转出的帐户代币余额不足,这笔交易会失败,就会在 log 看到错误。  --- ## 在测试网路部署合约 #### 1. 安装 [MetaMask](https://metamask.io/) 首先,要连到测试网路,就要安装 [MetaMask](https://metamask.io/)。他是浏览器端的 Ethereum 钱包,可以连结 Ethereum 主要和测试网路。安奘后需要建立 Ethereum 帐户,[教练,我”只”想学Solidity](https://medium.com/taipei-ethereum-meetup/%E6%95%99%E7%B7%B4-%E6%88%91-%E5%8F%AA-%E6%83%B3%E5%AD%B8solidity-92b7ba8054f5) 这篇有详细的步骤。    #### 2. 选择测试网路 回到 Remix,这次 Environment 选择 **Injected Web3**,Remix 会自动连结 MetaMask。  #### 3. 部署合约 接著用刚才同样的方式,按 **create** 部署合约,就会看到 MetaMask 的弹出视窗。直接按 **submit** 发送交易。  稍等一点时间(因为要等这个交易被确认),部署成功后合约的使用介面就会跑出来。  就可以用同样的方式使用合约啦! --- ## 总结 Remix 提供一个 Solidity 智能合约的开发环境,可以简易的编译、部署、执行甚至除错,适合编程经验不多的初学者。但无法做到版本控制、测试及和其他开发工具一起使用等,实际要开发 [DApp](https://blog.zeppelin.solutions/designing-the-architecture-for-your-ethereum-application-9cec086f8317) 的话会比较不方便。下一篇会参考以下文章: - [BUILDING AND TESTING A FRONTEND APP WITH TRUFFLE](http://truffleframework.com/tutorials/building-testing-frontend-app-truffle-3) - [Truffle3.0集成NodeJS并完全跑通(附详细实例,可能的错误)](http://truffle.tryblockchain.org/truffle3.0-integrate-nodejs.html) - [利用工具加速Dapp建置和测试](https://medium.com/taipei-ethereum-meetup/%E5%88%A9%E7%94%A8%E5%B7%A5%E5%85%B7%E5%8A%A0%E9%80%9Fdapp%E5%BB%BA%E7%BD%AE%E5%92%8C%E6%B8%AC%E8%A9%A6-fb08e77f208e) 使用 Truffle3、Ganache、web3.js 来编译和部署合约。 |
| json metadata | {"tags":["cn","blockchain","ethereum","solidity","smart-contract"],"image":["https://i.imgur.com/cpeSvtW.png","https://i.imgur.com/U7KrIxB.png","https://i.imgur.com/hRs9XhP.png","https://i.imgur.com/8kVODQS.png","https://i.imgur.com/s4b2Xwo.png","https://i.imgur.com/RD1ZQTc.png","https://i.imgur.com/QEEJNBb.png","https://i.imgur.com/bsDeerq.png","https://i.imgur.com/OK0OKJi.png","https://i.imgur.com/xhpkjSS.png","https://i.imgur.com/kboosK7.png","https://i.imgur.com/D4sArGs.png","https://i.imgur.com/5f0dHwl.png","https://i.imgur.com/kn6TCCL.png","https://i.imgur.com/JSuJo5z.png","https://i.imgur.com/TFDNEMw.png","https://i.imgur.com/7Tnp9GQ.png","https://i.imgur.com/ZAwCW5E.png","https://i.imgur.com/6vJYX9A.png","https://i.imgur.com/XYjK7Ck.png","https://i.imgur.com/Q64wrRT.png"],"links":["https://remix.ethereum.org","https://github.com/ethereum/remix","https://solidity.readthedocs.io/en/develop/","https://www.ethereum.org/token","https://metamask.io/","https://medium.com/taipei-ethereum-meetup/%E6%95%99%E7%B7%B4-%E6%88%91-%E5%8F%AA-%E6%83%B3%E5%AD%B8solidity-92b7ba8054f5","https://blog.zeppelin.solutions/designing-the-architecture-for-your-ethereum-application-9cec086f8317","http://truffleframework.com/tutorials/building-testing-frontend-app-truffle-3","http://truffle.tryblockchain.org/truffle3.0-integrate-nodejs.html","https://medium.com/taipei-ethereum-meetup/%E5%88%A9%E7%94%A8%E5%B7%A5%E5%85%B7%E5%8A%A0%E9%80%9Fdapp%E5%BB%BA%E7%BD%AE%E5%92%8C%E6%B8%AC%E8%A9%A6-fb08e77f208e"],"app":"steemit/0.1","format":"markdown"} |
| Transaction Info | Block #19052331/Trx f26611677d9f83437fd3fdb5156008c8ba4d080d |
View Raw JSON Data
{
"trx_id": "f26611677d9f83437fd3fdb5156008c8ba4d080d",
"block": 19052331,
"trx_in_block": 23,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-17T08:45:24",
"op": [
"comment",
{
"parent_author": "",
"parent_permlink": "cn",
"author": "ankar",
"permlink": "ethereum-remix",
"title": "【Ethereum 智能合约开发笔记】编译和部署合约的第一种姿势:使用 Remix",
"body": "\n\n之前有自己开发过 Ethereum 智能合约,但没有好好纪录开发的过程和碰到的问题,觉得满可惜。这次想重新开始,从最傻的姿势开始,一步步成长。**本篇希望将一个很简单的代币合约(只能发行和转帐),部署在本地和测试网路上,并测试其功能。**本篇是较详细描述使用 Remix 的步骤及使用上可能碰到的问题。\n\n## 开发环境\n\n> **不需要安装**,直接在任何浏览器开启 [Remix](https://remix.ethereum.org)。\n\nRemix 是一个 [Open Source](https://github.com/ethereum/remix) 的 [Solidity](https://solidity.readthedocs.io/en/develop/) 智能合约开发环境,提供基本的编译、部署至本地或测试网路、执行合约等功能。Solidity 是 Ethereum 官方设计和支援的程式语言,专门用于编写智能合约。\n\n\n\n## 取得代币合约\n\n代币合约的范例很多,[Ethereum 官网](https://www.ethereum.org/token)有提供一个最小可行的代币合约(MINIMUM VIABLE TOKEN):\n\n contract MyToken {\n /* This creates an array with all balances */\n mapping (address => uint256) public balanceOf;\n\n /* Initializes contract with initial supply tokens to the creator of the contract */\n function MyToken(\n uint256 initialSupply\n ) {\n balanceOf[msg.sender] = initialSupply; // Give the creator all initial tokens\n }\n\n /* Send coins */\n function transfer(address _to, uint256 _value) {\n require(balanceOf[msg.sender] >= _value); // Check if the sender has enough\n require(balanceOf[_to] + _value >= balanceOf[_to]); // Check for overflows\n balanceOf[msg.sender] -= _value; // Subtract from the sender\n balanceOf[_to] += _value; // Add the same to the recipient\n }\n }\n\n这个 MyToken 合约真的很傻,只能做两件事:\n- 创造代币:发起合约时创造指定数量的代币,代币拥有者是发起合约的 Ethereum 帐户\n- 转移代币:转移指定数量的代币到指定的 Ethereum 帐户\n\n---\n\n## 使用 Remix 编译合约\n\n#### 1. 点选右上角 **+** 新增一个档案\n名称任意只要副档名是 \".sol\"。\n\n\n\n#### 2. 复制合约内容到该档案并编译\nRemix 预设会自动编译。会看到旁边有橘橘的 warning,代表编译完了,但 warning 可先不管,不影响合约执行。\n\n\n## 在本地部署合约\n\n#### 1. 设定网路\n点选左边上面的 **run**。\n\n\n\nEnvironment 选择 **JavaScript VM** 代表所有资料都是存在本地记忆体(功能类似 testrpc)。它会提供 5 个虚拟帐户每个有 100 ETH,随便选一个帐户(要记住)。\n\n\n\n#### 2. 发送交易部署合约\n选择 **MyToken**。可以看到 **create** 按钮。且已根据合约内容显示必须填入 `initialSupply`(也就是要发行的代币数量)。输入一个数目并按 **create**,就会发送交易部署合约。\n\n\n\n合约部署成功后,可以看到合约的使用介面。Remix 会自动根据合约的内容,产生对应的合约使用介面。可以看到合约有两个功能:**balanceOf(查询余额)** 和 **transfer(转移代币)**。\n\n\n\n底下可以看到 log(纪录每一次的操作)。实际上部署合约是透过一个 Ethereum 交易完成,点 **Details** 可以看到该笔交易详细资料。\n\n\n---\n\n## 执行合约 - 查询余额\n\n#### 1. 选择刚刚发起合约的帐户\n\n\n#### 2. 输入帐户\n注意要用 **\"\"** 把帐户包起来,范例:\n\n \"0xca35b7d915458ef540ade6068dfe2f44e8fa733c\"\n\n#### 3. 点击 **balanceOf**\n可以在旁边看到执行结果,也就是目前这个帐户的代币余额。\n\n\n#### 错误情况\n说明一下,因为资料传送是用 JSON 格式,所以要加上 \"\"。如果忘记输入 \"\" 就会在 log 看到错误:\n\n\n\n### 执行合约 - 转移代币\n\n#### 1. 选择要转出的帐户\n\n选择刚刚发起合约的帐户。\n\n\n\n\n#### 2. 输入要转入的帐户\n选择并复制另一个帐户。在合约介面 **transfer** 后面的栏位,输入**转入帐户**和要**转移的代币数量**。帐户同样用 \"\" 包起来,范例:\n \n \"0x4b0897b0513fdc7c541b6d9d7e929c4e5364d2db\", 10\n\n#### 3. 点击 **transfer**\n点击 **transfer**,成功后会看到 log 更新。\n\n\n#### 4. 确认余额更新\n再查询转入帐户的余额,就可以看到代币余额增加啦!\n\n\n#### 错误情况\n如果选择要转出的帐户代币余额不足,这笔交易会失败,就会在 log 看到错误。\n\n\n---\n\n## 在测试网路部署合约\n\n#### 1. 安装 [MetaMask](https://metamask.io/)\n首先,要连到测试网路,就要安装 [MetaMask](https://metamask.io/)。他是浏览器端的 Ethereum 钱包,可以连结 Ethereum 主要和测试网路。安奘后需要建立 Ethereum 帐户,[教练,我”只”想学Solidity](https://medium.com/taipei-ethereum-meetup/%E6%95%99%E7%B7%B4-%E6%88%91-%E5%8F%AA-%E6%83%B3%E5%AD%B8solidity-92b7ba8054f5) 这篇有详细的步骤。\n\n\n\n\n\n\n\n#### 2. 选择测试网路\n回到 Remix,这次 Environment 选择 **Injected Web3**,Remix 会自动连结 MetaMask。\n\n\n\n#### 3. 部署合约\n接著用刚才同样的方式,按 **create** 部署合约,就会看到 MetaMask 的弹出视窗。直接按 **submit** 发送交易。\n\n\n\n稍等一点时间(因为要等这个交易被确认),部署成功后合约的使用介面就会跑出来。\n\n\n\n就可以用同样的方式使用合约啦!\n\n---\n\n## 总结\n\nRemix 提供一个 Solidity 智能合约的开发环境,可以简易的编译、部署、执行甚至除错,适合编程经验不多的初学者。但无法做到版本控制、测试及和其他开发工具一起使用等,实际要开发 [DApp](https://blog.zeppelin.solutions/designing-the-architecture-for-your-ethereum-application-9cec086f8317) 的话会比较不方便。下一篇会参考以下文章:\n- [BUILDING AND TESTING A FRONTEND APP WITH TRUFFLE](http://truffleframework.com/tutorials/building-testing-frontend-app-truffle-3)\n\n- [Truffle3.0集成NodeJS并完全跑通(附详细实例,可能的错误)](http://truffle.tryblockchain.org/truffle3.0-integrate-nodejs.html)\n\n- [利用工具加速Dapp建置和测试](https://medium.com/taipei-ethereum-meetup/%E5%88%A9%E7%94%A8%E5%B7%A5%E5%85%B7%E5%8A%A0%E9%80%9Fdapp%E5%BB%BA%E7%BD%AE%E5%92%8C%E6%B8%AC%E8%A9%A6-fb08e77f208e)\n\n使用 Truffle3、Ganache、web3.js 来编译和部署合约。",
"json_metadata": "{\"tags\":[\"cn\",\"blockchain\",\"ethereum\",\"solidity\",\"smart-contract\"],\"image\":[\"https://i.imgur.com/cpeSvtW.png\",\"https://i.imgur.com/U7KrIxB.png\",\"https://i.imgur.com/hRs9XhP.png\",\"https://i.imgur.com/8kVODQS.png\",\"https://i.imgur.com/s4b2Xwo.png\",\"https://i.imgur.com/RD1ZQTc.png\",\"https://i.imgur.com/QEEJNBb.png\",\"https://i.imgur.com/bsDeerq.png\",\"https://i.imgur.com/OK0OKJi.png\",\"https://i.imgur.com/xhpkjSS.png\",\"https://i.imgur.com/kboosK7.png\",\"https://i.imgur.com/D4sArGs.png\",\"https://i.imgur.com/5f0dHwl.png\",\"https://i.imgur.com/kn6TCCL.png\",\"https://i.imgur.com/JSuJo5z.png\",\"https://i.imgur.com/TFDNEMw.png\",\"https://i.imgur.com/7Tnp9GQ.png\",\"https://i.imgur.com/ZAwCW5E.png\",\"https://i.imgur.com/6vJYX9A.png\",\"https://i.imgur.com/XYjK7Ck.png\",\"https://i.imgur.com/Q64wrRT.png\"],\"links\":[\"https://remix.ethereum.org\",\"https://github.com/ethereum/remix\",\"https://solidity.readthedocs.io/en/develop/\",\"https://www.ethereum.org/token\",\"https://metamask.io/\",\"https://medium.com/taipei-ethereum-meetup/%E6%95%99%E7%B7%B4-%E6%88%91-%E5%8F%AA-%E6%83%B3%E5%AD%B8solidity-92b7ba8054f5\",\"https://blog.zeppelin.solutions/designing-the-architecture-for-your-ethereum-application-9cec086f8317\",\"http://truffleframework.com/tutorials/building-testing-frontend-app-truffle-3\",\"http://truffle.tryblockchain.org/truffle3.0-integrate-nodejs.html\",\"https://medium.com/taipei-ethereum-meetup/%E5%88%A9%E7%94%A8%E5%B7%A5%E5%85%B7%E5%8A%A0%E9%80%9Fdapp%E5%BB%BA%E7%BD%AE%E5%92%8C%E6%B8%AC%E8%A9%A6-fb08e77f208e\"],\"app\":\"steemit/0.1\",\"format\":\"markdown\"}"
}
]
}ankarreceived 0.017 SBD, 0.005 SP author reward for @ankar / ark-dpos-smartbridges2018/01/16 09:28:06
ankarreceived 0.017 SBD, 0.005 SP author reward for @ankar / ark-dpos-smartbridges
2018/01/16 09:28:06
| author | ankar |
| permlink | ark-dpos-smartbridges |
| sbd payout | 0.017 SBD |
| steem payout | 0.000 STEEM |
| vesting payout | 8.190552 VESTS |
| Transaction Info | Block #19024389/Virtual Operation #4 |
View Raw JSON Data
{
"trx_id": "0000000000000000000000000000000000000000",
"block": 19024389,
"trx_in_block": 4294967295,
"op_in_trx": 0,
"virtual_op": 4,
"timestamp": "2018-01-16T09:28:06",
"op": [
"author_reward",
{
"author": "ankar",
"permlink": "ark-dpos-smartbridges",
"sbd_payout": "0.017 SBD",
"steem_payout": "0.000 STEEM",
"vesting_payout": "8.190552 VESTS"
}
]
}ankarpublished a new post: ark-dpos-smartbridges2018/01/12 05:56:09
ankarpublished a new post: ark-dpos-smartbridges
2018/01/12 05:56:09
| parent author | |
| parent permlink | cn |
| author | ankar |
| permlink | ark-dpos-smartbridges |
| title | ARK "All-in-One Blockchain Solutions" 的特别之处 |
| body | @@ -650,16 +650,20 @@ %E6%B5%81%E4%BA%A7%E7%94%9F%E6%96%B0%E7%9A%84%E5%8C%BA%E5%9D%97%E3%80%82 +%0A%0A%3E delegate @@ -770,16 +770,18 @@ %E8%AE%BA%E7%9A%84%E6%83%85%E5%86%B5%E6%BB%A1%E8%B8%8A%E8%B7%83%E3%80%82 +%0A%0A %E8%BF%99%E4%B8%AA%E6%9E%B6%E6%9E%84%E5%A5%BD%E5%A4%84%E6%98%AF%E7%AE%80 @@ -1251,16 +1251,18 @@ ridges%0A%0A +%3E ARK %E4%BD%BF%E7%94%A8%E8%80%85%E5%8F%AF @@ -1293,16 +1293,18 @@ %E5%8A%A8%EF%BC%8C%E5%90%AC%E8%B5%B7%E6%9D%A5%E5%BE%88%E9%85%B7%E3%80%82 +%0A%0A %E5%AE%9E%E9%99%85%E4%B8%8A Smar @@ -2924,18 +2924,18 @@ %E9%A1%B9%E6%94%B9%E5%96%84%E3%80%82%E5%85%B6%E4%BB%96 A -rk +RK %E7%9A%84%E6%9C%AA%E6%9D%A5%E5%8F%91%E5%B1%95%E4%B9%9F%E5%8F%AF |
| json metadata | {"tags":["cn","blockchain","ark","lisk","eth"],"image":["https://i.imgur.com/zO6xain.jpg","https://i.imgur.com/vRYD7PD.png","https://i.imgur.com/MyHbbrb.png","https://i.imgur.com/JbKNndC.png"],"links":["https://ARK.io/","https://lisk.io/","https://www.jianshu.com/p/b76649f4ae02","https://forum.ARK.io/category/5/delegates","https://github.com/ARKEcosystem/ARK-node/tree/development/helpers","https://explorer.ARK.land/delegateMonitor","https://github.com/ARKEcosystem/ARK-desktop/releases","https://blog.ARK.io/what-is-the-ARK-smartbridge-and-how-does-it-work-1dd7fb1e17a0","https://medium.com/@ARKaces/aces-completes-ARK-authentication-listeners-for-ARK-bitcoin-ethereum-and-litecoin-ff98c1c792cf","https://aces-ARK.io/aces-app/about","https://blockchain.info/charts/transactions-per-second","https://ark.io/roadmap","https://ARK.io/Whitepaper.pdf","https://github.com/ARKEcosystem","https://ARK.io/slack"],"app":"steemit/0.1","format":"markdown"} |
| Transaction Info | Block #18905086/Trx 4856c428f31bc534d15e9a384780ddebd932096f |
View Raw JSON Data
{
"trx_id": "4856c428f31bc534d15e9a384780ddebd932096f",
"block": 18905086,
"trx_in_block": 26,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-12T05:56:09",
"op": [
"comment",
{
"parent_author": "",
"parent_permlink": "cn",
"author": "ankar",
"permlink": "ark-dpos-smartbridges",
"title": "ARK \"All-in-One Blockchain Solutions\" 的特别之处",
"body": "@@ -650,16 +650,20 @@\n %E6%B5%81%E4%BA%A7%E7%94%9F%E6%96%B0%E7%9A%84%E5%8C%BA%E5%9D%97%E3%80%82\n+%0A%0A%3E \n delegate\n@@ -770,16 +770,18 @@\n %E8%AE%BA%E7%9A%84%E6%83%85%E5%86%B5%E6%BB%A1%E8%B8%8A%E8%B7%83%E3%80%82\n+%0A%0A\n %E8%BF%99%E4%B8%AA%E6%9E%B6%E6%9E%84%E5%A5%BD%E5%A4%84%E6%98%AF%E7%AE%80\n@@ -1251,16 +1251,18 @@\n ridges%0A%0A\n+%3E \n ARK %E4%BD%BF%E7%94%A8%E8%80%85%E5%8F%AF\n@@ -1293,16 +1293,18 @@\n %E5%8A%A8%EF%BC%8C%E5%90%AC%E8%B5%B7%E6%9D%A5%E5%BE%88%E9%85%B7%E3%80%82\n+%0A%0A\n %E5%AE%9E%E9%99%85%E4%B8%8A Smar\n@@ -2924,18 +2924,18 @@\n %E9%A1%B9%E6%94%B9%E5%96%84%E3%80%82%E5%85%B6%E4%BB%96 A\n-rk\n+RK\n %E7%9A%84%E6%9C%AA%E6%9D%A5%E5%8F%91%E5%B1%95%E4%B9%9F%E5%8F%AF\n",
"json_metadata": "{\"tags\":[\"cn\",\"blockchain\",\"ark\",\"lisk\",\"eth\"],\"image\":[\"https://i.imgur.com/zO6xain.jpg\",\"https://i.imgur.com/vRYD7PD.png\",\"https://i.imgur.com/MyHbbrb.png\",\"https://i.imgur.com/JbKNndC.png\"],\"links\":[\"https://ARK.io/\",\"https://lisk.io/\",\"https://www.jianshu.com/p/b76649f4ae02\",\"https://forum.ARK.io/category/5/delegates\",\"https://github.com/ARKEcosystem/ARK-node/tree/development/helpers\",\"https://explorer.ARK.land/delegateMonitor\",\"https://github.com/ARKEcosystem/ARK-desktop/releases\",\"https://blog.ARK.io/what-is-the-ARK-smartbridge-and-how-does-it-work-1dd7fb1e17a0\",\"https://medium.com/@ARKaces/aces-completes-ARK-authentication-listeners-for-ARK-bitcoin-ethereum-and-litecoin-ff98c1c792cf\",\"https://aces-ARK.io/aces-app/about\",\"https://blockchain.info/charts/transactions-per-second\",\"https://ark.io/roadmap\",\"https://ARK.io/Whitepaper.pdf\",\"https://github.com/ARKEcosystem\",\"https://ARK.io/slack\"],\"app\":\"steemit/0.1\",\"format\":\"markdown\"}"
}
]
}ubgupvoted (1.00%) @ankar / ark-dpos-smartbridges2018/01/11 17:31:45
ubgupvoted (1.00%) @ankar / ark-dpos-smartbridges
2018/01/11 17:31:45
| voter | ubg |
| author | ankar |
| permlink | ark-dpos-smartbridges |
| weight | 100 (1.00%) |
| Transaction Info | Block #18890207/Trx 17b19367a147f2e4a266882d1a16ece669772023 |
View Raw JSON Data
{
"trx_id": "17b19367a147f2e4a266882d1a16ece669772023",
"block": 18890207,
"trx_in_block": 19,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-11T17:31:45",
"op": [
"vote",
{
"voter": "ubg",
"author": "ankar",
"permlink": "ark-dpos-smartbridges",
"weight": 100
}
]
}ankarpublished a new post: ark-dpos-smartbridges2018/01/11 17:21:15
ankarpublished a new post: ark-dpos-smartbridges
2018/01/11 17:21:15
| parent author | |
| parent permlink | cn |
| author | ankar |
| permlink | ark-dpos-smartbridges |
| title | ARK "All-in-One Blockchain Solutions" 的特别之处 |
| body |  [ARK](https://ARK.io/) 的宗旨是**使区块链被更广泛使用**(increasing consumer adoption)。以技术上来说 ARK 是基于一个 **DPOS 区块链**,并有原生的 **ARK** 虚拟货币。最主要的功能是让使用者可透过 ARK 平台和其他区块链互动,他们称这个技术叫做 “**SmartBridges**”。如果未来区块链被广泛地使用,不太可能使用者在每次使用前都要先透过交易所兑换;如果可以透过单一入口和其他区块链互动,确实更能让使用者接受。ARK 主网已于 2017/3 上线,且有相当活跃的社群。本文主要希望了解 ARK 的核心部分,**DPOS 区块链** 和 **SmartBridges**。 ## DPOS 区块链 ARK 的 DPOS 区块链完全基于 [Lisk](https://lisk.io/)(详细可参考我翻译的另一篇文章 [Lisk 简介 - DPOS 共识网路](https://www.jianshu.com/p/b76649f4ae02))。但 ARK 在参数上做调整,共有 51 个 delegated 节点,负责产生新区块。delegated 节点可收取 2 ARK(随时间递减) 的区块报酬和交易手续费。每 8 秒产生一个新区块。每一轮均由 51 个 delegated 节点轮流产生新的区块。delegated 节点由社群共同选出,任何人只要花费 25 ARK(stake)都有资格参选。[官方论坛](https://forum.ARK.io/category/5/delegates)上可以看到大家参选和讨论的情况满踊跃。这个架构好处是简单易懂,且完全可由社群自主经营,并且目前已上线证明初步可行。大多参选者为了吸引投票者,会将得到的所有报酬按比例分给投票者,很大程度弥补了许多区块链技术在交易量扩大后产生交易手续费过高的问题。而根据白皮数描述目前交易上限是 25 tx/block(在 [ARK-node](https://github.com/ARKEcosystem/ARK-node/tree/development/helpers) 实作中每个区块约 2MB 的交易资料 payload),白皮书中有提到许多改进方式,具题如何还有待之后的更新版本释出。 可透过 [ARK Blockchain Explorer](https://explorer.ARK.land/delegateMonitor) 看到即时的出块情况,包含即将要出块的 delegated 节点和所有 delegated 节点的详细资讯等:  ## SmartBridges ARK 使用者可以透过 SmartBridges 和其他区块链互动,听起来很酷。实际上 SmartBridges 由两个部分组成:交易中附加的一段资料和负责监听那段资料并执行对应动作的 **Listener**(监听者)。下图描述一个流程**从一个 ARK 帐户发起一个交易送 ETH 至一个 ETH 帐户**:  这是一个简略的流程,补充几点没有描述到的部分: ### 如何在 ARK 交易中附加一段 SmartBridges 资料? ARK 交易中包含一特定栏位叫 **vendorField**(value: a string),只需将 SmartBridges 资料填入该栏位即可。建议可使用[桌面版钱包](https://github.com/ARKEcosystem/ARK-desktop/releases):  ### Listener 如何将 ARK 转换成 ETH? 在这篇 [ARK 共同创办人的文章](https://blog.ARK.io/what-is-the-ARK-smartbridge-and-how-does-it-work-1dd7fb1e17a0) 中提到,Listener 在这个情境下需要介接可币换币的交易所(例如:Shapeshift)。因为汇率变动快,使用者在送交易前应先向 Listener 查询目前汇率及所需要的手续费。并先取得 Listener 提供的一段 SmartBridges 资料,再送交易时填入 **vendorField**,借此让 Listener 识别出这个交易。在 Listener 收到包含此段 SmartBridges 资料的交易时,将 ARK 扣除手续费后和交易所兑换等值 ETH,并发送至使用者指定的 ETH 帐户。 根据 [ACES Completes ARK Authentication Listeners for ARK, Bitcoin, Ethereum, and Litecoin](https://medium.com/@ARKaces/aces-completes-ARK-authentication-listeners-for-ARK-bitcoin-ethereum-and-litecoin-ff98c1c792cf) 目前已实作出比特币、以太坊和莱特币的 Listener,这部分笔者还没下载来测试过但均有开源。也有 [live demo](https://aces-ARK.io/aces-app/about) 可以实际操作用 ARK 交换 testnet(Ropsten) ETH。 ### 小结 根据以上,使用 ARK 透过 SmartBridges 交换 ETH,和直接使用 Shapeshift 这类服务的差别在,透过使用 SmartBridges 可将这笔交易请求纪录在区块链上,付款后如果 Shapeshift 系统出问题或甚至不认帐,可以有一个可靠的资料来源佐证确实有这笔交易请求,但这也仰赖 Listener 的服务提供商做可靠的担保,实际接受度有赖这类服务上线后市场验证。另外,以此类推也可以使用 ARK 透过 SmartBridges 调用以太坊智能合约,甚至未来有其他的智能合约平台出现,只要实作该平台对应的 Listener 就可用同样方式与之互动。而目前主要问题是在限制节点数量的情况下,目前 TPS(约等于[比特币](https://blockchain.info/charts/transactions-per-second)) 太低,ARK Core V2 声称会重写整个 core,包含增加 TPS 及许多项改善。其他 Ark 的未来发展也可参考 [ARK roadmap](https://ark.io/roadmap)。 ## References - [ARK whitepaper](https://ARK.io/Whitepaper.pdf) - [ARK Github](https://github.com/ARKEcosystem) - [ARK Slack](https://ARK.io/slack) |
| json metadata | {"tags":["cn","blockchain","ark","lisk","eth"],"image":["https://i.imgur.com/zO6xain.jpg","https://i.imgur.com/vRYD7PD.png","https://i.imgur.com/MyHbbrb.png","https://i.imgur.com/JbKNndC.png"],"links":["https://ARK.io/","https://lisk.io/","https://www.jianshu.com/p/b76649f4ae02","https://forum.ARK.io/category/5/delegates","https://github.com/ARKEcosystem/ARK-node/tree/development/helpers","https://explorer.ARK.land/delegateMonitor","https://github.com/ARKEcosystem/ARK-desktop/releases","https://blog.ARK.io/what-is-the-ARK-smartbridge-and-how-does-it-work-1dd7fb1e17a0","https://medium.com/@ARKaces/aces-completes-ARK-authentication-listeners-for-ARK-bitcoin-ethereum-and-litecoin-ff98c1c792cf","https://aces-ARK.io/aces-app/about","https://blockchain.info/charts/transactions-per-second","https://ark.io/roadmap","https://ARK.io/Whitepaper.pdf","https://github.com/ARKEcosystem","https://ARK.io/slack"],"app":"steemit/0.1","format":"markdown"} |
| Transaction Info | Block #18889997/Trx 28e59a6356d447b168cf9d5e9bed2049d4b80933 |
View Raw JSON Data
{
"trx_id": "28e59a6356d447b168cf9d5e9bed2049d4b80933",
"block": 18889997,
"trx_in_block": 1,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-11T17:21:15",
"op": [
"comment",
{
"parent_author": "",
"parent_permlink": "cn",
"author": "ankar",
"permlink": "ark-dpos-smartbridges",
"title": "ARK \"All-in-One Blockchain Solutions\" 的特别之处",
"body": "\n\n[ARK](https://ARK.io/) 的宗旨是**使区块链被更广泛使用**(increasing consumer adoption)。以技术上来说 ARK 是基于一个 **DPOS 区块链**,并有原生的 **ARK** 虚拟货币。最主要的功能是让使用者可透过 ARK 平台和其他区块链互动,他们称这个技术叫做 “**SmartBridges**”。如果未来区块链被广泛地使用,不太可能使用者在每次使用前都要先透过交易所兑换;如果可以透过单一入口和其他区块链互动,确实更能让使用者接受。ARK 主网已于 2017/3 上线,且有相当活跃的社群。本文主要希望了解 ARK 的核心部分,**DPOS 区块链** 和 **SmartBridges**。\n\n## DPOS 区块链\n\nARK 的 DPOS 区块链完全基于 [Lisk](https://lisk.io/)(详细可参考我翻译的另一篇文章 [Lisk 简介 - DPOS 共识网路](https://www.jianshu.com/p/b76649f4ae02))。但 ARK 在参数上做调整,共有 51 个 delegated 节点,负责产生新区块。delegated 节点可收取 2 ARK(随时间递减) 的区块报酬和交易手续费。每 8 秒产生一个新区块。每一轮均由 51 个 delegated 节点轮流产生新的区块。delegated 节点由社群共同选出,任何人只要花费 25 ARK(stake)都有资格参选。[官方论坛](https://forum.ARK.io/category/5/delegates)上可以看到大家参选和讨论的情况满踊跃。这个架构好处是简单易懂,且完全可由社群自主经营,并且目前已上线证明初步可行。大多参选者为了吸引投票者,会将得到的所有报酬按比例分给投票者,很大程度弥补了许多区块链技术在交易量扩大后产生交易手续费过高的问题。而根据白皮数描述目前交易上限是 25 tx/block(在 [ARK-node](https://github.com/ARKEcosystem/ARK-node/tree/development/helpers) 实作中每个区块约 2MB 的交易资料 payload),白皮书中有提到许多改进方式,具题如何还有待之后的更新版本释出。\n\n可透过 [ARK Blockchain Explorer](https://explorer.ARK.land/delegateMonitor) 看到即时的出块情况,包含即将要出块的 delegated 节点和所有 delegated 节点的详细资讯等:\n\n\n\n## SmartBridges\n\nARK 使用者可以透过 SmartBridges 和其他区块链互动,听起来很酷。实际上 SmartBridges 由两个部分组成:交易中附加的一段资料和负责监听那段资料并执行对应动作的 **Listener**(监听者)。下图描述一个流程**从一个 ARK 帐户发起一个交易送 ETH 至一个 ETH 帐户**:\n\n\n\n这是一个简略的流程,补充几点没有描述到的部分:\n\n### 如何在 ARK 交易中附加一段 SmartBridges 资料?\n\nARK 交易中包含一特定栏位叫 **vendorField**(value: a string),只需将 SmartBridges 资料填入该栏位即可。建议可使用[桌面版钱包](https://github.com/ARKEcosystem/ARK-desktop/releases):\n\n\n\n### Listener 如何将 ARK 转换成 ETH?\n\n在这篇 [ARK 共同创办人的文章](https://blog.ARK.io/what-is-the-ARK-smartbridge-and-how-does-it-work-1dd7fb1e17a0) 中提到,Listener 在这个情境下需要介接可币换币的交易所(例如:Shapeshift)。因为汇率变动快,使用者在送交易前应先向 Listener 查询目前汇率及所需要的手续费。并先取得 Listener 提供的一段 SmartBridges 资料,再送交易时填入 **vendorField**,借此让 Listener 识别出这个交易。在 Listener 收到包含此段 SmartBridges 资料的交易时,将 ARK 扣除手续费后和交易所兑换等值 ETH,并发送至使用者指定的 ETH 帐户。\n\n根据 [ACES Completes ARK Authentication Listeners for ARK, Bitcoin, Ethereum, and Litecoin](https://medium.com/@ARKaces/aces-completes-ARK-authentication-listeners-for-ARK-bitcoin-ethereum-and-litecoin-ff98c1c792cf) 目前已实作出比特币、以太坊和莱特币的 Listener,这部分笔者还没下载来测试过但均有开源。也有 [live demo](https://aces-ARK.io/aces-app/about) 可以实际操作用 ARK 交换 testnet(Ropsten) ETH。\n\n### 小结\n\n根据以上,使用 ARK 透过 SmartBridges 交换 ETH,和直接使用 Shapeshift 这类服务的差别在,透过使用 SmartBridges 可将这笔交易请求纪录在区块链上,付款后如果 Shapeshift 系统出问题或甚至不认帐,可以有一个可靠的资料来源佐证确实有这笔交易请求,但这也仰赖 Listener 的服务提供商做可靠的担保,实际接受度有赖这类服务上线后市场验证。另外,以此类推也可以使用 ARK 透过 SmartBridges 调用以太坊智能合约,甚至未来有其他的智能合约平台出现,只要实作该平台对应的 Listener 就可用同样方式与之互动。而目前主要问题是在限制节点数量的情况下,目前 TPS(约等于[比特币](https://blockchain.info/charts/transactions-per-second)) 太低,ARK Core V2 声称会重写整个 core,包含增加 TPS 及许多项改善。其他 Ark 的未来发展也可参考 [ARK roadmap](https://ark.io/roadmap)。\n\n## References\n\n- [ARK whitepaper](https://ARK.io/Whitepaper.pdf)\n- [ARK Github](https://github.com/ARKEcosystem)\n- [ARK Slack](https://ARK.io/slack)",
"json_metadata": "{\"tags\":[\"cn\",\"blockchain\",\"ark\",\"lisk\",\"eth\"],\"image\":[\"https://i.imgur.com/zO6xain.jpg\",\"https://i.imgur.com/vRYD7PD.png\",\"https://i.imgur.com/MyHbbrb.png\",\"https://i.imgur.com/JbKNndC.png\"],\"links\":[\"https://ARK.io/\",\"https://lisk.io/\",\"https://www.jianshu.com/p/b76649f4ae02\",\"https://forum.ARK.io/category/5/delegates\",\"https://github.com/ARKEcosystem/ARK-node/tree/development/helpers\",\"https://explorer.ARK.land/delegateMonitor\",\"https://github.com/ARKEcosystem/ARK-desktop/releases\",\"https://blog.ARK.io/what-is-the-ARK-smartbridge-and-how-does-it-work-1dd7fb1e17a0\",\"https://medium.com/@ARKaces/aces-completes-ARK-authentication-listeners-for-ARK-bitcoin-ethereum-and-litecoin-ff98c1c792cf\",\"https://aces-ARK.io/aces-app/about\",\"https://blockchain.info/charts/transactions-per-second\",\"https://ark.io/roadmap\",\"https://ARK.io/Whitepaper.pdf\",\"https://github.com/ARKEcosystem\",\"https://ARK.io/slack\"],\"app\":\"steemit/0.1\",\"format\":\"markdown\"}"
}
]
}ankarclaimed reward balance: 0.472 SBD, 0.099 SP2018/01/11 08:13:33
ankarclaimed reward balance: 0.472 SBD, 0.099 SP
2018/01/11 08:13:33
| account | ankar |
| reward steem | 0.000 STEEM |
| reward sbd | 0.472 SBD |
| reward vests | 161.809465 VESTS |
| Transaction Info | Block #18879044/Trx 6cdddf8d472fd19e693431699e856c642ced75f4 |
View Raw JSON Data
{
"trx_id": "6cdddf8d472fd19e693431699e856c642ced75f4",
"block": 18879044,
"trx_in_block": 36,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-11T08:13:33",
"op": [
"claim_reward_balance",
{
"account": "ankar",
"reward_steem": "0.000 STEEM",
"reward_sbd": "0.472 SBD",
"reward_vests": "161.809465 VESTS"
}
]
}ankarfollowed @lunaspeed2018/01/11 08:13:03
ankarfollowed @lunaspeed
2018/01/11 08:13:03
| required auths | [] |
| required posting auths | ["ankar"] |
| id | follow |
| json | ["follow",{"follower":"ankar","following":"lunaspeed","what":["blog"]}] |
| Transaction Info | Block #18879034/Trx 05bceb92d60d62233bc37970d4468f1acf4d5c12 |
View Raw JSON Data
{
"trx_id": "05bceb92d60d62233bc37970d4468f1acf4d5c12",
"block": 18879034,
"trx_in_block": 16,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-11T08:13:03",
"op": [
"custom_json",
{
"required_auths": [],
"required_posting_auths": [
"ankar"
],
"id": "follow",
"json": "[\"follow\",{\"follower\":\"ankar\",\"following\":\"lunaspeed\",\"what\":[\"blog\"]}]"
}
]
}ankarupvoted (100.00%) @lunaspeed / 5ltmjr2018/01/11 08:12:51
ankarupvoted (100.00%) @lunaspeed / 5ltmjr
2018/01/11 08:12:51
| voter | ankar |
| author | lunaspeed |
| permlink | 5ltmjr |
| weight | 10000 (100.00%) |
| Transaction Info | Block #18879030/Trx 837c99d6d4182a0ef6085b4f3bc12fcdf04da586 |
View Raw JSON Data
{
"trx_id": "837c99d6d4182a0ef6085b4f3bc12fcdf04da586",
"block": 18879030,
"trx_in_block": 2,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-11T08:12:51",
"op": [
"vote",
{
"voter": "ankar",
"author": "lunaspeed",
"permlink": "5ltmjr",
"weight": 10000
}
]
}2018/01/11 07:08:09
2018/01/11 07:08:09
| author | ankar |
| permlink | lisk-dpos |
| sbd payout | 0.017 SBD |
| steem payout | 0.000 STEEM |
| vesting payout | 6.144448 VESTS |
| Transaction Info | Block #18877735/Virtual Operation #13 |
View Raw JSON Data
{
"trx_id": "0000000000000000000000000000000000000000",
"block": 18877735,
"trx_in_block": 4294967295,
"op_in_trx": 0,
"virtual_op": 13,
"timestamp": "2018-01-11T07:08:09",
"op": [
"author_reward",
{
"author": "ankar",
"permlink": "lisk-dpos",
"sbd_payout": "0.017 SBD",
"steem_payout": "0.000 STEEM",
"vesting_payout": "6.144448 VESTS"
}
]
}2018/01/11 07:02:30
2018/01/11 07:02:30
| author | ankar |
| permlink | lisk |
| sbd payout | 0.154 SBD |
| steem payout | 0.000 STEEM |
| vesting payout | 55.300044 VESTS |
| Transaction Info | Block #18877622/Virtual Operation #10 |
View Raw JSON Data
{
"trx_id": "0000000000000000000000000000000000000000",
"block": 18877622,
"trx_in_block": 4294967295,
"op_in_trx": 0,
"virtual_op": 10,
"timestamp": "2018-01-11T07:02:30",
"op": [
"author_reward",
{
"author": "ankar",
"permlink": "lisk",
"sbd_payout": "0.154 SBD",
"steem_payout": "0.000 STEEM",
"vesting_payout": "55.300044 VESTS"
}
]
}2018/01/10 03:37:57
2018/01/10 03:37:57
| author | ankar |
| permlink | part-i |
| sbd payout | 0.301 SBD |
| steem payout | 0.000 STEEM |
| vesting payout | 100.364973 VESTS |
| Transaction Info | Block #18844741/Virtual Operation #13 |
View Raw JSON Data
{
"trx_id": "0000000000000000000000000000000000000000",
"block": 18844741,
"trx_in_block": 4294967295,
"op_in_trx": 0,
"virtual_op": 13,
"timestamp": "2018-01-10T03:37:57",
"op": [
"author_reward",
{
"author": "ankar",
"permlink": "part-i",
"sbd_payout": "0.301 SBD",
"steem_payout": "0.000 STEEM",
"vesting_payout": "100.364973 VESTS"
}
]
}ankarpublished a new post: ark-dpos-smartbridges2018/01/10 02:50:51
ankarpublished a new post: ark-dpos-smartbridges
2018/01/10 02:50:51
| parent author | |
| parent permlink | cn |
| author | ankar |
| permlink | ark-dpos-smartbridges |
| title | ARK 简介 - DPOS 区块链与 SmartBridges |
| body |  [ARK](https://ARK.io/) 的宗旨是**使区块链被更广泛使用**(increasing consumer adoption)。以技术上来说 ARK 是基于一个 **DPOS 区块链**,并有原生的 **ARK** 虚拟货币。最主要的功能是让使用者可透过 ARK 平台和其他区块链互动,他们称这个技术叫做 “**SmartBridges**”。如果未来区块链被广泛地使用,不太可能使用者在每次使用前都要先透过交易所兑换;如果可以透过单一入口和其他区块链互动,确实更能让使用者接受。ARK 主网已于 2017/3 上线,且有相当活跃的社群。本文主要希望了解 ARK 的核心部分,**DPOS 区块链** 和 **SmartBridges**。 ## DPOS 区块链 ARK 的 DPOS 区块链完全基于 [Lisk](https://lisk.io/)(详细可参考我翻译的另一篇文章 [Lisk 简介 - DPOS 共识网路](https://www.jianshu.com/p/b76649f4ae02))。但 ARK 在参数上做调整,共有 51 个 delegated 节点,负责产生新区块。delegated 节点可收取 2 ARK(随时间递减) 的区块报酬和交易手续费。每 8 秒产生一个新区块。每一轮均由 51 个 delegated 节点轮流产生新的区块。delegated 节点由社群共同选出,任何人只要花费 25 ARK(stake)都有资格参选。[官方论坛](https://forum.ARK.io/category/5/delegates)上可以看到大家参选和讨论的情况满踊跃。这个架构好处是简单易懂,且完全可由社群自主经营,并且目前已上线证明初步可行。大多参选者为了吸引投票者,会将得到的所有报酬按比例分给投票者,很大程度弥补了许多区块链技术在交易量扩大后产生交易手续费过高的问题。而根据白皮数描述目前交易上限是 25 tx/block(在 [ARK-node](https://github.com/ARKEcosystem/ARK-node/tree/development/helpers) 实作中每个区块约 2MB 的交易资料 payload),白皮书中有提到许多改进方式,具题如何还有待之后的更新版本释出。 可透过 [ARK Blockchain Explorer](https://explorer.ARK.land/delegateMonitor) 看到即时的出块情况,包含即将要出块的 delegated 节点和所有 delegated 节点的详细资讯等:  ## SmartBridges ARK 使用者可以透过 SmartBridges 和其他区块链互动,听起来很酷。实际上 SmartBridges 由两个部分组成:交易中附加的一段资料和负责监听那段资料并执行对应动作的 **Listener**(监听者)。下图描述一个流程**从一个 ARK 帐户发起一个交易送 ETH 至一个 ETH 帐户**:  这是一个简略的流程,补充几点没有描述到的部分: ### 如何在 ARK 交易中附加一段 SmartBridges 资料? ARK 交易中包含一特定栏位叫 **vendorField**(value: a string),只需将 SmartBridges 资料填入该栏位即可。建议可使用[桌面版钱包](https://github.com/ARKEcosystem/ARK-desktop/releases):  ### Listener 如何将 ARK 转换成 ETH? 在这篇 [ARK 共同创办人的文章](https://blog.ARK.io/what-is-the-ARK-smartbridge-and-how-does-it-work-1dd7fb1e17a0) 中提到,Listener 在这个情境下需要介接可币换币的交易所(例如:Shapeshift)。因为汇率变动快,使用者在送交易前应先向 Listener 查询目前汇率及所需要的手续费。并先取得 Listener 提供的一段 SmartBridges 资料,再送交易时填入 **vendorField**,借此让 Listener 识别出这个交易。在 Listener 收到包含此段 SmartBridges 资料的交易时,将 ARK 扣除手续费后和交易所兑换等值 ETH,并发送至使用者指定的 ETH 帐户。 根据 [ACES Completes ARK Authentication Listeners for ARK, Bitcoin, Ethereum, and Litecoin](https://medium.com/@ARKaces/aces-completes-ARK-authentication-listeners-for-ARK-bitcoin-ethereum-and-litecoin-ff98c1c792cf) 目前已实作出比特币、以太坊和莱特币的 Listener,这部分笔者还没下载来测试过但均有开源。也有 [live demo](https://aces-ARK.io/aces-app/about) 可以实际操作用 ARK 交换 testnet(Ropsten) ETH。 ### 小结 根据以上,使用 ARK 透过 SmartBridges 交换 ETH,和直接使用 Shapeshift 这类服务的差别在,透过使用 SmartBridges 可将这笔交易请求纪录在区块链上,付款后如果 Shapeshift 系统出问题或甚至不认帐,可以有一个可靠的资料来源佐证确实有这笔交易请求,但这也仰赖 Listener 的服务提供商做可靠的担保,实际接受度有赖这类服务上线后市场验证。另外,以此类推也可以使用 ARK 透过 SmartBridges 调用以太坊智能合约,甚至未来有其他的智能合约平台出现,只要实作该平台对应的 Listener 就可用同样方式与之互动。而目前主要问题是在限制节点数量的情况下,目前 TPS(约等于[比特币](https://blockchain.info/charts/transactions-per-second)) 太低,ARK Core V2 声称会重写整个 core,包含增加 TPS 及许多项改善。其他 Ark 的未来发展也可参考 [ARK roadmap](https://ark.io/roadmap)。 ## References - [ARK whitepaper](https://ARK.io/Whitepaper.pdf) - [ARK Github](https://github.com/ARKEcosystem) - [ARK Slack](https://ARK.io/slack) |
| json metadata | {"tags":["cn","blockchain","ark","lisk","eth"],"image":["https://i.imgur.com/zO6xain.jpg","https://i.imgur.com/vRYD7PD.png","https://i.imgur.com/MyHbbrb.png","https://i.imgur.com/JbKNndC.png"],"links":["https://ARK.io/","https://lisk.io/","https://www.jianshu.com/p/b76649f4ae02","https://forum.ARK.io/category/5/delegates","https://github.com/ARKEcosystem/ARK-node/tree/development/helpers","https://explorer.ARK.land/delegateMonitor","https://github.com/ARKEcosystem/ARK-desktop/releases","https://blog.ARK.io/what-is-the-ARK-smartbridge-and-how-does-it-work-1dd7fb1e17a0","https://medium.com/@ARKaces/aces-completes-ARK-authentication-listeners-for-ARK-bitcoin-ethereum-and-litecoin-ff98c1c792cf","https://aces-ARK.io/aces-app/about","https://blockchain.info/charts/transactions-per-second","https://ark.io/roadmap","https://ARK.io/Whitepaper.pdf","https://github.com/ARKEcosystem","https://ARK.io/slack"],"app":"steemit/0.1","format":"markdown"} |
| Transaction Info | Block #18843800/Trx 58fb573ed6fe580a44a3810b30f66960e33f0e33 |
View Raw JSON Data
{
"trx_id": "58fb573ed6fe580a44a3810b30f66960e33f0e33",
"block": 18843800,
"trx_in_block": 16,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-10T02:50:51",
"op": [
"comment",
{
"parent_author": "",
"parent_permlink": "cn",
"author": "ankar",
"permlink": "ark-dpos-smartbridges",
"title": "ARK 简介 - DPOS 区块链与 SmartBridges",
"body": "\n\n[ARK](https://ARK.io/) 的宗旨是**使区块链被更广泛使用**(increasing consumer adoption)。以技术上来说 ARK 是基于一个 **DPOS 区块链**,并有原生的 **ARK** 虚拟货币。最主要的功能是让使用者可透过 ARK 平台和其他区块链互动,他们称这个技术叫做 “**SmartBridges**”。如果未来区块链被广泛地使用,不太可能使用者在每次使用前都要先透过交易所兑换;如果可以透过单一入口和其他区块链互动,确实更能让使用者接受。ARK 主网已于 2017/3 上线,且有相当活跃的社群。本文主要希望了解 ARK 的核心部分,**DPOS 区块链** 和 **SmartBridges**。\n\n## DPOS 区块链\n\nARK 的 DPOS 区块链完全基于 [Lisk](https://lisk.io/)(详细可参考我翻译的另一篇文章 [Lisk 简介 - DPOS 共识网路](https://www.jianshu.com/p/b76649f4ae02))。但 ARK 在参数上做调整,共有 51 个 delegated 节点,负责产生新区块。delegated 节点可收取 2 ARK(随时间递减) 的区块报酬和交易手续费。每 8 秒产生一个新区块。每一轮均由 51 个 delegated 节点轮流产生新的区块。delegated 节点由社群共同选出,任何人只要花费 25 ARK(stake)都有资格参选。[官方论坛](https://forum.ARK.io/category/5/delegates)上可以看到大家参选和讨论的情况满踊跃。这个架构好处是简单易懂,且完全可由社群自主经营,并且目前已上线证明初步可行。大多参选者为了吸引投票者,会将得到的所有报酬按比例分给投票者,很大程度弥补了许多区块链技术在交易量扩大后产生交易手续费过高的问题。而根据白皮数描述目前交易上限是 25 tx/block(在 [ARK-node](https://github.com/ARKEcosystem/ARK-node/tree/development/helpers) 实作中每个区块约 2MB 的交易资料 payload),白皮书中有提到许多改进方式,具题如何还有待之后的更新版本释出。\n\n可透过 [ARK Blockchain Explorer](https://explorer.ARK.land/delegateMonitor) 看到即时的出块情况,包含即将要出块的 delegated 节点和所有 delegated 节点的详细资讯等:\n\n\n\n## SmartBridges\n\nARK 使用者可以透过 SmartBridges 和其他区块链互动,听起来很酷。实际上 SmartBridges 由两个部分组成:交易中附加的一段资料和负责监听那段资料并执行对应动作的 **Listener**(监听者)。下图描述一个流程**从一个 ARK 帐户发起一个交易送 ETH 至一个 ETH 帐户**:\n\n\n\n这是一个简略的流程,补充几点没有描述到的部分:\n\n### 如何在 ARK 交易中附加一段 SmartBridges 资料?\n\nARK 交易中包含一特定栏位叫 **vendorField**(value: a string),只需将 SmartBridges 资料填入该栏位即可。建议可使用[桌面版钱包](https://github.com/ARKEcosystem/ARK-desktop/releases):\n\n\n\n### Listener 如何将 ARK 转换成 ETH?\n\n在这篇 [ARK 共同创办人的文章](https://blog.ARK.io/what-is-the-ARK-smartbridge-and-how-does-it-work-1dd7fb1e17a0) 中提到,Listener 在这个情境下需要介接可币换币的交易所(例如:Shapeshift)。因为汇率变动快,使用者在送交易前应先向 Listener 查询目前汇率及所需要的手续费。并先取得 Listener 提供的一段 SmartBridges 资料,再送交易时填入 **vendorField**,借此让 Listener 识别出这个交易。在 Listener 收到包含此段 SmartBridges 资料的交易时,将 ARK 扣除手续费后和交易所兑换等值 ETH,并发送至使用者指定的 ETH 帐户。\n\n根据 [ACES Completes ARK Authentication Listeners for ARK, Bitcoin, Ethereum, and Litecoin](https://medium.com/@ARKaces/aces-completes-ARK-authentication-listeners-for-ARK-bitcoin-ethereum-and-litecoin-ff98c1c792cf) 目前已实作出比特币、以太坊和莱特币的 Listener,这部分笔者还没下载来测试过但均有开源。也有 [live demo](https://aces-ARK.io/aces-app/about) 可以实际操作用 ARK 交换 testnet(Ropsten) ETH。\n\n### 小结\n\n根据以上,使用 ARK 透过 SmartBridges 交换 ETH,和直接使用 Shapeshift 这类服务的差别在,透过使用 SmartBridges 可将这笔交易请求纪录在区块链上,付款后如果 Shapeshift 系统出问题或甚至不认帐,可以有一个可靠的资料来源佐证确实有这笔交易请求,但这也仰赖 Listener 的服务提供商做可靠的担保,实际接受度有赖这类服务上线后市场验证。另外,以此类推也可以使用 ARK 透过 SmartBridges 调用以太坊智能合约,甚至未来有其他的智能合约平台出现,只要实作该平台对应的 Listener 就可用同样方式与之互动。而目前主要问题是在限制节点数量的情况下,目前 TPS(约等于[比特币](https://blockchain.info/charts/transactions-per-second)) 太低,ARK Core V2 声称会重写整个 core,包含增加 TPS 及许多项改善。其他 Ark 的未来发展也可参考 [ARK roadmap](https://ark.io/roadmap)。\n\n## References\n\n- [ARK whitepaper](https://ARK.io/Whitepaper.pdf)\n- [ARK Github](https://github.com/ARKEcosystem)\n- [ARK Slack](https://ARK.io/slack)",
"json_metadata": "{\"tags\":[\"cn\",\"blockchain\",\"ark\",\"lisk\",\"eth\"],\"image\":[\"https://i.imgur.com/zO6xain.jpg\",\"https://i.imgur.com/vRYD7PD.png\",\"https://i.imgur.com/MyHbbrb.png\",\"https://i.imgur.com/JbKNndC.png\"],\"links\":[\"https://ARK.io/\",\"https://lisk.io/\",\"https://www.jianshu.com/p/b76649f4ae02\",\"https://forum.ARK.io/category/5/delegates\",\"https://github.com/ARKEcosystem/ARK-node/tree/development/helpers\",\"https://explorer.ARK.land/delegateMonitor\",\"https://github.com/ARKEcosystem/ARK-desktop/releases\",\"https://blog.ARK.io/what-is-the-ARK-smartbridge-and-how-does-it-work-1dd7fb1e17a0\",\"https://medium.com/@ARKaces/aces-completes-ARK-authentication-listeners-for-ARK-bitcoin-ethereum-and-litecoin-ff98c1c792cf\",\"https://aces-ARK.io/aces-app/about\",\"https://blockchain.info/charts/transactions-per-second\",\"https://ark.io/roadmap\",\"https://ARK.io/Whitepaper.pdf\",\"https://github.com/ARKEcosystem\",\"https://ARK.io/slack\"],\"app\":\"steemit/0.1\",\"format\":\"markdown\"}"
}
]
}ankarpublished a new post: ark-dpos-smartbridges2018/01/10 02:50:15
ankarpublished a new post: ark-dpos-smartbridges
2018/01/10 02:50:15
| parent author | |
| parent permlink | cn |
| author | ankar |
| permlink | ark-dpos-smartbridges |
| title | ARK 简介 - DPOS 区块链与 SmartBridges |
| body |  [ARK](https://ARK.io/) 的宗旨是**使区块链被更广泛使用**(increasing consumer adoption)。以技术上来说 ARK 是基于一个 **DPOS 区块链**,并有原生的 **ARK** 虚拟货币。最主要的功能是让使用者可透过 ARK 平台和其他区块链互动,他们称这个技术叫做 “**SmartBridges**”。如果未来区块链被广泛地使用,不太可能使用者在每次使用前都要先透过交易所兑换;如果可以透过单一入口和其他区块链互动,确实更能让使用者接受。ARK 主网已于 2017/3 上线,且有相当活跃的社群。本文主要希望了解 ARK 的核心部分,**DPOS 区块链** 和 **SmartBridges**。 ## DPOS 区块链 ARK 的 DPOS 区块链完全基于 [Lisk](https://lisk.io/)(详细可参考我翻译的另一篇文章 [Lisk 简介 - DPOS 共识网路](https://www.jianshu.com/p/b76649f4ae02))。但 ARK 在参数上做调整,共有 51 个 delegated 节点,负责产生新区块。delegated 节点可收取 2 ARK(随时间递减) 的区块报酬和交易手续费。每 8 秒产生一个新区块。每一轮均由 51 个 delegated 节点轮流产生新的区块。delegated 节点由社群共同选出,任何人只要花费 25 ARK(stake)都有资格参选。[官方论坛](https://forum.ARK.io/category/5/delegates)上可以看到大家参选和讨论的情况满踊跃。这个架构好处是简单易懂,且完全可由社群自主经营,并且目前已上线证明初步可行。大多参选者为了吸引投票者,会将得到的所有报酬按比例分给投票者,很大程度弥补了许多区块链技术在交易量扩大后产生交易手续费过高的问题。而根据白皮数描述目前交易上限是 25 tx/block(在 [ARK-node](https://github.com/ARKEcosystem/ARK-node/tree/development/helpers) 实作中每个区块约 2MB 的交易资料 payload),白皮书中有提到许多改进方式,具题如何还有待之后的更新版本释出。 可透过 [ARK Blockchain Explorer](https://explorer.ARK.land/delegateMonitor) 看到即时的出块情况,包含即将要出块的 delegated 节点和所有 delegated 节点的详细资讯等:  ## SmartBridges ARK 使用者可以透过 SmartBridges 和其他区块链互动,听起来很酷。实际上 SmartBridges 由两个部分组成:交易中附加的一段资料和负责监听那段资料并执行对应动作的 **Listener**(监听者)。下图描述一个流程**从一个 ARK 帐户发起一个交易送 ETH 至一个 ETH 帐户**:  这是一个简略的流程,补充几点没有描述到的部分: ### 如何在 ARK 交易中附加一段 SmartBridges 资料? ARK 交易中包含一特定栏位叫 **vendorField**(value: a string),只需将 SmartBridges 资料填入该栏位即可。建议可使用[桌面版钱包](https://github.com/ARKEcosystem/ARK-desktop/releases):  ### Listener 如何将 ARK 转换成 ETH? 在这篇 [ARK 共同创办人的文章](https://blog.ARK.io/what-is-the-ARK-smartbridge-and-how-does-it-work-1dd7fb1e17a0) 中提到,Listener 在这个情境下需要介接可币换币的交易所(例如:Shapeshift)。因为汇率变动快,使用者在送交易前应先向 Listener 查询目前汇率及所需要的手续费。并先取得 Listener 提供的一段 SmartBridges 资料,再送交易时填入 **vendorField**,借此让 Listener 识别出这个交易。在 Listener 收到包含此段 SmartBridges 资料的交易时,将 ARK 扣除手续费后和交易所兑换等值 ETH,并发送至使用者指定的 ETH 帐户。 根据 [ACES Completes ARK Authentication Listeners for ARK, Bitcoin, Ethereum, and Litecoin](https://medium.com/@ARKaces/aces-completes-ARK-authentication-listeners-for-ARK-bitcoin-ethereum-and-litecoin-ff98c1c792cf) 目前已实作出比特币、以太坊和莱特币的 Listener,这部分笔者还没下载来测试过但均有开源。也有 [live demo](https://aces-ARK.io/aces-app/about) 可以实际操作用 ARK 交换 testnet(Ropsten) ETH。 ### 小结 根据以上,使用 ARK 透过 SmartBridges 交换 ETH,和直接使用 Shapeshift 这类服务的差别在,透过使用 SmartBridges 可将这笔交易请求纪录在区块链上,付款后如果 Shapeshift 系统出问题或甚至不认帐,可以有一个可靠的资料来源佐证确实有这笔交易请求,但这也仰赖 Listener 的服务提供商做可靠的担保,实际接受度有赖这类服务上线后市场验证。另外,以此类推也可以使用 ARK 透过 SmartBridges 调用以太坊智能合约,甚至未来有其他的智能合约平台出现,只要实作该平台对应的 Listener 就可用同样方式与之互动。而目前主要问题是在限制节点数量的情况下,目前 TPS(约等于[比特币](https://blockchain.info/charts/transactions-per-second)) 太低,ARK Core V2 声称会重写整个 core,包含增加 TPS 及许多项改善。其他 Ark 的未来发展也可参考 [ARK roadmap](https://ark.io/roadmap)。 ## References - [ARK whitepaper](https://ARK.io/Whitepaper.pdf) - [ARK Github](https://github.com/ARKEcosystem) - [ARK Slack](https://ARK.io/slack) |
| json metadata | {"tags":["cn","blockchain","ark","lisk","eth"],"image":["https://i.imgur.com/zO6xain.jpg","https://i.imgur.com/vRYD7PD.png","https://i.imgur.com/MyHbbrb.png","https://i.imgur.com/JbKNndC.png"],"links":["https://ARK.io/","https://lisk.io/","https://www.jianshu.com/p/b76649f4ae02","https://forum.ARK.io/category/5/delegates","https://github.com/ARKEcosystem/ARK-node/tree/development/helpers","https://explorer.ARK.land/delegateMonitor","https://github.com/ARKEcosystem/ARK-desktop/releases","https://blog.ARK.io/what-is-the-ARK-smartbridge-and-how-does-it-work-1dd7fb1e17a0","https://medium.com/@ARKaces/aces-completes-ARK-authentication-listeners-for-ARK-bitcoin-ethereum-and-litecoin-ff98c1c792cf","https://aces-ARK.io/aces-app/about","https://blockchain.info/charts/transactions-per-second","https://ark.io/roadmap","https://ARK.io/Whitepaper.pdf","https://github.com/ARKEcosystem","https://ARK.io/slack"],"app":"steemit/0.1","format":"markdown"} |
| Transaction Info | Block #18843788/Trx d7c339f045f5fa70e31901982e6eae378255c925 |
View Raw JSON Data
{
"trx_id": "d7c339f045f5fa70e31901982e6eae378255c925",
"block": 18843788,
"trx_in_block": 27,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-10T02:50:15",
"op": [
"comment",
{
"parent_author": "",
"parent_permlink": "cn",
"author": "ankar",
"permlink": "ark-dpos-smartbridges",
"title": "ARK 简介 - DPOS 区块链与 SmartBridges",
"body": "\n\n[ARK](https://ARK.io/) 的宗旨是**使区块链被更广泛使用**(increasing consumer adoption)。以技术上来说 ARK 是基于一个 **DPOS 区块链**,并有原生的 **ARK** 虚拟货币。最主要的功能是让使用者可透过 ARK 平台和其他区块链互动,他们称这个技术叫做 “**SmartBridges**”。如果未来区块链被广泛地使用,不太可能使用者在每次使用前都要先透过交易所兑换;如果可以透过单一入口和其他区块链互动,确实更能让使用者接受。ARK 主网已于 2017/3 上线,且有相当活跃的社群。本文主要希望了解 ARK 的核心部分,**DPOS 区块链** 和 **SmartBridges**。\n\n## DPOS 区块链\n\nARK 的 DPOS 区块链完全基于 [Lisk](https://lisk.io/)(详细可参考我翻译的另一篇文章 [Lisk 简介 - DPOS 共识网路](https://www.jianshu.com/p/b76649f4ae02))。但 ARK 在参数上做调整,共有 51 个 delegated 节点,负责产生新区块。delegated 节点可收取 2 ARK(随时间递减) 的区块报酬和交易手续费。每 8 秒产生一个新区块。每一轮均由 51 个 delegated 节点轮流产生新的区块。delegated 节点由社群共同选出,任何人只要花费 25 ARK(stake)都有资格参选。[官方论坛](https://forum.ARK.io/category/5/delegates)上可以看到大家参选和讨论的情况满踊跃。这个架构好处是简单易懂,且完全可由社群自主经营,并且目前已上线证明初步可行。大多参选者为了吸引投票者,会将得到的所有报酬按比例分给投票者,很大程度弥补了许多区块链技术在交易量扩大后产生交易手续费过高的问题。而根据白皮数描述目前交易上限是 25 tx/block(在 [ARK-node](https://github.com/ARKEcosystem/ARK-node/tree/development/helpers) 实作中每个区块约 2MB 的交易资料 payload),白皮书中有提到许多改进方式,具题如何还有待之后的更新版本释出。\n\n可透过 [ARK Blockchain Explorer](https://explorer.ARK.land/delegateMonitor) 看到即时的出块情况,包含即将要出块的 delegated 节点和所有 delegated 节点的详细资讯等:\n\n\n\n## SmartBridges\n\nARK 使用者可以透过 SmartBridges 和其他区块链互动,听起来很酷。实际上 SmartBridges 由两个部分组成:交易中附加的一段资料和负责监听那段资料并执行对应动作的 **Listener**(监听者)。下图描述一个流程**从一个 ARK 帐户发起一个交易送 ETH 至一个 ETH 帐户**:\n\n\n\n这是一个简略的流程,补充几点没有描述到的部分:\n\n### 如何在 ARK 交易中附加一段 SmartBridges 资料?\n\nARK 交易中包含一特定栏位叫 **vendorField**(value: a string),只需将 SmartBridges 资料填入该栏位即可。建议可使用[桌面版钱包](https://github.com/ARKEcosystem/ARK-desktop/releases):\n\n\n\n### Listener 如何将 ARK 转换成 ETH?\n\n在这篇 [ARK 共同创办人的文章](https://blog.ARK.io/what-is-the-ARK-smartbridge-and-how-does-it-work-1dd7fb1e17a0) 中提到,Listener 在这个情境下需要介接可币换币的交易所(例如:Shapeshift)。因为汇率变动快,使用者在送交易前应先向 Listener 查询目前汇率及所需要的手续费。并先取得 Listener 提供的一段 SmartBridges 资料,再送交易时填入 **vendorField**,借此让 Listener 识别出这个交易。在 Listener 收到包含此段 SmartBridges 资料的交易时,将 ARK 扣除手续费后和交易所兑换等值 ETH,并发送至使用者指定的 ETH 帐户。\n\n根据 [ACES Completes ARK Authentication Listeners for ARK, Bitcoin, Ethereum, and Litecoin](https://medium.com/@ARKaces/aces-completes-ARK-authentication-listeners-for-ARK-bitcoin-ethereum-and-litecoin-ff98c1c792cf) 目前已实作出比特币、以太坊和莱特币的 Listener,这部分笔者还没下载来测试过但均有开源。也有 [live demo](https://aces-ARK.io/aces-app/about) 可以实际操作用 ARK 交换 testnet(Ropsten) ETH。\n\n### 小结\n\n根据以上,使用 ARK 透过 SmartBridges 交换 ETH,和直接使用 Shapeshift 这类服务的差别在,透过使用 SmartBridges 可将这笔交易请求纪录在区块链上,付款后如果 Shapeshift 系统出问题或甚至不认帐,可以有一个可靠的资料来源佐证确实有这笔交易请求,但这也仰赖 Listener 的服务提供商做可靠的担保,实际接受度有赖这类服务上线后市场验证。另外,以此类推也可以使用 ARK 透过 SmartBridges 调用以太坊智能合约,甚至未来有其他的智能合约平台出现,只要实作该平台对应的 Listener 就可用同样方式与之互动。而目前主要问题是在限制节点数量的情况下,目前 TPS(约等于[比特币](https://blockchain.info/charts/transactions-per-second)) 太低,ARK Core V2 声称会重写整个 core,包含增加 TPS 及许多项改善。其他 Ark 的未来发展也可参考 [ARK roadmap](https://ark.io/roadmap)。\n\n## References\n\n- [ARK whitepaper](https://ARK.io/Whitepaper.pdf)\n- [ARK Github](https://github.com/ARKEcosystem)\n- [ARK Slack](https://ARK.io/slack)",
"json_metadata": "{\"tags\":[\"cn\",\"blockchain\",\"ark\",\"lisk\",\"eth\"],\"image\":[\"https://i.imgur.com/zO6xain.jpg\",\"https://i.imgur.com/vRYD7PD.png\",\"https://i.imgur.com/MyHbbrb.png\",\"https://i.imgur.com/JbKNndC.png\"],\"links\":[\"https://ARK.io/\",\"https://lisk.io/\",\"https://www.jianshu.com/p/b76649f4ae02\",\"https://forum.ARK.io/category/5/delegates\",\"https://github.com/ARKEcosystem/ARK-node/tree/development/helpers\",\"https://explorer.ARK.land/delegateMonitor\",\"https://github.com/ARKEcosystem/ARK-desktop/releases\",\"https://blog.ARK.io/what-is-the-ARK-smartbridge-and-how-does-it-work-1dd7fb1e17a0\",\"https://medium.com/@ARKaces/aces-completes-ARK-authentication-listeners-for-ARK-bitcoin-ethereum-and-litecoin-ff98c1c792cf\",\"https://aces-ARK.io/aces-app/about\",\"https://blockchain.info/charts/transactions-per-second\",\"https://ark.io/roadmap\",\"https://ARK.io/Whitepaper.pdf\",\"https://github.com/ARKEcosystem\",\"https://ARK.io/slack\"],\"app\":\"steemit/0.1\",\"format\":\"markdown\"}"
}
]
}ankarpublished a new post: ark-dpos-smartbridges2018/01/10 02:49:51
ankarpublished a new post: ark-dpos-smartbridges
2018/01/10 02:49:51
| parent author | |
| parent permlink | cn |
| author | ankar |
| permlink | ark-dpos-smartbridges |
| title | ARK 简介 - DPOS 区块链与 SmartBridges |
| body | @@ -2681,17 +2681,16 @@ %E4%B8%8A%E7%BA%BF%E5%90%8E%E5%B8%82%E5%9C%BA%E9%AA%8C%E8%AF%81%E3%80%82 -%0A %E5%8F%A6%E5%A4%96%EF%BC%8C%E4%BB%A5%E6%AD%A4%E7%B1%BB%E6%8E%A8%E4%B9%9F |
| json metadata | {"tags":["cn","blockchain","ark","lisk","eth"],"image":["https://i.imgur.com/zO6xain.jpg","https://i.imgur.com/vRYD7PD.png","https://i.imgur.com/MyHbbrb.png","https://i.imgur.com/JbKNndC.png"],"links":["https://ARK.io/","https://lisk.io/","https://www.jianshu.com/p/b76649f4ae02","https://forum.ARK.io/category/5/delegates","https://github.com/ARKEcosystem/ARK-node/tree/development/helpers","https://explorer.ARK.land/delegateMonitor","https://github.com/ARKEcosystem/ARK-desktop/releases","https://blog.ARK.io/what-is-the-ARK-smartbridge-and-how-does-it-work-1dd7fb1e17a0","https://medium.com/@ARKaces/aces-completes-ARK-authentication-listeners-for-ARK-bitcoin-ethereum-and-litecoin-ff98c1c792cf","https://aces-ARK.io/aces-app/about","https://blockchain.info/charts/transactions-per-second","https://ark.io/roadmap","https://ARK.io/Whitepaper.pdf","https://github.com/ARKEcosystem","https://ARK.io/slack"],"app":"steemit/0.1","format":"markdown"} |
| Transaction Info | Block #18843780/Trx 3012f8215effffc04f18aa98bc403836c5fc5bc1 |
View Raw JSON Data
{
"trx_id": "3012f8215effffc04f18aa98bc403836c5fc5bc1",
"block": 18843780,
"trx_in_block": 7,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-10T02:49:51",
"op": [
"comment",
{
"parent_author": "",
"parent_permlink": "cn",
"author": "ankar",
"permlink": "ark-dpos-smartbridges",
"title": "ARK 简介 - DPOS 区块链与 SmartBridges",
"body": "@@ -2681,17 +2681,16 @@\n %E4%B8%8A%E7%BA%BF%E5%90%8E%E5%B8%82%E5%9C%BA%E9%AA%8C%E8%AF%81%E3%80%82\n-%0A\n %E5%8F%A6%E5%A4%96%EF%BC%8C%E4%BB%A5%E6%AD%A4%E7%B1%BB%E6%8E%A8%E4%B9%9F\n",
"json_metadata": "{\"tags\":[\"cn\",\"blockchain\",\"ark\",\"lisk\",\"eth\"],\"image\":[\"https://i.imgur.com/zO6xain.jpg\",\"https://i.imgur.com/vRYD7PD.png\",\"https://i.imgur.com/MyHbbrb.png\",\"https://i.imgur.com/JbKNndC.png\"],\"links\":[\"https://ARK.io/\",\"https://lisk.io/\",\"https://www.jianshu.com/p/b76649f4ae02\",\"https://forum.ARK.io/category/5/delegates\",\"https://github.com/ARKEcosystem/ARK-node/tree/development/helpers\",\"https://explorer.ARK.land/delegateMonitor\",\"https://github.com/ARKEcosystem/ARK-desktop/releases\",\"https://blog.ARK.io/what-is-the-ARK-smartbridge-and-how-does-it-work-1dd7fb1e17a0\",\"https://medium.com/@ARKaces/aces-completes-ARK-authentication-listeners-for-ARK-bitcoin-ethereum-and-litecoin-ff98c1c792cf\",\"https://aces-ARK.io/aces-app/about\",\"https://blockchain.info/charts/transactions-per-second\",\"https://ark.io/roadmap\",\"https://ARK.io/Whitepaper.pdf\",\"https://github.com/ARKEcosystem\",\"https://ARK.io/slack\"],\"app\":\"steemit/0.1\",\"format\":\"markdown\"}"
}
]
}2018/01/09 16:38:00
2018/01/09 16:38:00
| parent author | liubo0622 |
| parent permlink | re-ankar-ark-dpos-smartbridges-20180108t142537543z |
| author | ankar |
| permlink | re-liubo0622-re-ankar-ark-dpos-smartbridges-20180109t163800234z |
| title | |
| body | EOS 我也覺得不錯,但還是持續學習學習 |
| json metadata | {"tags":["cn"],"app":"steemit/0.1"} |
| Transaction Info | Block #18831550/Trx 0a36c9ae48899f5b33e1627db116e76f22cc7f22 |
View Raw JSON Data
{
"trx_id": "0a36c9ae48899f5b33e1627db116e76f22cc7f22",
"block": 18831550,
"trx_in_block": 11,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-09T16:38:00",
"op": [
"comment",
{
"parent_author": "liubo0622",
"parent_permlink": "re-ankar-ark-dpos-smartbridges-20180108t142537543z",
"author": "ankar",
"permlink": "re-liubo0622-re-ankar-ark-dpos-smartbridges-20180109t163800234z",
"title": "",
"body": "EOS 我也覺得不錯,但還是持續學習學習",
"json_metadata": "{\"tags\":[\"cn\"],\"app\":\"steemit/0.1\"}"
}
]
}ankarcustom json: follow2018/01/09 15:34:36
ankarcustom json: follow
2018/01/09 15:34:36
| required auths | [] |
| required posting auths | ["ankar"] |
| id | follow |
| json | ["reblog",{"account":"ankar","author":"oflyhigh","permlink":"dogecoin"}] |
| Transaction Info | Block #18830282/Trx 0926eb930122d469d50cc4feaaf9a469f3cef5d4 |
View Raw JSON Data
{
"trx_id": "0926eb930122d469d50cc4feaaf9a469f3cef5d4",
"block": 18830282,
"trx_in_block": 19,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-09T15:34:36",
"op": [
"custom_json",
{
"required_auths": [],
"required_posting_auths": [
"ankar"
],
"id": "follow",
"json": "[\"reblog\",{\"account\":\"ankar\",\"author\":\"oflyhigh\",\"permlink\":\"dogecoin\"}]"
}
]
}ankarupvoted (100.00%) @ankar / ark-dpos-smartbridges2018/01/09 15:31:03
ankarupvoted (100.00%) @ankar / ark-dpos-smartbridges
2018/01/09 15:31:03
| voter | ankar |
| author | ankar |
| permlink | ark-dpos-smartbridges |
| weight | 10000 (100.00%) |
| Transaction Info | Block #18830211/Trx 62e4135663dad83177bd877f08e1e9226031cd5a |
View Raw JSON Data
{
"trx_id": "62e4135663dad83177bd877f08e1e9226031cd5a",
"block": 18830211,
"trx_in_block": 38,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-09T15:31:03",
"op": [
"vote",
{
"voter": "ankar",
"author": "ankar",
"permlink": "ark-dpos-smartbridges",
"weight": 10000
}
]
}ankarpublished a new post: ark-dpos-smartbridges2018/01/09 09:50:18
ankarpublished a new post: ark-dpos-smartbridges
2018/01/09 09:50:18
| parent author | |
| parent permlink | cn |
| author | ankar |
| permlink | ark-dpos-smartbridges |
| title | ARK 简介 - DPOS 区块链与 SmartBridges |
| body | @@ -1476,15 +1476,15 @@ com/ -uUhUEia +MyHbbrb .png |
| json metadata | {"tags":["cn","blockchain","ark","lisk","eth"],"image":["https://i.imgur.com/zO6xain.jpg","https://i.imgur.com/vRYD7PD.png","https://i.imgur.com/MyHbbrb.png","https://i.imgur.com/JbKNndC.png"],"links":["https://ARK.io/","https://lisk.io/","https://www.jianshu.com/p/b76649f4ae02","https://forum.ARK.io/category/5/delegates","https://github.com/ARKEcosystem/ARK-node/tree/development/helpers","https://explorer.ARK.land/delegateMonitor","https://github.com/ARKEcosystem/ARK-desktop/releases","https://blog.ARK.io/what-is-the-ARK-smartbridge-and-how-does-it-work-1dd7fb1e17a0","https://medium.com/@ARKaces/aces-completes-ARK-authentication-listeners-for-ARK-bitcoin-ethereum-and-litecoin-ff98c1c792cf","https://aces-ARK.io/aces-app/about","https://blockchain.info/charts/transactions-per-second","https://ark.io/roadmap","https://ARK.io/Whitepaper.pdf","https://github.com/ARKEcosystem","https://ARK.io/slack"],"app":"steemit/0.1","format":"markdown"} |
| Transaction Info | Block #18823400/Trx 8507ac9092ca0c662ce123f832f42fb5cfd3eccd |
View Raw JSON Data
{
"trx_id": "8507ac9092ca0c662ce123f832f42fb5cfd3eccd",
"block": 18823400,
"trx_in_block": 48,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-09T09:50:18",
"op": [
"comment",
{
"parent_author": "",
"parent_permlink": "cn",
"author": "ankar",
"permlink": "ark-dpos-smartbridges",
"title": "ARK 简介 - DPOS 区块链与 SmartBridges",
"body": "@@ -1476,15 +1476,15 @@\n com/\n-uUhUEia\n+MyHbbrb\n .png\n",
"json_metadata": "{\"tags\":[\"cn\",\"blockchain\",\"ark\",\"lisk\",\"eth\"],\"image\":[\"https://i.imgur.com/zO6xain.jpg\",\"https://i.imgur.com/vRYD7PD.png\",\"https://i.imgur.com/MyHbbrb.png\",\"https://i.imgur.com/JbKNndC.png\"],\"links\":[\"https://ARK.io/\",\"https://lisk.io/\",\"https://www.jianshu.com/p/b76649f4ae02\",\"https://forum.ARK.io/category/5/delegates\",\"https://github.com/ARKEcosystem/ARK-node/tree/development/helpers\",\"https://explorer.ARK.land/delegateMonitor\",\"https://github.com/ARKEcosystem/ARK-desktop/releases\",\"https://blog.ARK.io/what-is-the-ARK-smartbridge-and-how-does-it-work-1dd7fb1e17a0\",\"https://medium.com/@ARKaces/aces-completes-ARK-authentication-listeners-for-ARK-bitcoin-ethereum-and-litecoin-ff98c1c792cf\",\"https://aces-ARK.io/aces-app/about\",\"https://blockchain.info/charts/transactions-per-second\",\"https://ark.io/roadmap\",\"https://ARK.io/Whitepaper.pdf\",\"https://github.com/ARKEcosystem\",\"https://ARK.io/slack\"],\"app\":\"steemit/0.1\",\"format\":\"markdown\"}"
}
]
}cqfupvoted (1.00%) @ankar / ark-dpos-smartbridges2018/01/09 09:39:06
cqfupvoted (1.00%) @ankar / ark-dpos-smartbridges
2018/01/09 09:39:06
| voter | cqf |
| author | ankar |
| permlink | ark-dpos-smartbridges |
| weight | 100 (1.00%) |
| Transaction Info | Block #18823176/Trx d0626e8223ccec93287912098c0fe81b29de2eb0 |
View Raw JSON Data
{
"trx_id": "d0626e8223ccec93287912098c0fe81b29de2eb0",
"block": 18823176,
"trx_in_block": 24,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-09T09:39:06",
"op": [
"vote",
{
"voter": "cqf",
"author": "ankar",
"permlink": "ark-dpos-smartbridges",
"weight": 100
}
]
}2018/01/09 09:30:03
2018/01/09 09:30:03
| parent author | ankar |
| parent permlink | ark-dpos-smartbridges |
| author | liubo0622 |
| permlink | re-ankar-ark-dpos-smartbridges-20180108t142537543z |
| title | |
| body | 区块链只觉得eos不错 |
| json metadata | {"tags":["cn"],"app":"steemit/0.1"} |
| Transaction Info | Block #18822995/Trx 386bd89eaa93777824f055f1ac810f5635c12cdb |
View Raw JSON Data
{
"trx_id": "386bd89eaa93777824f055f1ac810f5635c12cdb",
"block": 18822995,
"trx_in_block": 7,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-09T09:30:03",
"op": [
"comment",
{
"parent_author": "ankar",
"parent_permlink": "ark-dpos-smartbridges",
"author": "liubo0622",
"permlink": "re-ankar-ark-dpos-smartbridges-20180108t142537543z",
"title": "",
"body": "区块链只觉得eos不错",
"json_metadata": "{\"tags\":[\"cn\"],\"app\":\"steemit/0.1\"}"
}
]
}ankarpublished a new post: ark-dpos-smartbridges2018/01/09 09:28:27
ankarpublished a new post: ark-dpos-smartbridges
2018/01/09 09:28:27
| parent author | |
| parent permlink | cn |
| author | ankar |
| permlink | ark-dpos-smartbridges |
| title | ARK 简介 - DPOS 区块链与 SmartBridges |
| body |  [ARK](https://ARK.io/) 的宗旨是**使区块链被更广泛使用**(increasing consumer adoption)。以技术上来说 ARK 是基于一个 **DPOS 区块链**,并有原生的 **ARK** 虚拟货币。最主要的功能是让使用者可透过 ARK 平台和其他区块链互动,他们称这个技术叫做 “**SmartBridges**”。如果未来区块链被广泛地使用,不太可能使用者在每次使用前都要先透过交易所兑换;如果可以透过单一入口和其他区块链互动,确实更能让使用者接受。ARK 主网已于 2017/3 上线,且有相当活跃的社群。本文主要希望了解 ARK 的核心部分,**DPOS 区块链** 和 **SmartBridges**。 ## DPOS 区块链 ARK 的 DPOS 区块链完全基于 [Lisk](https://lisk.io/)(详细可参考我翻译的另一篇文章 [Lisk 简介 - DPOS 共识网路](https://www.jianshu.com/p/b76649f4ae02))。但 ARK 在参数上做调整,共有 51 个 delegated 节点,负责产生新区块。delegated 节点可收取 2 ARK(随时间递减) 的区块报酬和交易手续费。每 8 秒产生一个新区块。每一轮均由 51 个 delegated 节点轮流产生新的区块。delegated 节点由社群共同选出,任何人只要花费 25 ARK(stake)都有资格参选。[官方论坛](https://forum.ARK.io/category/5/delegates)上可以看到大家参选和讨论的情况满踊跃。这个架构好处是简单易懂,且完全可由社群自主经营,并且目前已上线证明初步可行。大多参选者为了吸引投票者,会将得到的所有报酬按比例分给投票者,很大程度弥补了许多区块链技术在交易量扩大后产生交易手续费过高的问题。而根据白皮数描述目前交易上限是 25 tx/block(在 [ARK-node](https://github.com/ARKEcosystem/ARK-node/tree/development/helpers) 实作中每个区块约 2MB 的交易资料 payload),白皮书中有提到许多改进方式,具题如何还有待之后的更新版本释出。 可透过 [ARK Blockchain Explorer](https://explorer.ARK.land/delegateMonitor) 看到即时的出块情况,包含即将要出块的 delegated 节点和所有 delegated 节点的详细资讯等:  ## SmartBridges ARK 使用者可以透过 SmartBridges 和其他区块链互动,听起来很酷。实际上 SmartBridges 由两个部分组成:交易中附加的一段资料和负责监听那段资料并执行对应动作的 **Listener**(监听者)。下图描述一个流程**从一个 ARK 帐户发起一个交易送 ETH 至一个 ETH 帐户**:  这是一个简略的流程,补充几点没有描述到的部分: ### 如何在 ARK 交易中附加一段 SmartBridges 资料? ARK 交易中包含一特定栏位叫 **vendorField**(value: a string),只需将 SmartBridges 资料填入该栏位即可。建议可使用[桌面版钱包](https://github.com/ARKEcosystem/ARK-desktop/releases):  ### Listener 如何将 ARK 转换成 ETH? 在这篇 [ARK 共同创办人的文章](https://blog.ARK.io/what-is-the-ARK-smartbridge-and-how-does-it-work-1dd7fb1e17a0) 中提到,Listener 在这个情境下需要介接可币换币的交易所(例如:Shapeshift)。因为汇率变动快,使用者在送交易前应先向 Listener 查询目前汇率及所需要的手续费。并先取得 Listener 提供的一段 SmartBridges 资料,再送交易时填入 **vendorField**,借此让 Listener 识别出这个交易。在 Listener 收到包含此段 SmartBridges 资料的交易时,将 ARK 扣除手续费后和交易所兑换等值 ETH,并发送至使用者指定的 ETH 帐户。 根据 [ACES Completes ARK Authentication Listeners for ARK, Bitcoin, Ethereum, and Litecoin](https://medium.com/@ARKaces/aces-completes-ARK-authentication-listeners-for-ARK-bitcoin-ethereum-and-litecoin-ff98c1c792cf) 目前已实作出比特币、以太坊和莱特币的 Listener,这部分笔者还没下载来测试过但均有开源。也有 [live demo](https://aces-ARK.io/aces-app/about) 可以实际操作用 ARK 交换 testnet(Ropsten) ETH。 ### 小结 根据以上,使用 ARK 透过 SmartBridges 交换 ETH,和直接使用 Shapeshift 这类服务的差别在,透过使用 SmartBridges 可将这笔交易请求纪录在区块链上,付款后如果 Shapeshift 系统出问题或甚至不认帐,可以有一个可靠的资料来源佐证确实有这笔交易请求,但这也仰赖 Listener 的服务提供商做可靠的担保,实际接受度有赖这类服务上线后市场验证。 另外,以此类推也可以使用 ARK 透过 SmartBridges 调用以太坊智能合约,甚至未来有其他的智能合约平台出现,只要实作该平台对应的 Listener 就可用同样方式与之互动。而目前主要问题是在限制节点数量的情况下,目前 TPS(约等于[比特币](https://blockchain.info/charts/transactions-per-second)) 太低,ARK Core V2 声称会重写整个 core,包含增加 TPS 及许多项改善。其他 Ark 的未来发展也可参考 [ARK roadmap](https://ark.io/roadmap)。 ## References - [ARK whitepaper](https://ARK.io/Whitepaper.pdf) - [ARK Github](https://github.com/ARKEcosystem) - [ARK Slack](https://ARK.io/slack) |
| json metadata | {"tags":["cn","blockchain","ark","lisk","eth"],"image":["https://i.imgur.com/zO6xain.jpg","https://i.imgur.com/vRYD7PD.png","https://i.imgur.com/uUhUEia.png","https://i.imgur.com/JbKNndC.png"],"links":["https://ARK.io/","https://lisk.io/","https://www.jianshu.com/p/b76649f4ae02","https://forum.ARK.io/category/5/delegates","https://github.com/ARKEcosystem/ARK-node/tree/development/helpers","https://explorer.ARK.land/delegateMonitor","https://github.com/ARKEcosystem/ARK-desktop/releases","https://blog.ARK.io/what-is-the-ARK-smartbridge-and-how-does-it-work-1dd7fb1e17a0","https://medium.com/@ARKaces/aces-completes-ARK-authentication-listeners-for-ARK-bitcoin-ethereum-and-litecoin-ff98c1c792cf","https://aces-ARK.io/aces-app/about","https://blockchain.info/charts/transactions-per-second","https://ark.io/roadmap","https://ARK.io/Whitepaper.pdf","https://github.com/ARKEcosystem","https://ARK.io/slack"],"app":"steemit/0.1","format":"markdown"} |
| Transaction Info | Block #18822963/Trx feb51aed4e3fe10c7b502b5b2da538c17cfb59a8 |
View Raw JSON Data
{
"trx_id": "feb51aed4e3fe10c7b502b5b2da538c17cfb59a8",
"block": 18822963,
"trx_in_block": 52,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-09T09:28:27",
"op": [
"comment",
{
"parent_author": "",
"parent_permlink": "cn",
"author": "ankar",
"permlink": "ark-dpos-smartbridges",
"title": "ARK 简介 - DPOS 区块链与 SmartBridges",
"body": "\n\n[ARK](https://ARK.io/) 的宗旨是**使区块链被更广泛使用**(increasing consumer adoption)。以技术上来说 ARK 是基于一个 **DPOS 区块链**,并有原生的 **ARK** 虚拟货币。最主要的功能是让使用者可透过 ARK 平台和其他区块链互动,他们称这个技术叫做 “**SmartBridges**”。如果未来区块链被广泛地使用,不太可能使用者在每次使用前都要先透过交易所兑换;如果可以透过单一入口和其他区块链互动,确实更能让使用者接受。ARK 主网已于 2017/3 上线,且有相当活跃的社群。本文主要希望了解 ARK 的核心部分,**DPOS 区块链** 和 **SmartBridges**。\n\n## DPOS 区块链\n\nARK 的 DPOS 区块链完全基于 [Lisk](https://lisk.io/)(详细可参考我翻译的另一篇文章 [Lisk 简介 - DPOS 共识网路](https://www.jianshu.com/p/b76649f4ae02))。但 ARK 在参数上做调整,共有 51 个 delegated 节点,负责产生新区块。delegated 节点可收取 2 ARK(随时间递减) 的区块报酬和交易手续费。每 8 秒产生一个新区块。每一轮均由 51 个 delegated 节点轮流产生新的区块。delegated 节点由社群共同选出,任何人只要花费 25 ARK(stake)都有资格参选。[官方论坛](https://forum.ARK.io/category/5/delegates)上可以看到大家参选和讨论的情况满踊跃。这个架构好处是简单易懂,且完全可由社群自主经营,并且目前已上线证明初步可行。大多参选者为了吸引投票者,会将得到的所有报酬按比例分给投票者,很大程度弥补了许多区块链技术在交易量扩大后产生交易手续费过高的问题。而根据白皮数描述目前交易上限是 25 tx/block(在 [ARK-node](https://github.com/ARKEcosystem/ARK-node/tree/development/helpers) 实作中每个区块约 2MB 的交易资料 payload),白皮书中有提到许多改进方式,具题如何还有待之后的更新版本释出。\n\n可透过 [ARK Blockchain Explorer](https://explorer.ARK.land/delegateMonitor) 看到即时的出块情况,包含即将要出块的 delegated 节点和所有 delegated 节点的详细资讯等:\n\n\n\n## SmartBridges\n\nARK 使用者可以透过 SmartBridges 和其他区块链互动,听起来很酷。实际上 SmartBridges 由两个部分组成:交易中附加的一段资料和负责监听那段资料并执行对应动作的 **Listener**(监听者)。下图描述一个流程**从一个 ARK 帐户发起一个交易送 ETH 至一个 ETH 帐户**:\n\n\n\n这是一个简略的流程,补充几点没有描述到的部分:\n\n### 如何在 ARK 交易中附加一段 SmartBridges 资料?\n\nARK 交易中包含一特定栏位叫 **vendorField**(value: a string),只需将 SmartBridges 资料填入该栏位即可。建议可使用[桌面版钱包](https://github.com/ARKEcosystem/ARK-desktop/releases):\n\n\n\n### Listener 如何将 ARK 转换成 ETH?\n\n在这篇 [ARK 共同创办人的文章](https://blog.ARK.io/what-is-the-ARK-smartbridge-and-how-does-it-work-1dd7fb1e17a0) 中提到,Listener 在这个情境下需要介接可币换币的交易所(例如:Shapeshift)。因为汇率变动快,使用者在送交易前应先向 Listener 查询目前汇率及所需要的手续费。并先取得 Listener 提供的一段 SmartBridges 资料,再送交易时填入 **vendorField**,借此让 Listener 识别出这个交易。在 Listener 收到包含此段 SmartBridges 资料的交易时,将 ARK 扣除手续费后和交易所兑换等值 ETH,并发送至使用者指定的 ETH 帐户。\n\n根据 [ACES Completes ARK Authentication Listeners for ARK, Bitcoin, Ethereum, and Litecoin](https://medium.com/@ARKaces/aces-completes-ARK-authentication-listeners-for-ARK-bitcoin-ethereum-and-litecoin-ff98c1c792cf) 目前已实作出比特币、以太坊和莱特币的 Listener,这部分笔者还没下载来测试过但均有开源。也有 [live demo](https://aces-ARK.io/aces-app/about) 可以实际操作用 ARK 交换 testnet(Ropsten) ETH。\n\n### 小结\n\n根据以上,使用 ARK 透过 SmartBridges 交换 ETH,和直接使用 Shapeshift 这类服务的差别在,透过使用 SmartBridges 可将这笔交易请求纪录在区块链上,付款后如果 Shapeshift 系统出问题或甚至不认帐,可以有一个可靠的资料来源佐证确实有这笔交易请求,但这也仰赖 Listener 的服务提供商做可靠的担保,实际接受度有赖这类服务上线后市场验证。\n另外,以此类推也可以使用 ARK 透过 SmartBridges 调用以太坊智能合约,甚至未来有其他的智能合约平台出现,只要实作该平台对应的 Listener 就可用同样方式与之互动。而目前主要问题是在限制节点数量的情况下,目前 TPS(约等于[比特币](https://blockchain.info/charts/transactions-per-second)) 太低,ARK Core V2 声称会重写整个 core,包含增加 TPS 及许多项改善。其他 Ark 的未来发展也可参考 [ARK roadmap](https://ark.io/roadmap)。\n\n## References\n\n- [ARK whitepaper](https://ARK.io/Whitepaper.pdf)\n- [ARK Github](https://github.com/ARKEcosystem)\n- [ARK Slack](https://ARK.io/slack)",
"json_metadata": "{\"tags\":[\"cn\",\"blockchain\",\"ark\",\"lisk\",\"eth\"],\"image\":[\"https://i.imgur.com/zO6xain.jpg\",\"https://i.imgur.com/vRYD7PD.png\",\"https://i.imgur.com/uUhUEia.png\",\"https://i.imgur.com/JbKNndC.png\"],\"links\":[\"https://ARK.io/\",\"https://lisk.io/\",\"https://www.jianshu.com/p/b76649f4ae02\",\"https://forum.ARK.io/category/5/delegates\",\"https://github.com/ARKEcosystem/ARK-node/tree/development/helpers\",\"https://explorer.ARK.land/delegateMonitor\",\"https://github.com/ARKEcosystem/ARK-desktop/releases\",\"https://blog.ARK.io/what-is-the-ARK-smartbridge-and-how-does-it-work-1dd7fb1e17a0\",\"https://medium.com/@ARKaces/aces-completes-ARK-authentication-listeners-for-ARK-bitcoin-ethereum-and-litecoin-ff98c1c792cf\",\"https://aces-ARK.io/aces-app/about\",\"https://blockchain.info/charts/transactions-per-second\",\"https://ark.io/roadmap\",\"https://ARK.io/Whitepaper.pdf\",\"https://github.com/ARKEcosystem\",\"https://ARK.io/slack\"],\"app\":\"steemit/0.1\",\"format\":\"markdown\"}"
}
]
}ankarpublished a new post: ark-dpos-smartbridges2018/01/09 09:28:06
ankarpublished a new post: ark-dpos-smartbridges
2018/01/09 09:28:06
| parent author | |
| parent permlink | cn |
| author | ankar |
| permlink | ark-dpos-smartbridges |
| title | # ARK 简介 - DPOS 区块链与 SmartBridges |
| body |  [ARK](https://ARK.io/) 的宗旨是**使区块链被更广泛使用**(increasing consumer adoption)。以技术上来说 ARK 是基于一个 **DPOS 区块链**,并有原生的 **ARK** 虚拟货币。最主要的功能是让使用者可透过 ARK 平台和其他区块链互动,他们称这个技术叫做 “**SmartBridges**”。如果未来区块链被广泛地使用,不太可能使用者在每次使用前都要先透过交易所兑换;如果可以透过单一入口和其他区块链互动,确实更能让使用者接受。ARK 主网已于 2017/3 上线,且有相当活跃的社群。本文主要希望了解 ARK 的核心部分,**DPOS 区块链** 和 **SmartBridges**。 ## DPOS 区块链 ARK 的 DPOS 区块链完全基于 [Lisk](https://lisk.io/)(详细可参考我翻译的另一篇文章 [Lisk 简介 - DPOS 共识网路](https://www.jianshu.com/p/b76649f4ae02))。但 ARK 在参数上做调整,共有 51 个 delegated 节点,负责产生新区块。delegated 节点可收取 2 ARK(随时间递减) 的区块报酬和交易手续费。每 8 秒产生一个新区块。每一轮均由 51 个 delegated 节点轮流产生新的区块。delegated 节点由社群共同选出,任何人只要花费 25 ARK(stake)都有资格参选。[官方论坛](https://forum.ARK.io/category/5/delegates)上可以看到大家参选和讨论的情况满踊跃。这个架构好处是简单易懂,且完全可由社群自主经营,并且目前已上线证明初步可行。大多参选者为了吸引投票者,会将得到的所有报酬按比例分给投票者,很大程度弥补了许多区块链技术在交易量扩大后产生交易手续费过高的问题。而根据白皮数描述目前交易上限是 25 tx/block(在 [ARK-node](https://github.com/ARKEcosystem/ARK-node/tree/development/helpers) 实作中每个区块约 2MB 的交易资料 payload),白皮书中有提到许多改进方式,具题如何还有待之后的更新版本释出。 可透过 [ARK Blockchain Explorer](https://explorer.ARK.land/delegateMonitor) 看到即时的出块情况,包含即将要出块的 delegated 节点和所有 delegated 节点的详细资讯等:  ## SmartBridges ARK 使用者可以透过 SmartBridges 和其他区块链互动,听起来很酷。实际上 SmartBridges 由两个部分组成:交易中附加的一段资料和负责监听那段资料并执行对应动作的 **Listener**(监听者)。下图描述一个流程**从一个 ARK 帐户发起一个交易送 ETH 至一个 ETH 帐户**:  这是一个简略的流程,补充几点没有描述到的部分: ### 如何在 ARK 交易中附加一段 SmartBridges 资料? ARK 交易中包含一特定栏位叫 **vendorField**(value: a string),只需将 SmartBridges 资料填入该栏位即可。建议可使用[桌面版钱包](https://github.com/ARKEcosystem/ARK-desktop/releases):  ### Listener 如何将 ARK 转换成 ETH? 在这篇 [ARK 共同创办人的文章](https://blog.ARK.io/what-is-the-ARK-smartbridge-and-how-does-it-work-1dd7fb1e17a0) 中提到,Listener 在这个情境下需要介接可币换币的交易所(例如:Shapeshift)。因为汇率变动快,使用者在送交易前应先向 Listener 查询目前汇率及所需要的手续费。并先取得 Listener 提供的一段 SmartBridges 资料,再送交易时填入 **vendorField**,借此让 Listener 识别出这个交易。在 Listener 收到包含此段 SmartBridges 资料的交易时,将 ARK 扣除手续费后和交易所兑换等值 ETH,并发送至使用者指定的 ETH 帐户。 根据 [ACES Completes ARK Authentication Listeners for ARK, Bitcoin, Ethereum, and Litecoin](https://medium.com/@ARKaces/aces-completes-ARK-authentication-listeners-for-ARK-bitcoin-ethereum-and-litecoin-ff98c1c792cf) 目前已实作出比特币、以太坊和莱特币的 Listener,这部分笔者还没下载来测试过但均有开源。也有 [live demo](https://aces-ARK.io/aces-app/about) 可以实际操作用 ARK 交换 testnet(Ropsten) ETH。 ### 小结 根据以上,使用 ARK 透过 SmartBridges 交换 ETH,和直接使用 Shapeshift 这类服务的差别在,透过使用 SmartBridges 可将这笔交易请求纪录在区块链上,付款后如果 Shapeshift 系统出问题或甚至不认帐,可以有一个可靠的资料来源佐证确实有这笔交易请求,但这也仰赖 Listener 的服务提供商做可靠的担保,实际接受度有赖这类服务上线后市场验证。 另外,以此类推也可以使用 ARK 透过 SmartBridges 调用以太坊智能合约,甚至未来有其他的智能合约平台出现,只要实作该平台对应的 Listener 就可用同样方式与之互动。而目前主要问题是在限制节点数量的情况下,目前 TPS(约等于[比特币](https://blockchain.info/charts/transactions-per-second)) 太低,ARK Core V2 声称会重写整个 core,包含增加 TPS 及许多项改善。其他 Ark 的未来发展也可参考 [ARK roadmap](https://ark.io/roadmap)。 ## References - [ARK whitepaper](https://ARK.io/Whitepaper.pdf) - [ARK Github](https://github.com/ARKEcosystem) - [ARK Slack](https://ARK.io/slack) |
| json metadata | {"tags":["cn","blockchain","ark","lisk","eth"],"image":["https://i.imgur.com/zO6xain.jpg","https://i.imgur.com/vRYD7PD.png","https://i.imgur.com/uUhUEia.png","https://i.imgur.com/JbKNndC.png"],"links":["https://ARK.io/","https://lisk.io/","https://www.jianshu.com/p/b76649f4ae02","https://forum.ARK.io/category/5/delegates","https://github.com/ARKEcosystem/ARK-node/tree/development/helpers","https://explorer.ARK.land/delegateMonitor","https://github.com/ARKEcosystem/ARK-desktop/releases","https://blog.ARK.io/what-is-the-ARK-smartbridge-and-how-does-it-work-1dd7fb1e17a0","https://medium.com/@ARKaces/aces-completes-ARK-authentication-listeners-for-ARK-bitcoin-ethereum-and-litecoin-ff98c1c792cf","https://aces-ARK.io/aces-app/about","https://blockchain.info/charts/transactions-per-second","https://ark.io/roadmap","https://ARK.io/Whitepaper.pdf","https://github.com/ARKEcosystem","https://ARK.io/slack"],"app":"steemit/0.1","format":"markdown"} |
| Transaction Info | Block #18822956/Trx 6e5a507b1445e3655bd1da1c9cce350d6ebe6086 |
View Raw JSON Data
{
"trx_id": "6e5a507b1445e3655bd1da1c9cce350d6ebe6086",
"block": 18822956,
"trx_in_block": 56,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-09T09:28:06",
"op": [
"comment",
{
"parent_author": "",
"parent_permlink": "cn",
"author": "ankar",
"permlink": "ark-dpos-smartbridges",
"title": "# ARK 简介 - DPOS 区块链与 SmartBridges",
"body": "\n\n[ARK](https://ARK.io/) 的宗旨是**使区块链被更广泛使用**(increasing consumer adoption)。以技术上来说 ARK 是基于一个 **DPOS 区块链**,并有原生的 **ARK** 虚拟货币。最主要的功能是让使用者可透过 ARK 平台和其他区块链互动,他们称这个技术叫做 “**SmartBridges**”。如果未来区块链被广泛地使用,不太可能使用者在每次使用前都要先透过交易所兑换;如果可以透过单一入口和其他区块链互动,确实更能让使用者接受。ARK 主网已于 2017/3 上线,且有相当活跃的社群。本文主要希望了解 ARK 的核心部分,**DPOS 区块链** 和 **SmartBridges**。\n\n## DPOS 区块链\n\nARK 的 DPOS 区块链完全基于 [Lisk](https://lisk.io/)(详细可参考我翻译的另一篇文章 [Lisk 简介 - DPOS 共识网路](https://www.jianshu.com/p/b76649f4ae02))。但 ARK 在参数上做调整,共有 51 个 delegated 节点,负责产生新区块。delegated 节点可收取 2 ARK(随时间递减) 的区块报酬和交易手续费。每 8 秒产生一个新区块。每一轮均由 51 个 delegated 节点轮流产生新的区块。delegated 节点由社群共同选出,任何人只要花费 25 ARK(stake)都有资格参选。[官方论坛](https://forum.ARK.io/category/5/delegates)上可以看到大家参选和讨论的情况满踊跃。这个架构好处是简单易懂,且完全可由社群自主经营,并且目前已上线证明初步可行。大多参选者为了吸引投票者,会将得到的所有报酬按比例分给投票者,很大程度弥补了许多区块链技术在交易量扩大后产生交易手续费过高的问题。而根据白皮数描述目前交易上限是 25 tx/block(在 [ARK-node](https://github.com/ARKEcosystem/ARK-node/tree/development/helpers) 实作中每个区块约 2MB 的交易资料 payload),白皮书中有提到许多改进方式,具题如何还有待之后的更新版本释出。\n\n可透过 [ARK Blockchain Explorer](https://explorer.ARK.land/delegateMonitor) 看到即时的出块情况,包含即将要出块的 delegated 节点和所有 delegated 节点的详细资讯等:\n\n\n\n## SmartBridges\n\nARK 使用者可以透过 SmartBridges 和其他区块链互动,听起来很酷。实际上 SmartBridges 由两个部分组成:交易中附加的一段资料和负责监听那段资料并执行对应动作的 **Listener**(监听者)。下图描述一个流程**从一个 ARK 帐户发起一个交易送 ETH 至一个 ETH 帐户**:\n\n\n\n这是一个简略的流程,补充几点没有描述到的部分:\n\n### 如何在 ARK 交易中附加一段 SmartBridges 资料?\n\nARK 交易中包含一特定栏位叫 **vendorField**(value: a string),只需将 SmartBridges 资料填入该栏位即可。建议可使用[桌面版钱包](https://github.com/ARKEcosystem/ARK-desktop/releases):\n\n\n\n### Listener 如何将 ARK 转换成 ETH?\n\n在这篇 [ARK 共同创办人的文章](https://blog.ARK.io/what-is-the-ARK-smartbridge-and-how-does-it-work-1dd7fb1e17a0) 中提到,Listener 在这个情境下需要介接可币换币的交易所(例如:Shapeshift)。因为汇率变动快,使用者在送交易前应先向 Listener 查询目前汇率及所需要的手续费。并先取得 Listener 提供的一段 SmartBridges 资料,再送交易时填入 **vendorField**,借此让 Listener 识别出这个交易。在 Listener 收到包含此段 SmartBridges 资料的交易时,将 ARK 扣除手续费后和交易所兑换等值 ETH,并发送至使用者指定的 ETH 帐户。\n\n根据 [ACES Completes ARK Authentication Listeners for ARK, Bitcoin, Ethereum, and Litecoin](https://medium.com/@ARKaces/aces-completes-ARK-authentication-listeners-for-ARK-bitcoin-ethereum-and-litecoin-ff98c1c792cf) 目前已实作出比特币、以太坊和莱特币的 Listener,这部分笔者还没下载来测试过但均有开源。也有 [live demo](https://aces-ARK.io/aces-app/about) 可以实际操作用 ARK 交换 testnet(Ropsten) ETH。\n\n### 小结\n\n根据以上,使用 ARK 透过 SmartBridges 交换 ETH,和直接使用 Shapeshift 这类服务的差别在,透过使用 SmartBridges 可将这笔交易请求纪录在区块链上,付款后如果 Shapeshift 系统出问题或甚至不认帐,可以有一个可靠的资料来源佐证确实有这笔交易请求,但这也仰赖 Listener 的服务提供商做可靠的担保,实际接受度有赖这类服务上线后市场验证。\n另外,以此类推也可以使用 ARK 透过 SmartBridges 调用以太坊智能合约,甚至未来有其他的智能合约平台出现,只要实作该平台对应的 Listener 就可用同样方式与之互动。而目前主要问题是在限制节点数量的情况下,目前 TPS(约等于[比特币](https://blockchain.info/charts/transactions-per-second)) 太低,ARK Core V2 声称会重写整个 core,包含增加 TPS 及许多项改善。其他 Ark 的未来发展也可参考 [ARK roadmap](https://ark.io/roadmap)。\n\n## References\n\n- [ARK whitepaper](https://ARK.io/Whitepaper.pdf)\n- [ARK Github](https://github.com/ARKEcosystem)\n- [ARK Slack](https://ARK.io/slack)",
"json_metadata": "{\"tags\":[\"cn\",\"blockchain\",\"ark\",\"lisk\",\"eth\"],\"image\":[\"https://i.imgur.com/zO6xain.jpg\",\"https://i.imgur.com/vRYD7PD.png\",\"https://i.imgur.com/uUhUEia.png\",\"https://i.imgur.com/JbKNndC.png\"],\"links\":[\"https://ARK.io/\",\"https://lisk.io/\",\"https://www.jianshu.com/p/b76649f4ae02\",\"https://forum.ARK.io/category/5/delegates\",\"https://github.com/ARKEcosystem/ARK-node/tree/development/helpers\",\"https://explorer.ARK.land/delegateMonitor\",\"https://github.com/ARKEcosystem/ARK-desktop/releases\",\"https://blog.ARK.io/what-is-the-ARK-smartbridge-and-how-does-it-work-1dd7fb1e17a0\",\"https://medium.com/@ARKaces/aces-completes-ARK-authentication-listeners-for-ARK-bitcoin-ethereum-and-litecoin-ff98c1c792cf\",\"https://aces-ARK.io/aces-app/about\",\"https://blockchain.info/charts/transactions-per-second\",\"https://ark.io/roadmap\",\"https://ARK.io/Whitepaper.pdf\",\"https://github.com/ARKEcosystem\",\"https://ARK.io/slack\"],\"app\":\"steemit/0.1\",\"format\":\"markdown\"}"
}
]
}2018/01/09 09:26:30
2018/01/09 09:26:30
| required auths | [] |
| required posting auths | ["ankar"] |
| id | follow |
| json | ["follow",{"follower":"ankar","following":"oflyhigh","what":["blog"]}] |
| Transaction Info | Block #18822924/Trx b778f4f6556460b0f3eb8a200e42626e6b483c6e |
View Raw JSON Data
{
"trx_id": "b778f4f6556460b0f3eb8a200e42626e6b483c6e",
"block": 18822924,
"trx_in_block": 19,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-09T09:26:30",
"op": [
"custom_json",
{
"required_auths": [],
"required_posting_auths": [
"ankar"
],
"id": "follow",
"json": "[\"follow\",{\"follower\":\"ankar\",\"following\":\"oflyhigh\",\"what\":[\"blog\"]}]"
}
]
}2018/01/09 09:26:06
2018/01/09 09:26:06
| voter | ankar |
| author | oflyhigh |
| permlink | dogecoin |
| weight | 10000 (100.00%) |
| Transaction Info | Block #18822916/Trx 79dc6f3e7c4dee30806c0707ef5d49df3b6e105a |
View Raw JSON Data
{
"trx_id": "79dc6f3e7c4dee30806c0707ef5d49df3b6e105a",
"block": 18822916,
"trx_in_block": 36,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-09T09:26:06",
"op": [
"vote",
{
"voter": "ankar",
"author": "oflyhigh",
"permlink": "dogecoin",
"weight": 10000
}
]
}2018/01/04 13:44:27
2018/01/04 13:44:27
| voter | alanzheng |
| author | ankar |
| permlink | lisk-dpos |
| weight | 200 (2.00%) |
| Transaction Info | Block #18684222/Trx 59925e60f95516df166eadc82ecf0f72e6a13873 |
View Raw JSON Data
{
"trx_id": "59925e60f95516df166eadc82ecf0f72e6a13873",
"block": 18684222,
"trx_in_block": 49,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-04T13:44:27",
"op": [
"vote",
{
"voter": "alanzheng",
"author": "ankar",
"permlink": "lisk-dpos",
"weight": 200
}
]
}2018/01/04 10:55:12
2018/01/04 10:55:12
| voter | ubg |
| author | ankar |
| permlink | lisk-dpos |
| weight | 100 (1.00%) |
| Transaction Info | Block #18680837/Trx 5b87dfc901014b66408a001f8c18d9e7c4ad9356 |
View Raw JSON Data
{
"trx_id": "5b87dfc901014b66408a001f8c18d9e7c4ad9356",
"block": 18680837,
"trx_in_block": 10,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-04T10:55:12",
"op": [
"vote",
{
"voter": "ubg",
"author": "ankar",
"permlink": "lisk-dpos",
"weight": 100
}
]
}2018/01/04 10:52:03
2018/01/04 10:52:03
| voter | ubg |
| author | ankar |
| permlink | part-i |
| weight | 100 (1.00%) |
| Transaction Info | Block #18680774/Trx 6aeceeaff69aa2d79e96e809154c44c635da412e |
View Raw JSON Data
{
"trx_id": "6aeceeaff69aa2d79e96e809154c44c635da412e",
"block": 18680774,
"trx_in_block": 0,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-04T10:52:03",
"op": [
"vote",
{
"voter": "ubg",
"author": "ankar",
"permlink": "part-i",
"weight": 100
}
]
}2018/01/04 10:50:30
2018/01/04 10:50:30
| voter | agar |
| author | ankar |
| permlink | lisk-dpos |
| weight | 100 (1.00%) |
| Transaction Info | Block #18680743/Trx bdadfbe479b9e887a1912051b244f0ac9832138e |
View Raw JSON Data
{
"trx_id": "bdadfbe479b9e887a1912051b244f0ac9832138e",
"block": 18680743,
"trx_in_block": 10,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-04T10:50:30",
"op": [
"vote",
{
"voter": "agar",
"author": "ankar",
"permlink": "lisk-dpos",
"weight": 100
}
]
}2018/01/04 10:49:03
2018/01/04 10:49:03
| voter | agar |
| author | ankar |
| permlink | lisk |
| weight | 100 (1.00%) |
| Transaction Info | Block #18680714/Trx f3e0cfe91f77aef9f9dd5350f9fb7000e47c7931 |
View Raw JSON Data
{
"trx_id": "f3e0cfe91f77aef9f9dd5350f9fb7000e47c7931",
"block": 18680714,
"trx_in_block": 24,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-04T10:49:03",
"op": [
"vote",
{
"voter": "agar",
"author": "ankar",
"permlink": "lisk",
"weight": 100
}
]
}2018/01/04 10:49:00
2018/01/04 10:49:00
| parent author | |
| parent permlink | cn |
| author | ankar |
| permlink | lisk-dpos |
| title | Lisk 简介 - DPOS 共识网路 |
| body | @@ -1,77 +1,4 @@ -%E6%9C%AC%E6%96%87%E7%BF%BB%E8%AF%91%E8%87%AA %5BLisk FAQ - Network%5D(https://docs.lisk.io/v1.4/docs/faq-network)%E3%80%82%0A%0A !%5BLi @@ -108,16 +108,89 @@ e.png)%0A%0A +%E6%9C%AC%E6%96%87%E7%BF%BB%E8%AF%91%E8%87%AA %5BLisk FAQ - Network%5D(https://docs.lisk.io/v1.4/docs/faq-network)%E3%80%82%0A%0A ## %E5%93%AA%E9%87%8C%E5%8F%AF%E4%BB%A5%E6%89%BE |
| json metadata | {"tags":["cn","lisk","blockchain","cryptocurrency"],"image":["https://steemitimages.com/DQmQfb3qMYwZPTuk811acQkCV3bRWkXWHkF9eBBimKh6gvd/Lisk_Logotype.png"],"links":["https://docs.lisk.io/v1.4/docs/faq-network","https://github.com/LiskHQ/lisk","http://ed25519.cr.yp.to/"],"app":"steemit/0.1","format":"markdown"} |
| Transaction Info | Block #18680713/Trx 0b8f403f04c3af88166fff0b3bac47dcb8d219ed |
View Raw JSON Data
{
"trx_id": "0b8f403f04c3af88166fff0b3bac47dcb8d219ed",
"block": 18680713,
"trx_in_block": 32,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-04T10:49:00",
"op": [
"comment",
{
"parent_author": "",
"parent_permlink": "cn",
"author": "ankar",
"permlink": "lisk-dpos",
"title": "Lisk 简介 - DPOS 共识网路",
"body": "@@ -1,77 +1,4 @@\n-%E6%9C%AC%E6%96%87%E7%BF%BB%E8%AF%91%E8%87%AA %5BLisk FAQ - Network%5D(https://docs.lisk.io/v1.4/docs/faq-network)%E3%80%82%0A%0A\n !%5BLi\n@@ -108,16 +108,89 @@\n e.png)%0A%0A\n+%E6%9C%AC%E6%96%87%E7%BF%BB%E8%AF%91%E8%87%AA %5BLisk FAQ - Network%5D(https://docs.lisk.io/v1.4/docs/faq-network)%E3%80%82%0A%0A\n ## %E5%93%AA%E9%87%8C%E5%8F%AF%E4%BB%A5%E6%89%BE\n",
"json_metadata": "{\"tags\":[\"cn\",\"lisk\",\"blockchain\",\"cryptocurrency\"],\"image\":[\"https://steemitimages.com/DQmQfb3qMYwZPTuk811acQkCV3bRWkXWHkF9eBBimKh6gvd/Lisk_Logotype.png\"],\"links\":[\"https://docs.lisk.io/v1.4/docs/faq-network\",\"https://github.com/LiskHQ/lisk\",\"http://ed25519.cr.yp.to/\"],\"app\":\"steemit/0.1\",\"format\":\"markdown\"}"
}
]
}2018/01/04 10:48:33
2018/01/04 10:48:33
| parent author | |
| parent permlink | cn |
| author | ankar |
| permlink | lisk |
| title | Lisk 簡介 |
| body | @@ -1,72 +1,4 @@ -%E6%9C%AC%E6%96%87%E7%BF%BB%E8%AF%91%E8%87%AA %5BLisk FAQ - General%5D(https://docs.lisk.io/docs/faq-general)%E3%80%82%0A%0A !%5BLi @@ -108,16 +108,84 @@ e.png)%0A%0A +%E6%9C%AC%E6%96%87%E7%BF%BB%E8%AF%91%E8%87%AA %5BLisk FAQ - General%5D(https://docs.lisk.io/docs/faq-general)%E3%80%82%0A%0A ## %E4%BB%80%E4%B9%88%E6%98%AF L |
| json metadata | {"tags":["cn","lisk","blockchain","cryptocurrency"],"links":["https://docs.lisk.io/docs/faq-general"],"app":"steemit/0.1","format":"markdown","image":["https://steemitimages.com/DQmQfb3qMYwZPTuk811acQkCV3bRWkXWHkF9eBBimKh6gvd/Lisk_Logotype.png"]} |
| Transaction Info | Block #18680704/Trx efa9d6dfbee23a7266e7b7a29170c2d82e97c256 |
View Raw JSON Data
{
"trx_id": "efa9d6dfbee23a7266e7b7a29170c2d82e97c256",
"block": 18680704,
"trx_in_block": 31,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-04T10:48:33",
"op": [
"comment",
{
"parent_author": "",
"parent_permlink": "cn",
"author": "ankar",
"permlink": "lisk",
"title": "Lisk 簡介",
"body": "@@ -1,72 +1,4 @@\n-%E6%9C%AC%E6%96%87%E7%BF%BB%E8%AF%91%E8%87%AA %5BLisk FAQ - General%5D(https://docs.lisk.io/docs/faq-general)%E3%80%82%0A%0A\n !%5BLi\n@@ -108,16 +108,84 @@\n e.png)%0A%0A\n+%E6%9C%AC%E6%96%87%E7%BF%BB%E8%AF%91%E8%87%AA %5BLisk FAQ - General%5D(https://docs.lisk.io/docs/faq-general)%E3%80%82%0A%0A\n ## %E4%BB%80%E4%B9%88%E6%98%AF L\n",
"json_metadata": "{\"tags\":[\"cn\",\"lisk\",\"blockchain\",\"cryptocurrency\"],\"links\":[\"https://docs.lisk.io/docs/faq-general\"],\"app\":\"steemit/0.1\",\"format\":\"markdown\",\"image\":[\"https://steemitimages.com/DQmQfb3qMYwZPTuk811acQkCV3bRWkXWHkF9eBBimKh6gvd/Lisk_Logotype.png\"]}"
}
]
}2018/01/04 10:48:09
2018/01/04 10:48:09
| parent author | |
| parent permlink | bitcoin |
| author | ankar |
| permlink | part-i |
| title | 隔离验证钱包开发指南 Part I(基本篇) |
| body | @@ -1,205 +1,205 @@ -%E6%9C%AC%E6%96%87%E7%BF%BB%E8%AF%91%E8%87%AA %5BSegregated Witness Wallet Development Guide%5D(https://bitcoincore.org/en/segwit_wallet_dev/) %E3%80%82%0A%0A!%5BSegwit.png%5D(https://steemitimages.com/DQmRoTpYbPVDNwqvSjyNQEfF5SrL6H8BPrEyuJ1AA5KyW3e/Segwit.png) +!%5BSegwit.png%5D(https://steemitimages.com/DQmRoTpYbPVDNwqvSjyNQEfF5SrL6H8BPrEyuJ1AA5KyW3e/Segwit.png)%0A%0A%E6%9C%AC%E6%96%87%E7%BF%BB%E8%AF%91%E8%87%AA %5BSegregated Witness Wallet Development Guide%5D(https://bitcoincore.org/en/segwit_wallet_dev/) %E3%80%82 %0A%0A## |
| json metadata | {"tags":["bitcoin","cryptocurrency","cn","blockchain","segwit"],"links":["https://bitcoincore.org/en/segwit_wallet_dev/","https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki","https://github.com/bitcoin/bips/blob/master/README.mediawiki","https://bitcoin.org/en/glossary/address","https://bitcoin.org/en/glossary/input","https://bitcoin.org/en/glossary/unspent-transaction-output","https://bitcoin.org/en/glossary/p2pkh-address","https://bitcoin.org/en/glossary/p2sh-address","https://programmingblockchain.gitbooks.io/programmingblockchain/content/other_types_of_ownership/p2wpkh_pay_to_witness_public_key_hash.html","https://bitcoin.org/en/glossary/pubkey-script","https://bitcoin.org/en/glossary/signature-script","https://bitcoin.org/en/glossary/redeem-script","http://n.bitcoin.ninja/checktx?txid=8139979112e894a14f8370438a471d23984061ff83a9eba0bc7a34433327ec21","https://en.bitcoin.it/wiki/Protocol_documentation"],"app":"steemit/0.1","format":"markdown","image":["https://steemitimages.com/DQmRoTpYbPVDNwqvSjyNQEfF5SrL6H8BPrEyuJ1AA5KyW3e/Segwit.png"]} |
| Transaction Info | Block #18680696/Trx b2f5b14e36691d25db28376892425bad1c7acf25 |
View Raw JSON Data
{
"trx_id": "b2f5b14e36691d25db28376892425bad1c7acf25",
"block": 18680696,
"trx_in_block": 4,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-04T10:48:09",
"op": [
"comment",
{
"parent_author": "",
"parent_permlink": "bitcoin",
"author": "ankar",
"permlink": "part-i",
"title": "隔离验证钱包开发指南 Part I(基本篇)",
"body": "@@ -1,205 +1,205 @@\n-%E6%9C%AC%E6%96%87%E7%BF%BB%E8%AF%91%E8%87%AA %5BSegregated Witness Wallet Development Guide%5D(https://bitcoincore.org/en/segwit_wallet_dev/) %E3%80%82%0A%0A!%5BSegwit.png%5D(https://steemitimages.com/DQmRoTpYbPVDNwqvSjyNQEfF5SrL6H8BPrEyuJ1AA5KyW3e/Segwit.png)\n+!%5BSegwit.png%5D(https://steemitimages.com/DQmRoTpYbPVDNwqvSjyNQEfF5SrL6H8BPrEyuJ1AA5KyW3e/Segwit.png)%0A%0A%E6%9C%AC%E6%96%87%E7%BF%BB%E8%AF%91%E8%87%AA %5BSegregated Witness Wallet Development Guide%5D(https://bitcoincore.org/en/segwit_wallet_dev/) %E3%80%82\n %0A%0A##\n",
"json_metadata": "{\"tags\":[\"bitcoin\",\"cryptocurrency\",\"cn\",\"blockchain\",\"segwit\"],\"links\":[\"https://bitcoincore.org/en/segwit_wallet_dev/\",\"https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki\",\"https://github.com/bitcoin/bips/blob/master/README.mediawiki\",\"https://bitcoin.org/en/glossary/address\",\"https://bitcoin.org/en/glossary/input\",\"https://bitcoin.org/en/glossary/unspent-transaction-output\",\"https://bitcoin.org/en/glossary/p2pkh-address\",\"https://bitcoin.org/en/glossary/p2sh-address\",\"https://programmingblockchain.gitbooks.io/programmingblockchain/content/other_types_of_ownership/p2wpkh_pay_to_witness_public_key_hash.html\",\"https://bitcoin.org/en/glossary/pubkey-script\",\"https://bitcoin.org/en/glossary/signature-script\",\"https://bitcoin.org/en/glossary/redeem-script\",\"http://n.bitcoin.ninja/checktx?txid=8139979112e894a14f8370438a471d23984061ff83a9eba0bc7a34433327ec21\",\"https://en.bitcoin.it/wiki/Protocol_documentation\"],\"app\":\"steemit/0.1\",\"format\":\"markdown\",\"image\":[\"https://steemitimages.com/DQmRoTpYbPVDNwqvSjyNQEfF5SrL6H8BPrEyuJ1AA5KyW3e/Segwit.png\"]}"
}
]
}rewardpoolrapereplied to @ankar / rewardpoolrape-re-ankarlisk2018/01/04 07:33:18
rewardpoolrapereplied to @ankar / rewardpoolrape-re-ankarlisk
2018/01/04 07:33:18
| parent author | ankar |
| parent permlink | lisk |
| author | rewardpoolrape |
| permlink | rewardpoolrape-re-ankarlisk |
| title | |
| body | Enjoy the vote and reward! |
| json metadata | |
| Transaction Info | Block #18676799/Trx 35d3921aec8479aa4d4acabd509d6e333bca079b |
View Raw JSON Data
{
"trx_id": "35d3921aec8479aa4d4acabd509d6e333bca079b",
"block": 18676799,
"trx_in_block": 42,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-04T07:33:18",
"op": [
"comment",
{
"parent_author": "ankar",
"parent_permlink": "lisk",
"author": "rewardpoolrape",
"permlink": "rewardpoolrape-re-ankarlisk",
"title": "",
"body": "Enjoy the vote and reward!",
"json_metadata": ""
}
]
}rewardpoolrapeupvoted (0.10%) @ankar / lisk2018/01/04 07:33:18
rewardpoolrapeupvoted (0.10%) @ankar / lisk
2018/01/04 07:33:18
| voter | rewardpoolrape |
| author | ankar |
| permlink | lisk |
| weight | 10 (0.10%) |
| Transaction Info | Block #18676799/Trx 687d1311275cff75c503829b5f6c847b629f8b4e |
View Raw JSON Data
{
"trx_id": "687d1311275cff75c503829b5f6c847b629f8b4e",
"block": 18676799,
"trx_in_block": 27,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-04T07:33:18",
"op": [
"vote",
{
"voter": "rewardpoolrape",
"author": "ankar",
"permlink": "lisk",
"weight": 10
}
]
}brysj22952upvoted (100.00%) @ankar / lisk-dpos2018/01/04 07:32:30
brysj22952upvoted (100.00%) @ankar / lisk-dpos
2018/01/04 07:32:30
| voter | brysj22952 |
| author | ankar |
| permlink | lisk-dpos |
| weight | 10000 (100.00%) |
| Transaction Info | Block #18676783/Trx f61d373b8db14c6056baba8f7e8ab2d5b6ce5bda |
View Raw JSON Data
{
"trx_id": "f61d373b8db14c6056baba8f7e8ab2d5b6ce5bda",
"block": 18676783,
"trx_in_block": 3,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-04T07:32:30",
"op": [
"vote",
{
"voter": "brysj22952",
"author": "ankar",
"permlink": "lisk-dpos",
"weight": 10000
}
]
}2018/01/04 07:17:27
2018/01/04 07:17:27
| voter | cqf |
| author | ankar |
| permlink | lisk-dpos |
| weight | 100 (1.00%) |
| Transaction Info | Block #18676482/Trx da81a4b91b2876e76b7f90a90adbfc592a7364bc |
View Raw JSON Data
{
"trx_id": "da81a4b91b2876e76b7f90a90adbfc592a7364bc",
"block": 18676482,
"trx_in_block": 0,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-04T07:17:27",
"op": [
"vote",
{
"voter": "cqf",
"author": "ankar",
"permlink": "lisk-dpos",
"weight": 100
}
]
}2018/01/04 07:08:09
2018/01/04 07:08:09
| parent author | |
| parent permlink | cn |
| author | ankar |
| permlink | lisk-dpos |
| title | Lisk 简介 - DPOS 共识网路 |
| body | 本文翻译自 [Lisk FAQ - Network](https://docs.lisk.io/v1.4/docs/faq-network)。  ## 哪里可以找到 Lisk 核心的原始码? [https://github.com/LiskHQ/lisk](https://github.com/LiskHQ/lisk) ## Lisk 是用什么程式语言撰写? Lisk 是用 JavaScript 撰写并使用 NodeJS。 ## 为什么使用 JavaScript? JavaScript 是一个易用、简洁且知名的程式语言且有巨大的开发社群、好用的工具和快速的开发周期。它强化了 Lisk 可以简单上手和迅速开发应用的目标。 ## Lisk 使用什么共识算法? 委派的权益证明(**Delegated Proof of Stake** (**DPOS**))。 ## Lisk 的 delegate system 如何运作? 任何人都可以在 Lisk 网路中注册帐号,成为 delegate account(或简单来说 delegate),仅需为帐户选择一个使用者名称。delegate 可以从任何 LSK 持有者中取得投票。简单来说,1 LSK 等同 1 票,而每个 LSK 持有者仅可将帐户中所有的余额投给一个 delegate。网路中前 101 个拥有做多得票数的 delegate 会开始产生新区块以确保网路的安全。101 个之外的其他 delegate 会待命。投票过程是动态的所以 delegate 的排名是可变动的。 ## 什么是 delegate round? 一个 delegate round 是一个周期,必须经过 101 个 delegate 每个均产生一个新的区块。每一轮均产生固定数量的区块,而每ㄧ轮结束后会更新 delegate 的排序(根据投票数)。 ## 每一个 delegate round 有多久? 每 10 秒一个区块,每个 delegate round 等于 1010 秒或大约 17 分钟。如果一个活跃的 delegate 下线了,它就不会产生新的区块,而由此轮的下一个 delegate 负责,所以产生这个 block 需要 20 秒。有就是说,越多活跃的 delegate 下线,每一轮就需要越久。 ## 新的 LSK 代币如何产生? 活跃的 delegate 透过维护网路安全性来取得报酬。前 101 名的 delegate 取得固定的区块报酬和不固定的交易手续费。 ## 每年的通膨率多少? 最初的 ICO 时共发行 100,000,000 LSK。自从 5/24 网路上线,101 个 delegate 开始确保网路安全并从中取得区块报酬。当每个区块被产生,5 个新的 LSK 被发行。每 3,000,000 个区块(约 1 年),区块报酬就会降低 1 LSK,直到降低至每区块 1 LSK 并持续到永远。区块报酬被平均的分给 101 个 delegate。在此之外,delegate 根据各自产生的区块中的交易收取手续费。透过实作这个机制,Lisk 创造了一个动力来运行 delegate 并确保网路安全,这是共识演算法很重要的一部分。 ## LSK 代币的发行量上限是多少? 并没有发行量上限。通膨率会随着时间降低,例如根据逐年的区块报酬调降会在第 15 年降低至 1.74%。 ## 使用网路手续费多少? 手续费如下: Type | Fee ---- | --- Regular transactions | 0.1 LSK Delegate registration | 25 LSK Second passphrase setup | 5 LSK Multi-signature registration | 5 LSK per multi-signature member ## 需要多少时间验证一个交易? 每 10 秒产生一个新的区块。第一个确认(confirmation)发生在交易被收进一个区块中,通常发生在几秒内。随着越来越多新区块接着产生,交易越来越难被窜改并可被视为验证(validated)成功。我们建议较小的交易到至少等 6 个区块而较大的交易则要等一轮。 ## Lisk 区块中使用什么资料结构? 区块被存在关联式数据库中。每个区块的 SHA256 hash 值会被 delegate 产生并用 [ed25519](http://ed25519.cr.yp.to/) 签署过。区块的签章和 delegate 的公钥被包含在每个区块中,并被用来验证区块的完整性。 ## 转移代币需要的签章格式是什么? 我们使用一个 hash 格式来产生具决定性的地址。地址的产生过程如下:将 account passphrase 透过 SHA256 算法,接者用 [ed25519](http://ed25519.cr.yp.to/) 产生一对公私钥,其中的公钥在经过 SHA256 算法产生一个 hash 值,再用这个 hash 值产生一个具决定性的地址。我们选择 ed25519,因为这个算法具有快速签署及预防碰撞等功能。 |
| json metadata | {"tags":["cn","lisk","blockchain","cryptocurrency"],"image":["https://steemitimages.com/DQmQfb3qMYwZPTuk811acQkCV3bRWkXWHkF9eBBimKh6gvd/Lisk_Logotype.png"],"links":["https://docs.lisk.io/v1.4/docs/faq-network","https://github.com/LiskHQ/lisk","http://ed25519.cr.yp.to/"],"app":"steemit/0.1","format":"markdown"} |
| Transaction Info | Block #18676296/Trx d87785c44bbcb48a178ff117abb93e2cb0c5bba2 |
View Raw JSON Data
{
"trx_id": "d87785c44bbcb48a178ff117abb93e2cb0c5bba2",
"block": 18676296,
"trx_in_block": 52,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-04T07:08:09",
"op": [
"comment",
{
"parent_author": "",
"parent_permlink": "cn",
"author": "ankar",
"permlink": "lisk-dpos",
"title": "Lisk 简介 - DPOS 共识网路",
"body": "本文翻译自 [Lisk FAQ - Network](https://docs.lisk.io/v1.4/docs/faq-network)。\n\n\n\n## 哪里可以找到 Lisk 核心的原始码?\n\n[https://github.com/LiskHQ/lisk](https://github.com/LiskHQ/lisk)\n\n## Lisk 是用什么程式语言撰写?\n\nLisk 是用 JavaScript 撰写并使用 NodeJS。\n\n## 为什么使用 JavaScript?\n\nJavaScript 是一个易用、简洁且知名的程式语言且有巨大的开发社群、好用的工具和快速的开发周期。它强化了 Lisk 可以简单上手和迅速开发应用的目标。\n\n## Lisk 使用什么共识算法?\n\n委派的权益证明(**Delegated Proof of Stake** (**DPOS**))。\n\n## Lisk 的 delegate system 如何运作?\n\n任何人都可以在 Lisk 网路中注册帐号,成为 delegate account(或简单来说 delegate),仅需为帐户选择一个使用者名称。delegate 可以从任何 LSK 持有者中取得投票。简单来说,1 LSK 等同 1 票,而每个 LSK 持有者仅可将帐户中所有的余额投给一个 delegate。网路中前 101 个拥有做多得票数的 delegate 会开始产生新区块以确保网路的安全。101 个之外的其他 delegate 会待命。投票过程是动态的所以 delegate 的排名是可变动的。\n\n## 什么是 delegate round?\n\n一个 delegate round 是一个周期,必须经过 101 个 delegate 每个均产生一个新的区块。每一轮均产生固定数量的区块,而每ㄧ轮结束后会更新 delegate 的排序(根据投票数)。\n\n## 每一个 delegate round 有多久?\n\n每 10 秒一个区块,每个 delegate round 等于 1010 秒或大约 17 分钟。如果一个活跃的 delegate 下线了,它就不会产生新的区块,而由此轮的下一个 delegate 负责,所以产生这个 block 需要 20 秒。有就是说,越多活跃的 delegate 下线,每一轮就需要越久。\n\n## 新的 LSK 代币如何产生?\n\n活跃的 delegate 透过维护网路安全性来取得报酬。前 101 名的 delegate 取得固定的区块报酬和不固定的交易手续费。\n\n## 每年的通膨率多少?\n\n最初的 ICO 时共发行 100,000,000 LSK。自从 5/24 网路上线,101 个 delegate 开始确保网路安全并从中取得区块报酬。当每个区块被产生,5 个新的 LSK 被发行。每 3,000,000 个区块(约 1 年),区块报酬就会降低 1 LSK,直到降低至每区块 1 LSK 并持续到永远。区块报酬被平均的分给 101 个 delegate。在此之外,delegate 根据各自产生的区块中的交易收取手续费。透过实作这个机制,Lisk 创造了一个动力来运行 delegate 并确保网路安全,这是共识演算法很重要的一部分。\n\n## LSK 代币的发行量上限是多少?\n\n并没有发行量上限。通膨率会随着时间降低,例如根据逐年的区块报酬调降会在第 15 年降低至 1.74%。\n\n## 使用网路手续费多少?\n\n手续费如下:\n\nType | Fee\n---- | ---\nRegular transactions | 0.1 LSK\nDelegate registration | 25 LSK\nSecond passphrase setup | 5 LSK\nMulti-signature registration | 5 LSK per multi-signature member\n\n## 需要多少时间验证一个交易?\n\n每 10 秒产生一个新的区块。第一个确认(confirmation)发生在交易被收进一个区块中,通常发生在几秒内。随着越来越多新区块接着产生,交易越来越难被窜改并可被视为验证(validated)成功。我们建议较小的交易到至少等 6 个区块而较大的交易则要等一轮。\n\n## Lisk 区块中使用什么资料结构?\n\n区块被存在关联式数据库中。每个区块的 SHA256 hash 值会被 delegate 产生并用 [ed25519](http://ed25519.cr.yp.to/) 签署过。区块的签章和 delegate 的公钥被包含在每个区块中,并被用来验证区块的完整性。\n\n## 转移代币需要的签章格式是什么?\n\n我们使用一个 hash 格式来产生具决定性的地址。地址的产生过程如下:将 account passphrase 透过 SHA256 算法,接者用 [ed25519](http://ed25519.cr.yp.to/) 产生一对公私钥,其中的公钥在经过 SHA256 算法产生一个 hash 值,再用这个 hash 值产生一个具决定性的地址。我们选择 ed25519,因为这个算法具有快速签署及预防碰撞等功能。",
"json_metadata": "{\"tags\":[\"cn\",\"lisk\",\"blockchain\",\"cryptocurrency\"],\"image\":[\"https://steemitimages.com/DQmQfb3qMYwZPTuk811acQkCV3bRWkXWHkF9eBBimKh6gvd/Lisk_Logotype.png\"],\"links\":[\"https://docs.lisk.io/v1.4/docs/faq-network\",\"https://github.com/LiskHQ/lisk\",\"http://ed25519.cr.yp.to/\"],\"app\":\"steemit/0.1\",\"format\":\"markdown\"}"
}
]
}2018/01/04 07:07:21
2018/01/04 07:07:21
| voter | cqf |
| author | ankar |
| permlink | lisk |
| weight | 100 (1.00%) |
| Transaction Info | Block #18676280/Trx a0061b67e069582142b88fcc77968f6151bac31b |
View Raw JSON Data
{
"trx_id": "a0061b67e069582142b88fcc77968f6151bac31b",
"block": 18676280,
"trx_in_block": 45,
"op_in_trx": 0,
"virtual_op": 0,
"timestamp": "2018-01-04T07:07:21",
"op": [
"vote",
{
"voter": "cqf",
"author": "ankar",
"permlink": "lisk",
"weight": 100
}
]
}Manabar
Voting Power100.00%
Downvote Power100.00%
Resource Credits100.00%
Reputation Progress2.64%
{
"voting_manabar": {
"current_mana": 9800,
"last_update_time": 1516963554
},
"downvote_manabar": {
"current_mana": 0,
"last_update_time": 1486708533
},
"rc_account": {
"account": "ankar",
"rc_manabar": {
"current_mana": "128046384705",
"last_update_time": 1537887600
},
"max_rc_creation_adjustment": {
"amount": "2020748973",
"precision": 6,
"nai": "@@000000037"
},
"max_rc": "128046384705"
}
}Account Metadata
| POSTING JSON METADATA | |
| profile | {"profile_image":"https://i.imgur.com/aI2eaY6.jpg","name":"Anderson"} |
| JSON METADATA | |
| profile | {"profile_image":"https://i.imgur.com/aI2eaY6.jpg","name":"Anderson"} |
{
"posting_json_metadata": {
"profile": {
"profile_image": "https://i.imgur.com/aI2eaY6.jpg",
"name": "Anderson"
}
},
"json_metadata": {
"profile": {
"profile_image": "https://i.imgur.com/aI2eaY6.jpg",
"name": "Anderson"
}
}
}Auth Keys
Owner
Single Signature
Public Keys
STM67peFvhJTUKFv26sQ5bAM2vqhF1sCAd1vXfAudkEy32TZvzMzh1/1
Active
Single Signature
Public Keys
STM78P9YGUT2Hi8xZd3Qo7UqpUJHsbqVWTJ7qPyQT5e2bC5m3CXT61/1
Posting
Single Signature
Public Keys
STM8GpX5u9ZLpHSqNXk2LCV7YDcnyaMJkWEraUurU9tHdmeEq5GQR1/1
Memo
STM5XEXcd4jih5gqUj98tcK5AfKjmFbMjytVMRVy7wdB1t2Q7x7ft
{
"owner": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"STM67peFvhJTUKFv26sQ5bAM2vqhF1sCAd1vXfAudkEy32TZvzMzh",
1
]
]
},
"active": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"STM78P9YGUT2Hi8xZd3Qo7UqpUJHsbqVWTJ7qPyQT5e2bC5m3CXT6",
1
]
]
},
"posting": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"STM8GpX5u9ZLpHSqNXk2LCV7YDcnyaMJkWEraUurU9tHdmeEq5GQR",
1
]
]
},
"memo": "STM5XEXcd4jih5gqUj98tcK5AfKjmFbMjytVMRVy7wdB1t2Q7x7ft"
}Witness Votes
0 / 30
No active witness votes.
[]