Code Monkey home page Code Monkey logo

counterparty-lib's People

Contributors

adamkrellenstein avatar btcdrak avatar chiguireitor avatar cjcole avatar cryptcoin-junkey avatar cryptonaut420 avatar deweller avatar droplister avatar familymediallc avatar frozenlock avatar gotcha avatar ignat99 avatar ivanaszuber avatar jdogresorg avatar jxchen avatar kanzure avatar khan-faiz avatar larskluge avatar leishman avatar littleskunk avatar mide avatar millz0r avatar pataegrillo avatar rippler avatar robby-d avatar rubensayshi avatar unsystemizer avatar wakiyamap avatar wasthatawolf avatar wseng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

counterparty-lib's Issues

Exception on Testnet.

[2017-11-14 05:50:29][INFO] Block: 87947 (0.10s, hashes: L:45a40 / TX:92ce4 / M:42ae9)
[2017-11-14 05:52:47][WARNING] tx missing in rawtx cache: 'cb858fc0b804971cbe95e83325002eb8ae35e6d76efa163ec531935dfae977f7' -- txhash_list size: 4, hash: 90729db654a40556bd31e20709fea883 / raw_transactions_cache size: 15 / # rpc_batch calls: 4 / txhash in noncached_txhashes: True / txhash in txhash_list: True -- list []
[2017-11-14 05:52:47][WARNING] tx missing in rawtx cache: 'f6065aa06b3b84ac93dae1d6bed018fefca9c65d6d1ec90c15d3541d479d39f0' -- txhash_list size: 4, hash: 90729db654a40556bd31e20709fea883 / raw_transactions_cache size: 16 / # rpc_batch calls: 4 / txhash in noncached_txhashes: True / txhash in txhash_list: True -- list []
[2017-11-14 05:52:47][WARNING] tx missing in rawtx cache: '8b824a144ff04227fd7aa24dfda3fe63890e3f2c20989133d08b97e474460f7b' -- txhash_list size: 4, hash: 90729db654a40556bd31e20709fea883 / raw_transactions_cache size: 17 / # rpc_batch calls: 4 / txhash in noncached_txhashes: True / txhash in txhash_list: True -- list []
[2017-11-14 05:53:15][INFO] Block: 87948 (0.09s, hashes: L:2ab28 / TX:7ae97 / M:727c3)
[2017-11-14 05:54:05][ERROR] Unhandled Exception
Traceback (most recent call last):
  File "/usr/local/bin/counterparty-server", line 9, in <module>
    load_entry_point('counterparty-cli', 'console_scripts', 'counterparty-server')()
  File "/counterparty-cli/counterpartycli/__init__.py", line 16, in server_main
    server.main()
  File "/counterparty-cli/counterpartycli/server.py", line 157, in main
    server.start_all(db)
  File "/counterparty-lib/counterpartylib/server.py", line 412, in start_all
    blocks.follow(db)
  File "/counterparty-lib/counterpartylib/lib/blocks.py", line 1299, in follow
    mempool_tx_index = list_tx(db, None, block_index, curr_time, tx_hash, tx_index=mempool_tx_index, tx_hex=tx_hex)
  File "/counterparty-lib/counterpartylib/lib/blocks.py", line 912, in list_tx
    source, destination, btc_amount, fee, data = get_tx_info(tx_hex)
  File "/counterparty-lib/counterpartylib/lib/blocks.py", line 450, in get_tx_info
    return _get_tx_info(tx_hex, block_parser, block_index)
  File "/counterparty-lib/counterpartylib/lib/blocks.py", line 460, in _get_tx_info
    return  get_tx_info3(tx_hex, block_parser=block_parser)
  File "/counterparty-lib/counterpartylib/lib/blocks.py", line 583, in get_tx_info3
    return get_tx_info2(tx_hex, block_parser=block_parser, p2sh_support=True)
  File "/counterparty-lib/counterpartylib/lib/blocks.py", line 591, in get_tx_info2
    ctx = backend.deserialize(tx_hex)
  File "/counterparty-lib/counterpartylib/lib/backend/__init__.py", line 83, in deserialize
    return bitcoinlib.core.CTransaction.deserialize(binascii.unhexlify(tx_hex))
TypeError: argument should be bytes, buffer or ASCII string, not 'NoneType'

Exception by typo.

caused #54 .

counterparty-testnet_1  | Traceback (most recent call last):
counterparty-testnet_1  |   File "/counterparty-lib/counterpartylib/lib/blocks.py", line 102, in parse_tx
counterparty-testnet_1  |     mpma.parse(db, tx, message)
counterparty-testnet_1  |   File "/counterparty-lib/counterpartylib/lib/messages/versions/mpma.py", line 176, in parse
counterparty-testnet_1  |     problems = validate(db, tx['source'], plain_sends, tx['block_index'])
counterparty-testnet_1  |   File "/counterparty-lib/counterpartylib/lib/messages/versions/mpma.py", line 54, in validate
counterparty-testnet_1  |     asset = util.resolve_subasset_longname(db, t[0]) if util.enable('mpma_validationfix_2323232') else t[0]
counterparty-testnet_1  | AttributeError: module 'counterpartylib.lib.util' has no attribute 'enable'
counterparty-testnet_1  |
counterparty-testnet_1  | During handling of the above exception, another exception occurred:
counterparty-testnet_1  |
counterparty-testnet_1  | Traceback (most recent call last):
counterparty-testnet_1  |   File "/usr/local/bin/counterparty-server", line 33, in <module>
counterparty-testnet_1  |     sys.exit(load_entry_point('counterparty-cli', 'console_scripts', 'counterparty-server')())
counterparty-testnet_1  |   File "/counterparty-cli/counterpartycli/__init__.py", line 16, in server_main
counterparty-testnet_1  |     server.main()
counterparty-testnet_1  |   File "/counterparty-cli/counterpartycli/server.py", line 166, in main
counterparty-testnet_1  |     server.start_all(db)
counterparty-testnet_1  |   File "/counterparty-lib/counterpartylib/server.py", line 503, in start_all
counterparty-testnet_1  |     blocks.follow(db)
counterparty-testnet_1  |   File "/counterparty-lib/counterpartylib/lib/blocks.py", line 1401, in follow
counterparty-testnet_1  |     new_ledger_hash, new_txlist_hash, new_messages_hash, found_messages_hash = parse_block(db, block_index, block_time)
counterparty-testnet_1  |   File "/counterparty-lib/counterpartylib/lib/blocks.py", line 207, in parse_block
counterparty-testnet_1  |     raise e
counterparty-testnet_1  |   File "/counterparty-lib/counterpartylib/lib/blocks.py", line 201, in parse_block
counterparty-testnet_1  |     parse_tx(db, tx)
counterparty-testnet_1  |   File "/counterparty-lib/counterpartylib/lib/blocks.py", line 147, in parse_tx
counterparty-testnet_1  |     raise exceptions.ParseTransactionError("%s" % e)
counterparty-testnet_1  | counterpartylib.lib.exceptions.ParseTransactionError: module 'counterpartylib.lib.util' has no attribute 'enable'

Pay Transaction Fees with Different Inputs

I'm using an account system on coind, and since coind's account system doesn't keep balance in each address, but put multiple account's balance on one address, when I try to send token from the account's address (this address doesn't have any BTC in it since it automatically moved to other address by coind's account system), the api server returned me following:
"Error composing send transaction via API: Insufficient MONA at address XXXXXXXXXXXXXXX. (Need approximately 0.001546 MONA.) To spend unconfirmed coins, use the flag --unconfirmed. (Unconfirmedcoins cannot be spent from multi\u2010sig addresses.)"

To breathly explain, I want to something like explained below.
"A" sends token to "C", and "A" will not pay for traTo breathly explain, I want to something like explained below.
"A" sends token to "C", and "A" will not pay for transaction fee but the other address "B" will pay the transaction fee.
I own both "A" address and "B" address.nsaction fee but the other address "B" will pay the transaction fee.

I own both "A" address and "B" address.

I know this is such a ridiculous to ask this in Issue, but I thought it would be nice to share the solutions.

日本語訳:
Coindに付属しているアカウントシステムを利用しているのですが、どうやらcoindのアカウントシステムは残高をいくつかの貯蔵用アドレスに保管してしまうらしく、貯蔵アドレスではないアドレス(残高は0mona)からトークンをtipしようとするとAPIが"Error composing send transaction via API: Insufficient MONA at address XXXXXXXXXXXXXXX. (Need approximately 0.001546 MONA.) To spend unconfirmed coins, use the flag --unconfirmed. (Unconfirmedcoins cannot be spent from multi\u2010sig addresses.)"と返してきます。これに対応するために以下のようなことをしたいのですが現状可能なのでしょうか?
「AがトークンだけをBに送りトランザクション手数料はCが負担。」
かなりのお手数をおかけすることになりそうですができましたらよろしくお願いします。。

ブロックとして取り込まれた MPMA を含むトランザクションが parse されない。

See: https://twitter.com/jung2neko/status/1338798557243924480

