Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set default quote asset_id to 1.3.1 #1132

Merged
merged 1 commit into from
Jul 14, 2018
Merged

set default quote asset_id to 1.3.1 #1132

merged 1 commit into from
Jul 14, 2018

Conversation

RichardWeiYang
Copy link
Contributor

In current help message of create_asset, printed in gethelp, gives an
example of option with quote asset_id of "1.3.0". This asset id is
not a valid one, since the code requires the id to be "1.3.1" on
creating a new asset.

This change set the default quote asset_id to "1.3.1", so that the
gethelp message would give a valid option example.

In current help message of create_asset, printed in gethelp, gives an
example of option with quote asset_id of "1.3.0". This asset id is
not a valid one, since the code requires the id to be "1.3.1" on
creating a new asset.

This change set the default quote asset_id to "1.3.1", so that the
gethelp message would give a valid option example.
Copy link
Member

@abitmore abitmore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense.
Make sure all test cases pass and can successfully sync the chain, then we can merge it.
Thanks.

@RichardWeiYang
Copy link
Contributor Author

I have tried command create_asset and update_asset in cli_wallet.

Not sure how to run all the test cases?

@oxarbitrage
Copy link
Member

run all the tests with:

./tests/chain_test

make sure you end up with *** No errors detected

also, start a witness node with your changes and synchronize the chain, i understand you are making the change for a cli wallet command but your change is done in the core(asset_ops file) so we need to make sure this does not break anything.

@RichardWeiYang
Copy link
Contributor Author

@oxarbitrage

sure, I will run the test and paste the result.

BTW, I don't need to sync all the data by running the witness_node, right? Since my machine doesn't hold much memory. Is "Get block..." a symbol for the validation?

@RichardWeiYang
Copy link
Contributor Author

The chain_test result is:

*** No errors detected

And I start a witness_node to connect my testnet(without this change), the console log shows getting a block successfully.

1105323ms th_a       application.cpp:505           handle_block         ] Got block: #2966 00000b96f93e993f9d59654041d3e3b8f5ebc19e time: 2018-07-11T02:18:25 latency: 323 ms from: init0  irreversible: 0 (-2966)

@RichardWeiYang
Copy link
Contributor Author

RichardWeiYang commented Jul 11, 2018

Also I tried to connect to the mainnet, below is the console log:

unest@node2:~/bitshares-core$ programs/witness_node/witness_node --data-dir data/mainnet 
1531297ms th_a       witness.cpp:87                plugin_initialize    ] witness plugin:  plugin_initialize() begin
1531297ms th_a       witness.cpp:97                plugin_initialize    ] Public Key: BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV
1531297ms th_a       witness.cpp:115               plugin_initialize    ] witness plugin:  plugin_initialize() end
1531297ms th_a       object_database.cpp:106       open                 ] Opening object database from /home/unest/bitshares-core/data/mainnet/blockchain ...
1531298ms th_a       object_database.cpp:111       open                 ] Done opening object database.
1531298ms th_a       application.cpp:323           operator()           ] Initializing database...
1569176ms th_a       application.cpp:193           reset_p2p_node       ] Adding seed node 104.236.144.84:1777
1569177ms th_a       application.cpp:193           reset_p2p_node       ] Adding seed node 128.199.143.47:2015
1569178ms th_a       application.cpp:193           reset_p2p_node       ] Adding seed node 23.92.53.182:1776
1569178ms th_a       application.cpp:193           reset_p2p_node       ] Adding seed node 192.121.166.162:1776
1569179ms th_a       application.cpp:193           reset_p2p_node       ] Adding seed node 51.15.61.160:1776
1569183ms th_a       application.cpp:193           reset_p2p_node       ] Adding seed node 116.239.103.126:62015
1569187ms th_a       application.cpp:193           reset_p2p_node       ] Adding seed node 148.251.80.54:4243
1569191ms th_a       application.cpp:193           reset_p2p_node       ] Adding seed node 208.110.65.114:50696
1569192ms th_a       application.cpp:193           reset_p2p_node       ] Adding seed node 195.154.80.121:50696
1569197ms th_a       application.cpp:193           reset_p2p_node       ] Adding seed node 45.77.136.107:1776
1569202ms th_a       application.cpp:193           reset_p2p_node       ] Adding seed node 71.197.2.119:1776
1569206ms th_a       application.cpp:193           reset_p2p_node       ] Adding seed node 104.145.234.6:1777
1569210ms th_a       application.cpp:193           reset_p2p_node       ] Adding seed node 149.56.17.159:1776
1569215ms th_a       application.cpp:193           reset_p2p_node       ] Adding seed node 95.179.137.33:1776
1569219ms th_a       application.cpp:193           reset_p2p_node       ] Adding seed node 195.201.107.119:1776
1569224ms th_a       application.cpp:193           reset_p2p_node       ] Adding seed node 138.201.137.206:1776
1569228ms th_a       application.cpp:193           reset_p2p_node       ] Adding seed node 149.28.130.60:1776
1569232ms th_a       application.cpp:193           reset_p2p_node       ] Adding seed node 119.28.5.253:1776
1569232ms th_a       application.cpp:193           reset_p2p_node       ] Adding seed node 23.92.53.182:1776
1569233ms th_a       application.cpp:193           reset_p2p_node       ] Adding seed node 195.201.107.119:1776
1569233ms th_a       application.cpp:193           reset_p2p_node       ] Adding seed node 192.121.166.162:1776
1569234ms th_a       application.cpp:193           reset_p2p_node       ] Adding seed node 18.209.103.7:1776
1569235ms th_a       application.cpp:193           reset_p2p_node       ] Adding seed node 116.62.226.52:1776
1569235ms th_a       application.cpp:193           reset_p2p_node       ] Adding seed node 18.233.75.242:1776
1569236ms th_a       application.cpp:193           reset_p2p_node       ] Adding seed node 213.136.82.221:1776
1569237ms th_a       application.cpp:193           reset_p2p_node       ] Adding seed node 45.77.136.107:1776
1569237ms th_a       application.cpp:193           reset_p2p_node       ] Adding seed node 52.119.1.55:1776
1569238ms th_a       application.cpp:193           reset_p2p_node       ] Adding seed node 209.105.239.13:1776
1569239ms th_a       application.cpp:193           reset_p2p_node       ] Adding seed node 139.162.183.240:1776
1569239ms th_a       application.cpp:193           reset_p2p_node       ] Adding seed node 81.89.101.133:1776
1569240ms th_a       application.cpp:193           reset_p2p_node       ] Adding seed node 45.79.174.179:1776
1569241ms th_a       application.cpp:193           reset_p2p_node       ] Adding seed node 173.249.24.86:1776
1569241ms th_a       application.cpp:193           reset_p2p_node       ] Adding seed node 94.130.15.169:1776
1569242ms th_a       application.cpp:193           reset_p2p_node       ] Adding seed node 149.28.40.173:1776
1569242ms th_a       application.cpp:208           reset_p2p_node       ] Configured p2p node to listen on 0.0.0.0:40508
1569244ms th_a       witness.cpp:120               plugin_startup       ] witness plugin:  plugin_startup() begin
1569245ms th_a       witness.cpp:135               plugin_startup       ] No witnesses configured! Please add witness IDs and private keys to configuration.
1569245ms th_a       witness.cpp:136               plugin_startup       ] witness plugin:  plugin_startup() end
1569245ms th_a       main.cpp:266                  main                 ] Started BitShares node on a chain with 0 blocks.
1569246ms th_a       main.cpp:267                  main                 ] Chain ID is 4018d7844c78f6a6c41c6a552b898022310fc5dec06da467ee7905a8dad512c8
1577098ms th_a       application.cpp:505           handle_block         ] Got block: #10000 00002710c3894322c3a33dabdcb4020c2918db6e time: 2015-10-13T23:15:42 latency: 86497835098 ms from: cyrano  irreversib
le: 9976 (-24)
1592121ms th_a       application.cpp:505           handle_block         ] Got block: #20000 00004e2032e9ec266a4eb088a5e0aa05bb24ff0c time: 2015-10-14T07:37:33 latency: 86467739121 ms from: bitcube  irreversi
ble: 19975 (-25)

@oxarbitrage
Copy link
Member

by default the node will require around 20 gigs of ram, by using --max-ops-per-account 10 you should be able to run it 8 gigs. please syncronize he most you can, just the first blocks is not enough to detect a possible problem.

@RichardWeiYang
Copy link
Contributor Author

ok, I will schedule the test at the weekend. Not sure how many I could sync.

Copy link
Member

@oxarbitrage oxarbitrage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i just synced with your code up to 2017-06. i think this will cause no harm.

@oxarbitrage oxarbitrage merged commit 691e1ff into bitshares:develop Jul 14, 2018
@RichardWeiYang
Copy link
Contributor Author

@oxarbitrage

Thanks for merging this commit.

BTW, I am willing to know how to make sure the code works fine?

For example, currently I synced block till 2018-03-18.

1171906ms th_a       application.cpp:505           handle_block         ] Got block: #25320000 01825a40be1e4186c2f3b656fe9c2cc0d02e0d5e time: 2018-03-17T23:50:30 latency: 10254541906 ms from: rnglab  irreversible: 25319981 (-19)
1226042ms th_a       application.cpp:505           handle_block         ] Got block: #25330000 01828150c74f5eb3ecc16f7da19a0d661b50b6f1 time: 2018-03-18T08:12:36 latency: 10224470042 ms from: rnglab  irreversible: 25329980 (-20)

Is this a proof for the code is fine? Do we need other evidence?

@RichardWeiYang
Copy link
Contributor Author

Currently, it synced to 2081-07-04

1871585ms th_a       application.cpp:505           handle_block         ] Got block: #28420000 01b1a7a0a59779d02013d2b1701ce88089e38a9c time: 2018-07-04T03:25:09 latency: 936362585 ms from: witness.yao  irreversible: 28419972 (-28)

And took 9.6G ram by running the witness_node with --max-ops-per-account 10 set.

$ free -h
             total       used       free     shared    buffers     cached
Mem:          9.8G       9.6G       127M        20K        96M       4.8G
-/+ buffers/cache:       4.8G       5.0G
Swap:         8.0G        56M       7.9G

Not sure how many more it could sync.

@RichardWeiYang
Copy link
Contributor Author

I think it is synced with current network and processing transactions.

2018-07-15T03:39:31 th_a:invoke handle_block         handle_block ] Got block: #28735350 01b67776e9835e30a36bbe686bef57fffd2817fd time: 2018-07-15T03:39:33 latency: -1047 ms from: delegate.freedom  irreversible: 28735328 (-22)                    application.cpp:505
2018-07-15T03:39:32 th_a:invoke handle_transaction   handle_transaction ] Got 5 transactions from network                       application.cpp:559
2018-07-15T03:39:33 th_a:invoke handle_transaction   handle_transaction ] Got 11 transactions from network                      application.cpp:559
2018-07-15T03:39:35 th_a:invoke handle_transaction   handle_transaction ] Got 8 transactions from network                       application.cpp:559

@oxarbitrage
Copy link
Member

thanks @RichardWeiYang thats good enough for this. very appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants