Author

Topic: [ANN][XCP] Counterparty - Pioneering Peer-to-Peer Finance - Official Thread - page 616. (Read 1276981 times)

legendary
Activity: 882
Merit: 1000
I tried to adapt couterpartyd to use blockchain.info json-rpc API. Sadly, blockchain.info json-rpc API does not provide 'getrawtransaction'. It seems I have to install bitcoind in my poor VPS having only 20GB. Sad
legendary
Activity: 876
Merit: 1000
Etherscan.io
I burn 1BTC which is included in block 280513, next block the whole thing is down. I can't show up anywhere.  Tongue

But probably everyone has it, yes.
There are no transactions after block 280514: http://www.blockscan.com/

I have updated blockscan.com with the latest GIT pull and we are up todate for the explorer
sr. member
Activity: 364
Merit: 264
Sorry guys, looks I broke something again ....  Cry

Apparently 100,000,000,000 is too big of a number for coins.

"I was just trying to recreate DOGE .... *slinks away*"

(Wow, how many bugfixes did I cause in github today? lol)
Still .. better that these things happen now than in the future, where things will seriously break.

Note: I would suggest a max cap, because no matter what datatype you use, someone could simply issue 999999999999999999999999999.... coins as an attack.

I haven't tested non-alphanumeric characters in the asset name yet -- is there support for that or will I crash something again?

Absolutely. Keep 'em comin'.

I fixed the code so that it will run, but this same problem may exist elsewhere, so hold off on re-creating the problem for another twenty-four hours, maybe.

Asset names should only be upper-case alphabetic, but the code should catch all violations of that rule.

Thanks for taking care of this right now. I won't cause any more mischief tonight ... :p


sr. member
Activity: 476
Merit: 300
Counterparty Chief Scientist and Co-Founder
Sorry guys, looks I broke something again ....  Cry

Apparently 100,000,000,000 is too big of a number for coins.

"I was just trying to recreate DOGE .... *slinks away*"

(Wow, how many bugfixes did I cause in github today? lol)
Still .. better that these things happen now than in the future, where things will seriously break.

Note: I would suggest a max cap, because no matter what datatype you use, someone could simply issue 999999999999999999999999999.... coins as an attack.

I haven't tested non-alphanumeric characters in the asset name yet -- is there support for that or will I crash something again?

Absolutely. Keep 'em comin'.

I fixed the code so that it will run, but this same problem may exist elsewhere, so hold off on re-creating the problem for another twenty-four hours, maybe.

Asset names should only be upper-case alphabetic, but the code should catch all violations of that rule.
sr. member
Activity: 364
Merit: 264
Still .. better that these things happen now than in the future, where things will seriously break.

Note: I would suggest a max cap, because no matter what datatype you use, someone could simply issue 999999999999999999999999999.... coins as an attack.

I haven't tested non-alphanumeric characters in the asset name yet -- is there support for that or will I crash something again?

Also check for overflow possibilities in trading, dividend payments, bets, all that.
sr. member
Activity: 364
Merit: 264
Sorry guys, looks I broke something again ....  Cry

Apparently 100,000,000,000 is too big of a number for coins.

"I was just trying to recreate DOGE .... *slinks away*"

(Wow, how many bugfixes did I cause in github today? lol)
sr. member
Activity: 476
Merit: 300
Counterparty Chief Scientist and Co-Founder
May I ask a question about parsing the XCP balance

In the specification " If the sender does not hold a sufficient amount of that asset at the time that the send message is parsed (in the sequence of transactions), then the send is invalid."

May I know if there're more than one transaction in a block, what's the sequence? Is it the order inside that block (the coinbase as the first transaction).

Moreover, the same applies to the ORDERs and BIDs. An order costs XCP will be invalid if there's no efficient balance. If there're SEND, ORDER, BID, SEND in the same block. We parse them in that order and reduce balance accordingly.  They all have the same priority, right? Thanks.

That's all correct, yes.
legendary
Activity: 882
Merit: 1000
May I ask a question about parsing the XCP balance

In the specification " If the sender does not hold a sufficient amount of that asset at the time that the send message is parsed (in the sequence of transactions), then the send is invalid."

