Author

Topic: [ANN][CLAM] CLAMs, Proof-Of-Chain, Proof-Of-Working-Stake, a.k.a. "Clamcoin" - page 337. (Read 1151252 times)

legendary
Activity: 2940
Merit: 1333
hero member
Activity: 784
Merit: 1002
CLAM Developer
CLAM v. 1.4.12 Test Build Released!
Release Notes


Linux 32bit
68500109793daa68f2fe87c54281bccc73405d9dff39099ad7e65a38e2c51533

Linux 64bit
6cee1813a8b13f1e8736a3447d74549b779ae4fc5a6e543fef6abe10896a306b

Windows 32bit
6f1e0363cca3a80ceefb23b6db67f1bb99081191aa9d7e8ebf1f0f4ffa0cc44b

Windows 64bit
20f89ba18481075e50eeaf0528aefd85fe73ce0b6de7eb5c27cb7a4e7b7eac08

OSX
811f94d63501f23eed79719057976fb51cf75052950dca8102127d7030d12361
legendary
Activity: 2940
Merit: 1333
I do still need to run signrawtransaction twice, since it will still only take private keys from EITHER the wallet OR the RPC parameters, not both at the same time.

Thanks for this reply. It helps me a lot. Plus it's good in general to see that these reports can lead to such fast action.

I improved on my fix after posting that, and edited the post you quoted. You can now do what you were trying to do with a single 'signrawtransaction'. The change will be in v1.4.12 of the client, which should be built shortly. The sources are already available for you to build yourself if you're that way inclined.

By the way, I'm doing these multisigs to test out an idea I posted about a few weeks ago:

https://bitcointalksearch.org/topic/how-to-approximate-a-decentralized-exchange-1078338

It seems like a good application of clamspeech. When I'm satisfied with the results, I'll post details about the outcome and link to it from here.

I look forward to reading about it.
sr. member
Activity: 448
Merit: 252
Follow us on our new account ShapeShift.com
Clam friends! ShapeShift has re-added Clams to our instant altcoin exchange! So for the downtime. Instantly exchange Clams with 35+ altcoins today with ShapeShift.io

full member
Activity: 132
Merit: 100
willmathforcrypto.com
I'm experimenting with multisig in clams. The first part worked (creating a p2sh and sending clams to it), but the second part (spending the funds) didn't do what I expected. I found a workaround, but it's possible there's a bug in signrawtransaction. Or I made a mistake, of course. Here's more detail:

...

I can reproduce the exact same behaviour. I'll investigate, and fix it if possible. It seems to not be using the private key provided in the signtransaction RPC call.

Thanks for the report.

...

I do still need to run signrawtransaction twice, since it will still only take private keys from EITHER the wallet OR the RPC parameters, not both at the same time.

Thanks for this reply. It helps me a lot. Plus it's good in general to see that these reports can lead to such fast action.

By the way, I'm doing these multisigs to test out an idea I posted about a few weeks ago:

https://bitcointalksearch.org/topic/how-to-approximate-a-decentralized-exchange-1078338

It seems like a good application of clamspeech. When I'm satisfied with the results, I'll post details about the outcome and link to it from here.
hero member
Activity: 784
Merit: 1002
CLAM Developer
Yes guys, for the website just take any simple Wordpress theme or whatever CMS. I think many people don't understand how the heck you navigate on the official website  Grin .
Anyway, CLAM and JD are amazing together ! Around 400$ profit so far Smiley.

I have been putting work in on it; though I became side-tracked today working on a stand-alone community application for social campaigns and such Tongue
full member
Activity: 193
Merit: 100
Yes guys, for the website just take any simple Wordpress theme or whatever CMS. I think many people don't understand how the heck you navigate on the official website  Grin .
Anyway, CLAM and JD are amazing together ! Around 400$ profit so far Smiley.
hero member
Activity: 784
Merit: 1002
CLAM Developer
Ok, what's going on, there are 100 bitcoins trying to buy and 31 at 0.0062.  Actually it looks like they have split up the order into smaller chunks, but still lots of buying pressure.
There are often ~100 BTC on the buy side. What seems to have changed is that there are no more cheap coins available at the moment. I guess the people who have been selling have run out or decided to wait for higher prices.
It's a bit fun to speculate I'm going with the presumption that there is no whales that hold a lot of clams at the moment to dump in the market, and the buy pressure is strong the bankroll profit is at 100K + for now so it's just a matter of a big winner winning some clams back from the house edge.
Nice to see it at 0.669999 now ^^

We are still a relatively small market, so there will be shenanigans.

That said, it doesn't hurt that there are still less than 750k CLAM in active circulation Tongue
legendary
Activity: 1806
Merit: 1090
Learning the troll avoidance button :)
Ok, what's going on, there are 100 bitcoins trying to buy and 31 at 0.0062.  Actually it looks like they have split up the order into smaller chunks, but still lots of buying pressure.