Mpurseエクステで一括Sendをやったけど失敗してしまうのなんでだろー |ω・)チラ ウォレットからは送信されてる、monacoinブロックには取り込まれてる、モナパノードには認識されていないっぽい |ω・)チラ
ブロック#2191496,#2191505 |ω・`)チラ
#モナパレット #Mpurse #monaparty

Transactions:

https://blockbook.electrum-mona.org/tx/9b3890c198f66b6195853f1b6b53bbb54a9b884e024dd46f146c78015c7a3b92

https://blockbook.electrum-mona.org/tx/c85100d306123cf57b451a19ad8889b85505675eef12fbf0c284c9b973c4e746

Sweep contract is broken?

https://twitter.com/anipopina/status/1439485770658582535

https://mpchain.info/asset/XABOVECLOWDS
こちらのアセットのowner権のtransferができない件について相談を受けたのですが、調査したところ当該アセットのissuances> の履歴と現在のownerの値に不整合があるせいでこちらのチェックに引っかかるようです
https://github.com/monaparty/counterparty-lib/blob/monaparty-develop/counterpartylib/lib/messages/issuance.py#L205-L206

https://twitter.com/anipopina/status/1439488022068621316

相談者 @ flon732さんに伺ったところアドレス~aBcmからsweepしたのにownerが移らなかったときがあったそうなので、おそらくXABOVECLOWDSの最後のissuanceとして記録されているこのあたりのtxの処理で問題が起きたのではと思っています
https://mpchain.info/tx/72b858987e15f14f35d290e2e860ff64faf5fc8c780e475d1efb19eea4f1aa60

https://twitter.com/anipopina/status/1439489714931699715

エラーは以下のパラメータを含むcreate_issuance時に(transferに限らず)再現することを確認しています

source: MGdFSDkJr7xq5e7GtDJaxkQmPraModaBcm
asset: XABOVECLOWDS

Can't create MPMA message.

This issue was reported by @anipopina.

In some cases, Counterparty-server fails to create MPMA transaction with an error message following.

Cannot communicate with mainnet indexd server at `http://indexd:8432/a/MLJ11FmnsikavGbcHm9HpfgcPhA81NdBzM/txs?verbose=1`."

Error occurs when a description is long.

The following error occurs when a description is longer than 45 characters, which is a borderline whether P2SH mode become activated or not.

2018-04-16 23 59 06

Error message:
Bad status code returned: '500'. result body: '{"result":null,"error":{"code":-26,"message":"64: dust"},"id":0} '

Signed TX:
010000000150ba909c57e067ff49a072ea9e9a020e8069dd9be0b82622a79859d5e55cc966000000006b483045022100d08c09e43a2a97e215679381ca23395dc71fd20dec900802d22cacd57e89a32e02202cbb70a71dad899489e81cd620f4294445aa902452b4e5df3717ff5e1fae7cc30121022f14dbabd6bed8b2a3624855a84fc3dbf89bee5272356506af804a9a073ee3bdffffffff03b0300100000000006951210378ff18ca3ae5a1b01cbcbb362b394b3c2eb682ddc4d26bdd9c645f776b53c9b021037012d7e8791d5bddbc74d10e31eec3306127141ee6de3fbbee5aa36b63f5c3ae21022f14dbabd6bed8b2a3624855a84fc3dbf89bee5272356506af804a9a073ee3bd53aeb0300100000000006951210359ff18ca3ae5a1b01c9b99a1907b2115476fca88fdb55e93d40d1b223353c93021027012d7e8794c3688e841b87f47989149554d47528dbc72f6a80ff50f019e99d121022f14dbabd6bed8b2a3624855a84fc3dbf89bee5272356506af804a9a073ee3bd53ae472f2e01000000001976a914a3b38980a880d2061db68486b210615588ccc95d88ac00000000

Can't validate MPMA that contains subassets.

reproduction:

curl http://rpc:rpc@localhost:4000 -XPOST --data-binary '{
           "method": "create_send",
           "params": {
                      "source": "MUqM2tDnZXtJ4h87W2g8fFz9nW3GsYhMfu",
                      "destination": ["MDqpveqsRuixTX5XH17DFZNo8MiJB9FPdP","MDqpveqsRuixTX5XH17DFZNo8MiJB9FPdP"],
                      "asset": ["XMP","NOMACOIN.CARD"],
                      "quantity": [1000000,1]
                     },
           "jsonrpc": "2.0",
           "id": 0
          }'

result:

{"error": {"code": -32001, "message": "Error composing send transaction via API: ['issuance not found (system error?)']"}, "jsonrpc": "2.0", "id": 0}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.