May I know if there're more than one transaction in a block, what's the sequence? Is it the order inside that block (the coinbase as the first transaction).

Moreover, the same applies to the ORDERs and BIDs. An order costs XCP will be invalid if there's no efficient balance. If there're SEND, ORDER, BID, SEND in the same block. We parse them in that order and reduce balance accordingly.  They all have the same priority, right? Thanks.
sr. member
Activity: 476
Merit: 300
Counterparty Chief Scientist and Co-Founder
  Example: pubkeyN has 1000 XCP & 1000 BTC, send-cmd cost 0.0002172 BTC
                  if I enter the command to move my XCP, all these BTC are frozen...
                  why does the other 999.999 BTC need to be unavailable for 1 blocktime?
                  awesome if you can improve that by stopping to move what doesn't need to move
                  just take the 0.0002172 or what it will cost in v0.9 with OP_RETURN (back to 0.0001 BTC I hope)
                  If I moved 500 XCP, I need to wait 1 blocktime to be able to move other XCP => annoying

Unfortunately I don't think bitcoin works that way. When you are trying to send an amount (0.0002172) that does not exactly match an unspent output, a transaction has to be made that takes the remaining amount and sends it back as change. The "problem" is that the amount sent back as change is unconfirmed, and counterpartyd does not allow spending of unconfirmed outputs (while I think the main client/blockchain.info does).

With Bitcoind, I think, one may send unconfirmed change that originated from one of the addresses in your wallet. I don't think that it would be impossible to enable this in counterpartyd, too.
sr. member
Activity: 476
Merit: 300
Counterparty Chief Scientist and Co-Founder
- if asset == 'BTC': raise exceptions.BalanceError('Cannot send bitcoins.')
  it's such a pity, can't you modify it to be able to send (only) BTC from a selected pubkey?
  bitcoind miss this basic feature, which is annoying
  Beside, *it is possible* to send BTC trough counterprotocold, as send-cmd sent 0.0001086 BTC

I'm strongly considering adding this feature.


- your man help page are wrong, and unclear for new user (most important: miss = sign, which is obligatory to work)

The equals sign is not obligatory.
sr. member
Activity: 390
Merit: 254
Counterparty Developer
*laugh