There are often ~100 BTC on the buy side. What seems to have changed is that there are no more cheap coins available at the moment. I guess the people who have been selling have run out or decided to wait for higher prices.

It's a bit fun to speculate I'm going with the presumption that there is no whales that hold a lot of clams at the moment to dump in the market, and the buy pressure is strong the bankroll profit is at 100K + for now so it's just a matter of a big winner winning some clams back from the house edge.
Nice to see it at 0.669999 now ^^
legendary
Activity: 2940
Merit: 1333
Ok, what's going on, there are 100 bitcoins trying to buy and 31 at 0.0062.  Actually it looks like they have split up the order into smaller chunks, but still lots of buying pressure.

There are often ~100 BTC on the buy side. What seems to have changed is that there are no more cheap coins available at the moment. I guess the people who have been selling have run out or decided to wait for higher prices.
full member
Activity: 120
Merit: 100
What's going on? 31 Bitcoins trying to buy at Poloniex..

No there are 110 bitcoins trying to buy.  There are 31 trying to buy at .0062   

Ok, what's going on, there are 100 bitcoins trying to buy and 31 at 0.0062.  Actually it looks like they have split up the order into smaller chunks, but still lots of buying pressure.
legendary
Activity: 2940
Merit: 1333
where can i create a CLAM coin wallet ?

The CLAM client will create one for you automatically the first time you run it.

It goes in the same folder as clam.conf, which SuperClam just located for us:

clam.conf should be located in the data directory - you may need to manually create it.
On windows, this defaults to %appdata%/clam/
On linux, this defaults to ~/.clam/

If you don't really want to create your own CLAM wallet, but want to use a hosted solution then there are several sites that will hold a CLAM balance for you. I don't know of any dedicated CLAM web wallets, but both poloniex.com and just-dice.com will let you deposit and withdraw CLAMs.
newbie
Activity: 5
Merit: 0
where can i create a CLAM coin wallet ?
legendary
Activity: 2940
Merit: 1333
@dooglus, you alias your clamd to "cc"?  Doesn't that screw your brain because, erm, c compiler?

I've used 'gcc' for as long as I can remember. Years ago I aliased 'bc' to 'bitcoind', then 'dc' to 'dogecoind', so clamd had to be cc really.

(And I know bc and dc are calculators, but I use Python as my command-line calculator, so that's not a problem either).
legendary
Activity: 1456
Merit: 1081
I may write code in exchange for bitcoins.
@dooglus, you alias your clamd to "cc"?  Doesn't that screw your brain because, erm, c compiler?
hero member
Activity: 784
Merit: 1002
CLAM Developer
i cant find calm.conf where i needed to be?

clam.conf should be located in the data directory - you may need to manually create it.
On windows, this defaults to %appdata%/clam/
On linux, this defaults to ~/.clam/

Alternatively, this can be set via command-line flag.
member
Activity: 113
Merit: 10
i cant find calm.conf where i needed to be?
legendary
Activity: 2940
Merit: 1333
I'm experimenting with multisig in clams. The first part worked (creating a p2sh and sending clams to it), but the second part (spending the funds) didn't do what I expected. I found a workaround, but it's possible there's a bug in signrawtransaction. Or I made a mistake, of course. Here's more detail:

1. I used "addmultisigaddress" and created a 2-of-2 address: 6WnV4Jhe7iNQLDekwr31h9zeoK1eaDMjAw

2. I sent 0.1 clams there (small enough that it's OK if I lose it). It's txout 0 of the transaction 21db92347e153a6afdddca7f96d444d81d7daa19674ed3101e50de72cb387b19. khashier shows this transaction, but is confused by the multisig address.

3. I used "createrawtransaction" to create an unsigned tx spending this back one of my ordinary addresses.

I had one private key in my wallet and the other on paper. Using "signrawtransaction" it would sign with the one in the wallet, as expected. But then if I tried to sign with "signrawtransaction" giving the other private key explicitly in the command line, it failed. (By "failed" I mean the partially signed transaction wasn't changed.)

I can reproduce the exact same behaviour. I'll investigate, and fix it if possible. It seems to not be using the private key provided in the signtransaction RPC call.

Thanks for the report.

The problem seems to be related to the fact that signrawtransaction decides whether to use information from the wallet, or from the RPC command arguments. It won't use both.

Here's an example where I make a transaction with two simple inputs. One's private key is in the wallet, and the other's is provided in the RPC command. signrawtransaction is unable to sign it fully:

Quote
$ cc signrawtransaction $(cc createrawtransaction '[{"txid":"dddf6ac41c281317aed6445196fc14db712f0cc5812880e45eb8e534ebffd8de","vout":0},{"txid":"5bbe0ca12578cb520266178b2d6413eb2597bc251e7343b03a9d42b8733ea961","vout":0}]' '{"xJDCLAMZtRD72TC31E8SJ4a6ycFtnQyuDH":0.1}') '[]' '["'$privkey'"]' | grep complete
    "complete" : false

But if I call signrawtransaction twice, once providing the private key on the command line and once not, it is successful:

Quote
$ cc signrawtransaction $(cc signrawtransaction $(cc createrawtransaction '[{"txid":"dddf6ac41c281317aed6445196fc14db712f0cc5812880e45eb8e534ebffd8de","vout":0},{"txid":"5bbe0ca12578cb520266178b2d6413eb2597bc251e7343b03a9d42b8733ea961","vout":0}]' '{"xJDCLAMZtRD72TC31E8SJ4a6ycFtnQyuDH":0.1}') | grep hex | cut -d'"' -f4) '[]' '["'$privkey'"]' | grep complete
    "complete" : true

Edit2: here I'm able to sign a transaction spending a multisig input (2 of 2) where one key is in the wallet and the other is in $privkey. I had to provide the scriptPubKey which isn't easy to get hold of:

Quote
$ cc signrawtransaction $(cc signrawtransaction $(cc createrawtransaction '[{"txid":"2db3324af1b8e5db5ec92b85ec68226e7b17664bdff34c8e73d303c6f7011907","vout":1}]' '{"xJDCLAMZtRD72TC31E8SJ4a6ycFtnQyuDH":0.1}') | grep hex | cut -d'"' -f4) '[{"txid":"2db3324af1b8e5db5ec92b85ec68226e7b17664bdff34c8e73d303c6f7011907","vout":1,"scriptPubKey":"a914810721c3f1790b5668dcd776d2df728cb9103b8f87","redeemScript":"522103145dbd6986ff283b26d88efc2d366ee3437e64fab8c084bc766bec0b5fc41a692103fb6c6 11bf45051b192077632d79b2201577231480165c8ecb45b34c4058e530b52ae"}]' '["'$privkey'"]' | grep complete
    "complete" : true

To get the scriptPubKey, I started with the multisig address, 6SA5Wh49HnS12U3zZLvYGdFb9kDXUGx7ye, and did this:

Quote
$ python
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path.append("/home/chris/Programs/python-bitcoinlib/") # from https://github.com/jgarzik/python-bitcoinlib.git
>>> import bitcoin.base58
>>> import binascii
>>> 'a9' + '14' + binascii.hexlify(bitcoin.base58.decode("6SA5Wh49HnS12U3zZLvYGdFb9kDXUGx7ye")[1:-4]) + '87'
'a914810721c3f1790b5668dcd776d2df728cb9103b8f87'
>>>

0xa9 is OP_HASH160
0x14 is 20, the length of the script hash in bytes
0x87 is OP_EQUAL

The redeemScript is from here:

Quote
$ cc validateaddress 6SA5Wh49HnS12U3zZLvYGdFb9kDXUGx7ye | grep hex
    "hex" : "522103145dbd6986ff283b26d88efc2d366ee3437e64fab8c084bc766bec0b5fc41a692103fb6c6 11bf45051b192077632d79b2201577231480165c8ecb45b34c4058e530b52ae",

I made a pull request to fix this issue: https://github.com/nochowderforyou/clams/pull/194

Now I can sign a 2-of-2 transaction without having to look up the scriptPubKey or the redeemScript for the multisig address:

Quote
$ cc signrawtransaction $(cc signrawtransaction $(cc createrawtransaction '[{"txid":"2db3324af1b8e5db5ec92b85ec68226e7b17664bdff34c8e73d303c6f7011907","vout":1}]' '{"xJDCLAMZtRD72TC31E8SJ4a6ycFtnQyuDH":0.1}') | grep hex | cut -d'"' -f4) '[]' '["'$privkey'"]' | grep complete
    "complete" : true

I do still need to run signrawtransaction twice, since it will still only take private keys from EITHER the wallet OR the RPC parameters, not both at the same time.

Edit3: I thought I made this edit yesterday, but I don't see it now, so I'll make it again...

I made a better pull request which lets signrawtransaction use all available private keys and multisig scripts:
  https://github.com/nochowderforyou/clams/pull/195

I also tagged a new release:
  https://github.com/nochowderforyou/clams/releases/tag/v1.4.12

And so now you can sign your 2-of-2 multisig transaction all at once, using 1 key from the wallet and one in WIF:

Quote
$ cc signrawtransaction $(cc createrawtransaction '[{"txid":"2db3324af1b8e5db5ec92b85ec68226e7b17664bdff34c8e73d303c6f7011907","vout":1}]' '{"xJDCLAMZtRD72TC31E8SJ4a6ycFtnQyuDH":0.1}') '[]' '["'$privkey'"]' | grep complete
    "complete" : true
legendary
Activity: 1007
Merit: 1000
What's going on? 31 Bitcoins trying to buy at Poloniex..

No there are 110 bitcoins trying to buy.  There are 31 trying to buy at .0062   
full member
Activity: 120
Merit: 100
What's going on? 31 Bitcoins trying to buy at Poloniex..
Jump to: