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

Update CLI cookbook instructions (and fix bugs discovered) #129

Closed
bytemaster opened this issue Jul 2, 2015 · 10 comments
Closed

Update CLI cookbook instructions (and fix bugs discovered) #129

bytemaster opened this issue Jul 2, 2015 · 10 comments
Assignees
Labels
Milestone

Comments

@bytemaster
Copy link
Contributor

The CLI cookbook instructions do not work because they have fallen behind the latest code changes. We need to update the cookbook and verify that following the instructions will work as advertised.

@bytemaster bytemaster added the bug label Jul 2, 2015
@bytemaster bytemaster added this to the pre-alpha milestone Jul 2, 2015
@vikramrajkumar
Copy link
Contributor

I've moved the cookbook to the docs submodule so it can be accessible from the wiki: https://github.com/cryptonomex/graphene/wiki

@clayop
Copy link
Contributor

clayop commented Jul 3, 2015

When I followed the cookbook, I met an error with import_balance

unlocked >>> import_balance nathan [5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3] true
import_balance nathan [5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3] true
1868630ms th_a       wallet.cpp:2247               import_balance       ] balances: [{"id":"1.15.0","owner":"GPHFAbAx7yuxt725qSZvfwWqkdCwp9ZnUama","balance":{"amount":"1000000000000000","asset_id":"1.3.0"},"last_claim_date":"1970-01-01T00:00:00"}] 
0 exception: unspecified
10 assert_exception: Assert Exception
eval_state._sigs.insert(std::make_pair( public_key_type( fc::ecc::public_key(sig, trx.digest(tapos_block_summary.block_id))), false)).second: Multiple signatures by same key detected
    {}
    th_a  db_block.cpp:543 _apply_transaction

    {"trx":{"ref_block_num":16,"ref_block_prefix":3355498975,"relative_expiration":3,"operations":[[36,{"fee":{"amount":0,"asset_id":"1.3.0"},"deposit_to_account":"1.2.15","balance_to_claim":"1.15.0","balance_owner_key":"GPH6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV","total_claimed":{"amount":"1000000000000000","asset_id":"1.3.0"}}]],"signatures":["1f416e338624f57f94dbf058ff9d072a8ab738bc9bc690704a7cc1341453692ab739680e6b26b35507bdb3afe6dc823b1b9479605a5f1060aafeeb10efcc1f2062","1f416e338624f57f94dbf058ff9d072a8ab738bc9bc690704a7cc1341453692ab739680e6b26b35507bdb3afe6dc823b1b9479605a5f1060aafeeb10efcc1f2062"]}}
    th_a  db_block.cpp:597 _apply_transaction

    {"trx":{"ref_block_num":16,"ref_block_prefix":3355498975,"relative_expiration":3,"operations":[[36,{"fee":{"amount":0,"asset_id":"1.3.0"},"deposit_to_account":"1.2.15","balance_to_claim":"1.15.0","balance_owner_key":"GPH6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV","total_claimed":{"amount":"1000000000000000","asset_id":"1.3.0"}}]],"signatures":["1f416e338624f57f94dbf058ff9d072a8ab738bc9bc690704a7cc1341453692ab739680e6b26b35507bdb3afe6dc823b1b9479605a5f1060aafeeb10efcc1f2062","1f416e338624f57f94dbf058ff9d072a8ab738bc9bc690704a7cc1341453692ab739680e6b26b35507bdb3afe6dc823b1b9479605a5f1060aafeeb10efcc1f2062"]}}
    th_a  db_block.cpp:189 push_transaction
    {"error":"10 assert_exception: Assert Exception\neval_state._sigs.insert(std::make_pair( public_key_type( fc::ecc::public_key(sig, trx.digest(tapos_block_summary.block_id))), false)).second: Multiple signatures by same key detected\n    {}\n    th_a  db_block.cpp:543 _apply_transaction\n\n    {\"trx\":{\"ref_block_num\":16,\"ref_block_prefix\":3355498975,\"relative_expiration\":3,\"operations\":[[36,{\"fee\":{\"amount\":0,\"asset_id\":\"1.3.0\"},\"deposit_to_account\":\"1.2.15\",\"balance_to_claim\":\"1.15.0\",\"balance_owner_key\":\"GPH6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV\",\"total_claimed\":{\"amount\":\"1000000000000000\",\"asset_id\":\"1.3.0\"}}]],\"signatures\":[\"1f416e338624f57f94dbf058ff9d072a8ab738bc9bc690704a7cc1341453692ab739680e6b26b35507bdb3afe6dc823b1b9479605a5f1060aafeeb10efcc1f2062\",\"1f416e338624f57f94dbf058ff9d072a8ab738bc9bc690704a7cc1341453692ab739680e6b26b35507bdb3afe6dc823b1b9479605a5f1060aafeeb10efcc1f2062\"]}}\n    th_a  db_block.cpp:597 _apply_transaction\n\n    {\"trx\":{\"ref_block_num\":16,\"ref_block_prefix\":3355498975,\"relative_expiration\":3,\"operations\":[[36,{\"fee\":{\"amount\":0,\"asset_id\":\"1.3.0\"},\"deposit_to_account\":\"1.2.15\",\"balance_to_claim\":\"1.15.0\",\"balance_owner_key\":\"GPH6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV\",\"total_claimed\":{\"amount\":\"1000000000000000\",\"asset_id\":\"1.3.0\"}}]],\"signatures\":[\"1f416e338624f57f94dbf058ff9d072a8ab738bc9bc690704a7cc1341453692ab739680e6b26b35507bdb3afe6dc823b1b9479605a5f1060aafeeb10efcc1f2062\",\"1f416e338624f57f94dbf058ff9d072a8ab738bc9bc690704a7cc1341453692ab739680e6b26b35507bdb3afe6dc823b1b9479605a5f1060aafeeb10efcc1f2062\"]}}\n    th_a  db_block.cpp:189 push_transaction","data":{"id":14,"error":{"code":1,"message":"10 assert_exception: Assert Exception\neval_state._sigs.insert(std::make_pair( public_key_type( fc::ecc::public_key(sig, trx.digest(tapos_block_summary.block_id))), false)).second: Multiple signatures by same key detected\n    {}\n    th_a  db_block.cpp:543 _apply_transaction\n\n    {\"trx\":{\"ref_block_num\":16,\"ref_block_prefix\":3355498975,\"relative_expiration\":3,\"operations\":[[36,{\"fee\":{\"amount\":0,\"asset_id\":\"1.3.0\"},\"deposit_to_account\":\"1.2.15\",\"balance_to_claim\":\"1.15.0\",\"balance_owner_key\":\"GPH6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV\",\"total_claimed\":{\"amount\":\"1000000000000000\",\"asset_id\":\"1.3.0\"}}]],\"signatures\":[\"1f416e338624f57f94dbf058ff9d072a8ab738bc9bc690704a7cc1341453692ab739680e6b26b35507bdb3afe6dc823b1b9479605a5f1060aafeeb10efcc1f2062\",\"1f416e338624f57f94dbf058ff9d072a8ab738bc9bc690704a7cc1341453692ab739680e6b26b35507bdb3afe6dc823b1b9479605a5f1060aafeeb10efcc1f2062\"]}}\n    th_a  db_block.cpp:597 _apply_transaction\n\n    {\"trx\":{\"ref_block_num\":16,\"ref_block_prefix\":3355498975,\"relative_expiration\":3,\"operations\":[[36,{\"fee\":{\"amount\":0,\"asset_id\":\"1.3.0\"},\"deposit_to_account\":\"1.2.15\",\"balance_to_claim\":\"1.15.0\",\"balance_owner_key\":\"GPH6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV\",\"total_claimed\":{\"amount\":\"1000000000000000\",\"asset_id\":\"1.3.0\"}}]],\"signatures\":[\"1f416e338624f57f94dbf058ff9d072a8ab738bc9bc690704a7cc1341453692ab739680e6b26b35507bdb3afe6dc823b1b9479605a5f1060aafeeb10efcc1f2062\",\"1f416e338624f57f94dbf058ff9d072a8ab738bc9bc690704a7cc1341453692ab739680e6b26b35507bdb3afe6dc823b1b9479605a5f1060aafeeb10efcc1f2062\"]}}\n    th_a  db_block.cpp:189 push_transaction","data":{"code":10,"name":"assert_exception","message":"Assert Exception","stack":[{"context":{"level":"error","file":"db_block.cpp","line":543,"method":"_apply_transaction","hostname":"","thread_name":"th_a","timestamp":"2015-07-03T16:31:08"},"format":"eval_state._sigs.insert(std::make_pair( public_key_type( fc::ecc::public_key(sig, trx.digest(tapos_block_summary.block_id))), false)).second: Multiple signatures by same key detected","data":{}},{"context":{"level":"warn","file":"db_block.cpp","line":597,"method":"_apply_transaction","hostname":"","thread_name":"th_a","timestamp":"2015-07-03T16:31:08"},"format":"","data":{"trx":{"ref_block_num":16,"ref_block_prefix":3355498975,"relative_expiration":3,"operations":[[36,{"fee":{"amount":0,"asset_id":"1.3.0"},"deposit_to_account":"1.2.15","balance_to_claim":"1.15.0","balance_owner_key":"GPH6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV","total_claimed":{"amount":"1000000000000000","asset_id":"1.3.0"}}]],"signatures":["1f416e338624f57f94dbf058ff9d072a8ab738bc9bc690704a7cc1341453692ab739680e6b26b35507bdb3afe6dc823b1b9479605a5f1060aafeeb10efcc1f2062","1f416e338624f57f94dbf058ff9d072a8ab738bc9bc690704a7cc1341453692ab739680e6b26b35507bdb3afe6dc823b1b9479605a5f1060aafeeb10efcc1f2062"]}}},{"context":{"level":"warn","file":"db_block.cpp","line":189,"method":"push_transaction","hostname":"","thread_name":"th_a","timestamp":"2015-07-03T16:31:08"},"format":"","data":{"trx":{"ref_block_num":16,"ref_block_prefix":3355498975,"relative_expiration":3,"operations":[[36,{"fee":{"amount":0,"asset_id":"1.3.0"},"deposit_to_account":"1.2.15","balance_to_claim":"1.15.0","balance_owner_key":"GPH6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV","total_claimed":{"amount":"1000000000000000","asset_id":"1.3.0"}}]],"signatures":["1f416e338624f57f94dbf058ff9d072a8ab738bc9bc690704a7cc1341453692ab739680e6b26b35507bdb3afe6dc823b1b9479605a5f1060aafeeb10efcc1f2062","1f416e338624f57f94dbf058ff9d072a8ab738bc9bc690704a7cc1341453692ab739680e6b26b35507bdb3afe6dc823b1b9479605a5f1060aafeeb10efcc1f2062"]}}}]}}}}
    th_a  state.cpp:38 handle_reply

    {"name_or_id":"nathan"}
    th_a  wallet.cpp:2285 import_balance

@clayop
Copy link
Contributor

clayop commented Jul 5, 2015

Duplicate signature problem is solved.

Here's another minor error.

unlocked >>> create_account_with_brain_key "this is the brain key for my account" my-account nathan nathan true
create_account_with_brain_key "this is the brain key for my account" my-account nathan nathan true
3079095ms th_a       wallet.cpp:561                save_wallet_file     ] saving wallet to file wallet.json
{
  "ref_block_num": 28,
  "ref_block_prefix": 2549727414,
  "relative_expiration": 3,
  "operations": [[
      4,{
        "fee": {
          "amount": 0,
          "asset_id": "1.3.0"
        },
        "registrar": "1.2.15",
        "referrer": "1.2.15",
        "referrer_percent": 0,
        "name": "my-account",
        "owner": {
          "weight_threshold": 1,
          "account_auths": [],
          "key_auths": [[
              "GPH6rJg81HQ7TkhteXi7BXfrnoCNxeTYbd3kvy1xgJc8fMk3bUWk9",
              1
            ]
          ],
          "address_auths": []
        },
        "active": {
          "weight_threshold": 1,
          "account_auths": [],
          "key_auths": [[
              "GPH6ASr7PNyE4skqUGQKkqPAmgAopoWaCDGHPRu5umqvC2M8WxruG",
              1
            ]
          ],
          "address_auths": []
        },
        "options": {
          "memo_key": "GPH6HTYFZ71JqsGkb43oR6iQYK6X9xYjdVasrjbEtGTS6vsbM4ukA",
          "voting_account": "1.2.0",
          "num_witness": 0,
          "num_committee": 0,
          "votes": []
        }
      }
    ]
  ],
  "signatures": [
    "1f77042ef006cfb0f07e444c7baebb08bb1c02bafb64794d3f41f77e47d959766946cb392c1940eaed8feca25dee9a71d1b0b2a065ef4397cf3bbcd48f2a5e6595"
  ]
}
3079146ms th_a       wallet.cpp:205                claim_registered_acc ] account my-account registered by someone else first!
3079146ms th_a       wallet.cpp:205                claim_registered_acc ] account my-account registered by someone else first!

Although my-account is created, it gives error message. "3079146ms th_a wallet.cpp:205 claim_registered_acc ] account my-account registered by someone else first!"

@emfrias
Copy link
Collaborator

emfrias commented Jul 6, 2015

That sounds like a bug, but it's one I thought I fixed a few days ago. Right now I can't reproduce it. From a clean wallet/blockchain, I'm executing:

set_password my_password
unlock my_password
import_key "nathan" 5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3
import_balance nathan ["5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3"] true
upgrade_account nathan true
create_account_with_brain_key "this is the brain key for my account" my-account nathan nathan true

If I execute the create_account_with_brain_key command again, I do get the message you report, but it also prints a longer error before instead of dumping the transaction like you show.

Can you post a list of commands (or if that is the same as your list of commands, maybe we have a platform-specific bug?)

@clayop
Copy link
Contributor

clayop commented Jul 6, 2015

Clean installed again (remove graphene folder and re-clone/rebuild), and didn't meet the error.
All thing are smooth.

@bytemaster
Copy link
Contributor Author

Thanks for all the help clayop, more BPTS heading your way.

@theoreticalbts
Copy link
Contributor

@emfrias -- I believe you were responsible for getting parameter names in CLI help (something which was badly needed). Please update the first question in the questions section of README.md to reflect this (I believe it will gracefully degrade if doxygen and perl deps aren't installed?)

@clayop
Copy link
Contributor

clayop commented Jul 7, 2015

Thanks BM. My BTS ID is clayop.

@emfrias
Copy link
Collaborator

emfrias commented Jul 8, 2015

@theoreticalbts -- updated README in e867556. You're correct, if CMake doesn't find doxygen/perl, it falls back to the old behavior of just displaying parameter types.

@vikramrajkumar
Copy link
Contributor

This issue was moved to bitshares/bitshares-core#35

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

No branches or pull requests

5 participants