【翻译】EOS RAM和Bandwith分析:Junglenet上的空投步骤

版权声明:

以下内容来自微信公共帐号“EOS技术爱好者”,搜索“EOSTechLover”即可订阅,翻译Yvonne。转载必须保留以上声明。仅授权原文转载。

本文原文链接为https://steemit.com/eos/@leordev/eos-ram-and-bandwith-analysis-airdropping-steps-on-junglenet ,由本号“EOS技术爱好者”翻译。

networks-1987215_640.jpg

作者:leordev

翻译:Yvonne

我正在研究EOS RAM分配,CPU和网络带宽,我想知道组织一次真正的空投需要花费多少钱。所以我刚刚在Jungle测试网络的小实验,它可以完全适应于Mainnet,因为存储和bandwith是相同的,您可以调整当前的EOS和RAM价格。

在EOS <3中它实际上超级简单

1、为您的智能合约创建一个帐户

2、从eos存储库下载官方eosio.tokenhttps://github.com/EOSIO/eos/tree/013c282edb3513078c573d4feb626403778af954/contracts/eosio.token

3、编译并将其部署到您的合同

4、创建您的代币符号和供应

5、开始发放代币

以下我将详细展开以上的各步骤,让我们开始吧!

在Junglenet上创建默认帐户

http://dev.cryptolions.io/#account 创建eosairdroper账户

以下是初始帐户余额和利率统计信息:

$ cleos get account eosairdroper
permissions:
owner 1: 1 EOS84uT4DBAJQpagWDfZPbk2hd9aaH8ZGZUxHTrpdjCqCzMEVP8cB
active 1: 1 EOS84uT4DBAJQpagWDfZPbk2hd9aaH8ZGZUxHTrpdjCqCzMEVP8cB
memory:
quota: 623.2 Kb used: 3.365 Kb

net bandwidth: staked: 100.0000 EOS (total stake delegated from account to self) delegated: 0.0000 EOS (total staked delegated to account from others) used: 0 bytes available: 19.29 Mb limit: 19.29 Mb

cpu bandwidth: staked: 100.0000 EOS (total stake delegated from account to self) delegated: 0.0000 EOS (total staked delegated to account from others) used: 0 us available: 3.862 sec limit: 3.862 sec

部署eosio.token合同

从原始EOS Repo简单部署,无需任何更改:

$ cleos set contract eosairdroper ~/eos/build/contracts/eosio.token~/eos/build/contracts/eosio.token/eosio.token.wast~/eos/build/contracts/eosio.token/eosio.token.abi
Reading WAST/WASM...
Assembling WASM...
Publishing contract...
executed transaction: d4025c7627d3a8334451ca382be86867eed55f2a442205ac269db8d4228554ca 8496 bytes 3203 us

eosio <= eosio::setcode {"account":"eosairdroper","vmtype":0,"vmversion":0,"code":"0061736d01000000017e1560037f7e7f0060057f7...

eosio <= eosio::setabi {"account":"eosairdroper","abi":"0e656f73696f3a3a6162692f312e30010c6163636f756e745f6e616d65046e616d6...`

#>>>> checking account stats <<<< $ cleos get account eosairdroper permissions: owner 1: 1 EOS84uT4DBAJQpagWDfZPbk2hd9aaH8ZGZUxHTrpdjCqCzMEVP8cB active 1: 1 EOS84uT4DBAJQpagWDfZPbk2hd9aaH8ZGZUxHTrpdjCqCzMEVP8cB memory: quota: 623.2 Kb used: 189.7 Kb

net bandwidth: staked: 100.0000 EOS (total stake delegated from account to self) delegated: 0.0000 EOS (total staked delegated to account from others) used: 8.298 Kb available: 19.28 Mb limit: 19.29 Mb

cpu bandwidth: staked: 100.0000 EOS (total stake delegated from account to self) delegated: 0.0000 EOS (total staked delegated to account from others) used: 1.817 ms available: 3.859 sec limit: 3.862 sec

资产统计:

  • 使用的RAM:186.335 Kb(从3.365 Kb,到189.7 Kb)

  • 使用的NET:8.298 Kb(从0 Kb,到8.298 Kb)

  • 使用的CPU:1.817毫秒(从0毫秒,至1.817毫秒)

是的,部署的成本 eosio.token 是今天版本的186.335 Kb!好的,好玩的就要开始了......让我们创建一个token!

创建一个token

默认token,如同EOS一样,10亿个的供应及精确到小数点后四位。

`$ cleos push action eosairdroper create '[ "eosairdroper", "1000000000.0000 TOKEN", 0, 0, 0]' -p eosairdroper
executed transaction: 7123c8e34853205b9176a8d02526a570f32e908212f0a3eff7e9dd9544803101 120 bytes 738 us

eosairdroper <= eosairdroper::create {"issuer":"eosairdroper","maximum_supply":"1000000000.0000 TOKEN"}`

#>>>> checking account stats <<<< $ cleos get account eosairdroper permissions: owner 1: 1 EOS84uT4DBAJQpagWDfZPbk2hd9aaH8ZGZUxHTrpdjCqCzMEVP8cB active 1: 1 EOS84uT4DBAJQpagWDfZPbk2hd9aaH8ZGZUxHTrpdjCqCzMEVP8cB memory: quota: 623.2 Kb used: 190 Kb

net bandwidth: staked: 100.0000 EOS (total stake delegated from account to self) delegated: 0.0000 EOS (total staked delegated to account from others) used: 8.314 Kb available: 19.28 Mb limit: 19.29 Mb

cpu bandwidth: staked: 100.0000 EOS (total stake delegated from account to self) delegated: 0.0000 EOS (total staked delegated to account from others) used: 2.656 ms available: 3.859 sec limit: 3.862 sec

资产统计:

  • 使用的RAM:0.3 Kb(从189.7 Kb,至190 Kb)

  • 使用的NET:0.016 Kb(从8.298 Kb,至8.314 Kb)

  • 使用的CPU:0.839毫秒(从1.817毫秒,至2.656毫秒)

接下来!为了创建一个token,我们花费的资源很少,甚至几乎没有...

发行一些toekn

现在让我们空投一些token!

我正在使用官方快照中的一些随机帐户(如果其中有你的,不好意思了):


WechatIMG129.jpeg

`cleos push action eosairdroper issue '["gu2dgmrshege", "15000.9383 TOKEN", "airdrop"]' -p eosairdroper
executed transaction: f81bf85f5fe51e2bb78e8f3398e384b17587d1abb21255ca4e5dc64874fac263 128 bytes 2467 us

eosairdroper <= eosairdroper::issue {"to":"gu2dgmrshege","quantity":"15000.9383 TOKEN","memo":"airdrop"}

eosairdroper <= eosairdroper::transfer {"from":"eosairdroper","to":"gu2dgmrshege","quantity":"15000.9383 TOKEN","memo":"airdrop"}

gu2dgmrshege <= eosairdroper::transfer {"from":"eosairdroper","to":"gu2dgmrshege","quantity":"15000.9383 TOKEN","memo":"airdrop"}`

cleos get account eosairdroper permissions: owner 1: 1 EOS84uT4DBAJQpagWDfZPbk2hd9aaH8ZGZUxHTrpdjCqCzMEVP8cB active 1: 1 EOS84uT4DBAJQpagWDfZPbk2hd9aaH8ZGZUxHTrpdjCqCzMEVP8cB memory: quota: 623.2 Kb used: 190.2 Kb

net bandwidth: staked: 100.0000 EOS (total stake delegated from account to self) delegated: 0.0000 EOS (total staked delegated to account from others) used: 8.346 Kb available: 19.28 Mb limit: 19.29 Mb

cpu bandwidth: staked: 100.0000 EOS (total stake delegated from account to self) delegated: 0.0000 EOS (total staked delegated to account from others) used: 3.787 ms available: 3.858 sec limit: 3.862 sec

资产统计:

  • 使用的RAM:0.2 Kb(从190 Kb到190.2 Kb)

  • 使用的NET:0.032 Kb(从8.314 Kb,到8.346 Kb)

  • 使用的CPU:1.131 ms(从2.656 ms到3.787 ms)

发行更多token

cleos push action eosairdroper issue '["gu2dgmrrguge", "6233.0000 TOKEN", "airdrop"]' -p eosairdroper executed transaction: 26a0477eaa5147e454a0a2c4c436ae5d4b356deddc303d4a0ad43108c3480307 128 bytes 2122 us

$ cleos get account eosairdroper permissions: owner 1: 1 EOS84uT4DBAJQpagWDfZPbk2hd9aaH8ZGZUxHTrpdjCqCzMEVP8cB active 1: 1 EOS84uT4DBAJQpagWDfZPbk2hd9aaH8ZGZUxHTrpdjCqCzMEVP8cB memory: quota: 623.2 Kb used: 190.4 Kb

net bandwidth: staked: 100.0000 EOS (total stake delegated from account to self) delegated: 0.0000 EOS (total staked delegated to account from others) used: 7.506 Kb available: 19.28 Mb limit: 19.29 Mb

cpu bandwidth: staked: 100.0000 EOS (total stake delegated from account to self) delegated: 0.0000 EOS (total staked delegated to account from others) used: 5.567 ms available: 3.856 sec limit: 3.862 sec

$ cleosjn push action eosairdroper issue '["gu2dkmztgage", "606.0000 TOKEN", "airdrop"]' -p eosairdroper executed transaction: a642adfaf2a715e7bf9a8ecb2d9f8cd1cbc4925ffb7edbbbe1c78b77383de487 128 bytes 2291 us

$ cleos get account eosairdroper permissions: owner 1: 1 EOS84uT4DBAJQpagWDfZPbk2hd9aaH8ZGZUxHTrpdjCqCzMEVP8cB active 1: 1 EOS84uT4DBAJQpagWDfZPbk2hd9aaH8ZGZUxHTrpdjCqCzMEVP8cB memory: quota: 623.2 Kb used: 190.7 Kb

net bandwidth: staked: 100.0000 EOS (total stake delegated from account to self) delegated: 0.0000 EOS (total staked delegated to account from others) used: 7.443 Kb available: 19.28 Mb limit: 19.29 Mb

cpu bandwidth: staked: 100.0000 EOS (total stake delegated from account to self) delegated: 0.0000 EOS (total staked delegated to account from others) used: 7.719 ms available: 3.854 sec limit: 3.862 sec

cleos push action eosairdroper issue '["gm4domrtgqge", "12.6521 TOKEN", "airdrop"]' -p eosairdroper executed transaction: 6a9695ba0508bb967b08341794ba49a597276971d2c34f7178a06db089b39943 128 bytes 2326 us

$ cleos get account eosairdroper permissions: owner 1: 1 EOS84uT4DBAJQpagWDfZPbk2hd9aaH8ZGZUxHTrpdjCqCzMEVP8cB active 1: 1 EOS84uT4DBAJQpagWDfZPbk2hd9aaH8ZGZUxHTrpdjCqCzMEVP8cB memory: quota: 623.2 Kb used: 190.9 Kb

net bandwidth: staked: 100.0000 EOS (total stake delegated from account to self) delegated: 0.0000 EOS (total staked delegated to account from others) used: 7.561 Kb available: 19.28 Mb limit: 19.29 Mb

cpu bandwidth: staked: 100.0000 EOS (total stake delegated from account to self) delegated: 0.0000 EOS (total staked delegated to account from others) used: 9.026 ms available: 3.853 sec limit: 3.862 sec

经过6小时后

看起来像我网络的CPU bandwith了一点,完美!

$ cleos push action eosairdroper issue '["ge3tgmzxhege", "172150.0000 TOKEN", "airdrop"]' -p eosairdroper executed transaction: 704ba42b779cbb7a77ca0160511c7178117c65700ec2da40f0579e3ecdaa6594 128 bytes 2375 us

$ cleos get account eosairdroper permissions: owner 1: 1 EOS84uT4DBAJQpagWDfZPbk2hd9aaH8ZGZUxHTrpdjCqCzMEVP8cB active 1: 1 EOS84uT4DBAJQpagWDfZPbk2hd9aaH8ZGZUxHTrpdjCqCzMEVP8cB memory: quota: 623.2 Kb used: 191.2 Kb

net bandwidth: staked: 100.0000 EOS (total stake delegated from account to self) delegated: 0.0000 EOS (total staked delegated to account from others) used: 6.129 Kb available: 19.2 Mb limit: 19.2 Mb

cpu bandwidth: staked: 100.0000 EOS (total stake delegated from account to self) delegated: 0.0000 EOS (total staked delegated to account from others) used: 9.543 ms available: 3.835 sec limit: 3.845 sec

B1大空投

测试一大笔空投到B1(并不是真的需要这笔空投, 通常这将取决于空投团队)

$ cleos push action eosairdroper issue '["b1", "100000000.0100 TOKEN", "airdrop"]' -p eosairdroper executed transaction: 8458b5f23d6764333db5ba2d8133cabe65265abf6ecf674810a8eb1de05e25f7 128 bytes 2540 us

`#eosairdroper <= eosairdroper::issue {"to":"b1","quantity":"100000000.0100 TOKEN","memo":"airdrop"}

eosairdroper <= eosairdroper::transfer {"from":"eosairdroper","to":"b1","quantity":"100000000.0100 TOKEN","memo":"airdrop"}

b1 <= eosairdroper::transfer {"from":"eosairdroper","to":"b1","quantity":"100000000.0100 TOKEN","memo":"airdrop"}`

$ cleos get account eosairdroper permissions: owner 1: 1 EOS84uT4DBAJQpagWDfZPbk2hd9aaH8ZGZUxHTrpdjCqCzMEVP8cB active 1: 1 EOS84uT4DBAJQpagWDfZPbk2hd9aaH8ZGZUxHTrpdjCqCzMEVP8cB memory: quota: 623.2 Kb used: 191.4 Kb

net bandwidth: staked: 100.0000 EOS (total stake delegated from account to self) delegated: 0.0000 EOS (total staked delegated to account from others) used: 6.22 Kb available: 19.2 Mb limit: 19.2 Mb

cpu bandwidth: staked: 100.0000 EOS (total stake delegated from account to self) delegated: 0.0000 EOS (total staked delegated to account from others) used: 11.66 ms available: 3.833 sec limit: 3.845 sec

没有MEMO

测试到没有memo空投给另一个随机帐户ge3dmgenesis: 1000.5425 EOS- bandwith的使用情况从128字节减少到的120字节,在cpu上没有任何重大变化,并且不影响RAM上的任何内容,全被记住了,从eosio.token合同中我们不会将memo存储在任何地方。

cleos push action eosairdroper issue '["ge3dmgenesis", "1000.5425 TOKEN", ""]' -p eosairdroper executed transaction: 34d05c59c10049ae946ad4e66703bb42987d1a1ce248115f3bea4bb6b1120e7f 120 bytes 2387 us

$ cleosjn get account eosairdroper permissions: owner 1: 1 EOS84uT4DBAJQpagWDfZPbk2hd9aaH8ZGZUxHTrpdjCqCzMEVP8cB active 1: 1 EOS84uT4DBAJQpagWDfZPbk2hd9aaH8ZGZUxHTrpdjCqCzMEVP8cB memory: quota: 623.2 Kb used: 191.6 Kb

net bandwidth: staked: 100.0000 EOS (total stake delegated from account to self) delegated: 0.0000 EOS (total staked delegated to account from others) used: 6.275 Kb available: 19.2 Mb limit: 19.2 Mb

cpu bandwidth: staked: 100.0000 EOS (total stake delegated from account to self) delegated: 0.0000 EOS (total staked delegated to account from others) used: 13.22 ms available: 3.831 sec limit: 3.845 sec

结果

如果我们假设上述数值为近似平均值(我需要加载一批数千个帐户来确保),这些数据是基于官方mainnet(https://github.com/eoscafe/eos-snapshot-validation )启动快照完整空投所需的统计数据:

WechatIMG130.jpeg

您最终会想要从空投中删除一些账户,如B1,交易所等。

这些还是来自创世快照的其他的有趣数据:

WechatIMG131.jpeg

Mainnet

截至今天,几个小时前,我们创建了一个账户,其RAM内存价格为0.015 EOS / Kb。

所以,如果你现在正在计划一个空投,那么官方的创世纪快照将耗资约563 EOS,现在转换为6025.17美元。我不考虑网络和CPU,因为它在3天内完全恢复,那么你可以分开你的空投。

我的下一步是运行一大批发行交易的代币,这样我就可以证明所有这些统计资料都是正确的。

也非常感谢@nsjames,@syedjafri和@blockliberty 很好的见解,关于讨论和价格!当然,还有这个很好用的Jungle Testnet @cryptolions

本文图片来源于网络


相关文章:

We are EOShenzhen

不同入口如何投票:
imToken
火币
portal

关于我们更多联系:
Website:https://eoshenzhen.io

Steem:https://steemit.com/@eoshenzhen

Busy:https://busy.org/@eoshenzhen

Telegram:https://t.me/eoshenzhen

Twitter:https://twitter.com/eostechlover

简书:EOS技术爱好者

新浪微博:EOSTechLover


EOShenzhen的投票账号:eoshenzhenio

EOShenzhen

©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 204,530评论 6 478
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 86,403评论 2 381
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 151,120评论 0 337
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 54,770评论 1 277
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 63,758评论 5 367
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 48,649评论 1 281
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 38,021评论 3 398
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 36,675评论 0 258
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 40,931评论 1 299
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 35,659评论 2 321
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 37,751评论 1 330
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 33,410评论 4 321
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 39,004评论 3 307
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 29,969评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 31,203评论 1 260
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 45,042评论 2 350
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 42,493评论 2 343

推荐阅读更多精彩内容