About API:
When it's ready, does that mean XCP can be exchanged on centralized exchange too?
(Isn't there a problem for that as XCP exchange require BTC fee?)

Yes...however the API interface will be different than the standard bitcoind interface, and so it will take a centralized exchange some extra work to integrate.

BTC network fees should only be an issue on XCP deposit and withdrawal from the centralized exchange, as buys and sells can be tracked using the exchange's internal trade engine, without actually requiring any actual XCP sends until the user takes the money back out to their XCP wallet.
sr. member
Activity: 476
Merit: 300
Counterparty Chief Scientist and Co-Founder
Sorry for the delay, guys. I was AFK.

I fixed the assertion error bug, and a working version is now on GitHub.
sr. member
Activity: 266
Merit: 250
Help and Love one another ♥
*laugh

About API:
When it's ready, does that mean XCP can be exchanged on centralized exchange too?
(Isn't there a problem for that as XCP exchange require BTC fee?)
sr. member
Activity: 390
Merit: 254
Counterparty Developer
It appears there's a record for a 21000000 BTC credit from 1CUdFmgK9trTNZHALfqGvd8d6nUZqH2AAf in the list that shouldn't be there, which triggered some of the built-in sanity checking (a good thing). This could easily be ignored/skipped (as it's not valid to credit BTC via Counterparty), but I feel most comfortable leaving this bug to PhantomPhreak, given that he's been point on fixing these type of issues lately in counterpartyd (my focus has been more docs, build system/multiplatform, API, and GUIs).

He should be online rather soon to address this. Thanks for your patience guys while we work through these early issues with the distributed exchange, and the other functionality (broadcasts, bets, etc).
hero member
Activity: 683
Merit: 500
I burn 1BTC which is included in block 280513, next block the whole thing is down. I can't show up anywhere.  Tongue

But probably everyone has it, yes.
There are no transactions after block 280514: http://www.blockscan.com/
sr. member
Activity: 266
Merit: 250
Help and Love one another ♥
hero member
Activity: 683
Merit: 500
Same problem here:

Quote
~$ counterpartyd
Status: RESTART
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.3/threading.py", line 637, in _bootstrap_inner
    self.run()
  File "/home/xxxx/counterpartyd_build/dist/counterpartyd/lib/api.py", line 251, in run
    run_simple('localhost', config.RPC_PORT, application)
  File "/home/xxxx/counterpartyd_build/env/lib/python3.3/site-packages/werkzeug/serving.py", line 710, in run_simple
    inner()
  File "/home/xxxx/counterpartyd_build/env/lib/python3.3/site-packages/werkzeug/serving.py", line 692, in inner
    passthrough_errors, ssl_context).serve_forever()
  File "/home/xxxx/counterpartyd_build/env/lib/python3.3/site-packages/werkzeug/serving.py", line 486, in make_server
    passthrough_errors, ssl_context)
  File "/home/xxxx/counterpartyd_build/env/lib/python3.3/site-packages/werkzeug/serving.py", line 410, in __init__
    HTTPServer.__init__(self, (host, int(port)), handler)
ValueError: invalid literal for int() with base 10: ''

Block: 280518
Traceback (most recent call last):
  File "/home/xxxx/counterpartyd_build/dist/counterpartyd/counterpartyd.py", line 618, in
    blocks.follow(db)
  File "/home/xxxx/counterpartyd_build/dist/counterpartyd/lib/blocks.py", line 479, in follow
    raise e
  File "/home/xxxx/counterpartyd_build/dist/counterpartyd/lib/blocks.py", line 472, in follow
    parse_block(db, block_index)
  File "/home/xxxx/counterpartyd_build/dist/counterpartyd/lib/blocks.py", line 57, in parse_block
    issuance.parse(db, tx, message)
  File "/home/xxxx/counterpartyd_build/dist/counterpartyd/lib/issuance.py", line 103, in parse
    util.credit(db, tx['source'], asset, amount)
  File "/home/xxxx/counterpartyd_build/dist/counterpartyd/lib/util.py", line 160, in credit
    assert asset != 'BTC' # Never BTC.
AssertionError
full member
Activity: 190
Merit: 100
I have the same error on linux, can't past block 280518


Devs,

I get this when trying to recreate the database:

C:\counterpartyd>python counterpartyd.py server
Status: RESTART
Block: 280518
Traceback (most recent call last):
  File "counterpartyd.py", line 618, in
    blocks.follow(db)
  File "C:\counterpartyd\lib\blocks.py", line 479, in follow
    raise e
  File "C:\counterpartyd\lib\blocks.py", line 472, in follow
    parse_block(db, block_index)
  File "C:\counterpartyd\lib\blocks.py", line 57, in parse_block
    issuance.parse(db, tx, message)
  File "C:\counterpartyd\lib\issuance.py", line 103, in parse
    util.credit(db, tx['source'], asset, amount)
  File "C:\counterpartyd\lib\util.py", line 160, in credit
    assert asset != 'BTC' # Never BTC.
AssertionError
sr. member
Activity: 364
Merit: 264
Devs,

I get this when trying to recreate the database:

C:\counterpartyd>python counterpartyd.py server
Status: RESTART
Block: 280518
Traceback (most recent call last):
  File "counterpartyd.py", line 618, in
    blocks.follow(db)
  File "C:\counterpartyd\lib\blocks.py", line 479, in follow
    raise e
  File "C:\counterpartyd\lib\blocks.py", line 472, in follow
    parse_block(db, block_index)
  File "C:\counterpartyd\lib\blocks.py", line 57, in parse_block
    issuance.parse(db, tx, message)
  File "C:\counterpartyd\lib\issuance.py", line 103, in parse
    util.credit(db, tx['source'], asset, amount)
  File "C:\counterpartyd\lib\util.py", line 160, in credit
    assert asset != 'BTC' # Never BTC.
AssertionError
sr. member
Activity: 266
Merit: 250
Help and Love one another ♥
Yup
As you wrote: arguably for good reason, reason that did lead to many losses
Wherea user-control over this, with a warning about the reason for 1-use-only, 'would have lead to the same good effect without that much losses.

I guess we learn everyday.
Jump to: