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

[0.17.0-declined] Transaction signing is broken due to changed op ids #6

Open
bitphage opened this issue Nov 10, 2017 · 1 comment
Open
Assignees

Comments

@bitphage
Copy link

Fixing #5 eliminates python tx.sign() problem, but it appears produced transaction signature is wrong and golos node refuses to verify_authority. Reproducible both with 0.16 and 0.17.

Used keypair:

  • Private posting key: 5K2qsUM3YXVNYGGJzfS9hjT2p1cM7t4XZ2E8LcMePsxGjpQ3Fps
  • Public posting key: GLS5KAn8JU79Gop3k4Hv2bqwdkQTzPM4q8795whZWagDRiEXcXBGE

test suite:

#!/usr/bin/env python

from steem import Steem

nodes = ['https://ws.testnet.golos.io']
keys = ['5K2qsUM3YXVNYGGJzfS9hjT2p1cM7t4XZ2E8LcMePsxGjpQ3Fps']
title = 'test'
body = 'test post'
tags = 'test'
account = 'test1'

golos = Steem(nodes=nodes, keys=keys, debug=True)
golos.commit.post(title, body, account, tags=tags)
% ./tmp_p.py
['5K2qsUM3YXVNYGGJzfS9hjT2p1cM7t4XZ2E8LcMePsxGjpQ3Fps']
Format GLS unkown. You've been warned!

{'GLS5KAn8JU79Gop3k4Hv2bqwdkQTzPM4q8795whZWagDRiEXcXBGE': '5K2qsUM3YXVNYGGJzfS9hjT2p1cM7t4XZ2E8LcMePsxGjpQ3Fps'}
['GLS5KAn8JU79Gop3k4Hv2bqwdkQTzPM4q8795whZWagDRiEXcXBGE', 1]
5K2qsUM3YXVNYGGJzfS9hjT2p1cM7t4XZ2E8LcMePsxGjpQ3Fps
signing with: ['5K2qsUM3YXVNYGGJzfS9hjT2p1cM7t4XZ2E8LcMePsxGjpQ3Fps']
Traceback (most recent call last):
  File "./tmp_p.py", line 14, in <module>
    golos.commit.post(title, body, account, tags=tags)
  File "/home/vvk/devel/golos/scripts/venv/lib/python3.6/site-packages/steem/commit.py", line 325, in post
    return self.finalizeOp(ops, author, "posting")
  File "/home/vvk/devel/golos/scripts/venv/lib/python3.6/site-packages/steem/commit.py", line 128, in finalizeOp
    return tx.broadcast()
  File "/home/vvk/devel/golos/scripts/venv/lib/python3.6/site-packages/steem/transactionbuilder.py", line 129, in broadcast
    raise e
  File "/home/vvk/devel/golos/scripts/venv/lib/python3.6/site-packages/steem/transactionbuilder.py", line 126, in broadcast
    if not self.steemd.verify_authority(self.json()):
  File "/home/vvk/devel/golos/scripts/venv/lib/python3.6/site-packages/steem/steemd.py", line 689, in verify_authority
    return self.exec('verify_authority', signed_transaction, api='database_api')
  File "/home/vvk/devel/golos/scripts/venv/lib/python3.6/site-packages/steembase/http_client.py", line 186, in exec
    return_with_args=return_with_args)
  File "/home/vvk/devel/golos/scripts/venv/lib/python3.6/site-packages/steembase/http_client.py", line 206, in _return
    raise RPCError(error_message)
steembase.exceptions.RPCError: 3030000 basic_exception: rity
Missing Posting Authority test1
    {"id":"test1","posting":{"weight_threshold":1,"account_auths":[],"key_auths":[["GLS5KAn8JU79Gop3k4Hv2bqwdkQTzPM4q8795whZWagDRiEXcXBGE",1]]},"active":{"weight_threshold":1,"account_auths":[],"key_auths":[["GLS6QkHZvP68wAUPz6SK3DhaCT6866Grgi3j2wnNGGJoF38FnDr3J",1]]},"owner":{"weight_threshold":1,"account_auths":[],"key_auths":[["GLS61mtEB8Ffq6KMxoPHqdX7DzaLYXgCSH8wFsT56NwXH4sCVDjss",1]]}}
    th_a  transaction.cpp:115 verify_authority

    {"ops":[["comment",{"parent_author":"","parent_permlink":"test","author":"test1","permlink":"test","title":"test","body":"test post","json_metadata":"{\"tags\": [\"test\"]}"}]],"sigs":["GLS58FVXbvpHjHdNLz21e2rmxM9mmxDmeTpe5vTCcH95gp8PgXwQc"]}
    th_a  transaction.cpp:153 verify_authority

    {"*this":{"ref_block_num":37803,"ref_block_prefix":1981343695,"expiration":"2017-11-10T16:25:46","operations":[["comment",{"parent_author":"","parent_permlink":"test","author":"test1","permlink":"test","title":"test","body":"test post","json_metadata":"{\"tags\": [\"test\"]}"}]],"extensions":[],"signatures":["1f61ace236e8be815764e49c10cb8832f76b171cd3f73dce432ab75e7ddd0e61e02e1293b9f7776f464cf17ee3eb018ab65dd671d0a649600a3a065ace08798d5d"]}}
    th_a  transaction.cpp:263 verify_authority

    {"call.method":"call","call.params":["database_api","verify_authority",[{"ref_block_num":37803,"ref_block_prefix":1981343695,"expiration":"2017-11-10T16:25:46","operations":[["comment",{"parent_author":"","parent_permlink":"test","author":"test1","permlink":"test","title":"test","body":"test post","json_metadata":"{\"tags\": [\"test\"]}"}]],"extensions":[],"signatures":["1f61ace236e8be815764e49c10cb8832f76b171cd3f73dce432ab75e7ddd0e61e02e1293b9f7776f464cf17ee3eb018ab65dd671d0a649600a3a065ace08798d5d"]}]]}
    th_a  websocket_api.cpp:135 on_message_impl

@bitphage
Copy link
Author

OK the root cause is GolosChain/golos#259

@bitphage bitphage changed the title Transaction signing is totally broken [0.17.0] Transaction signing is broken due to changed op ids Feb 11, 2018
@bitphage bitphage changed the title [0.17.0] Transaction signing is broken due to changed op ids [0.17.0-declined] Transaction signing is broken due to changed op ids Mar 12, 2018
bitphage pushed a commit to bitphage/golos-python that referenced this issue Dec 11, 2018
Made chain_properties_update to work
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants