Show Posts
|
Pages: [1]
|
Hi all, I'm looking fore a bit of assistance with a multisig transaction I've currently got ongoing on the testnet. I've dumped 3 public keys, and used them to create a 2-of-3 multisig address. I've then made several (3) transactions into the address. Up until now I've only made a single transaction into the multisig address, and then a single payment out, and I've understood that, but now I'm stuck now that I've got several inputs for the same address... Each payment was a different amount, and now, only the first payment is showing up. Armory (my "normal" client, which I used to fund the multisig address) is showing all of the transactions as completed with at least 6 confirmations, but bitcoin core, which I generated the address with, is only showing the amount of the first payment. Does this mean multisig addresses can only be used received funds, one time only? Or is there another way to get the remaining funds? This is precisely why I did this on the testnet first. because I'm not familiar with how Bitcoin Core handles multisig addresses. Gut instinct tells me it's possible to receive into a multisig more than once, as Armory can do this, and it's runs everything through core. If it helps anyone, the addresses used to create the multisig are mmjJJmEifXvGpAzBa5iZJjPo3SQPwrgrfE mi1YwJDLXNXjGiXEcirkva5YdWM8EMje7K mo4TCm7WVBu1QXd8jXtnKnGh5tBQpmMMrh and their matching public keys 034cd3ccfe1c23426c10e0b9acad129d302535d8fef8705fb19b0ec6b59651df16 03ba139df5c89b104062cab1356a355fff5627c8547d20ff6d3a9d45c693788054 042d1960c496d8f0b8a2c7016da6049bb9462a3ad9ad38662c17b0eee8634b81b0f1d63fbe05727e4d0894dfcb1a94d3dca6dfabea578c2d1e8075bd8be0c4c955
put it all together, and you get { "address" : "2N6w5TBuvHUPiWjibK8uept1HjSXrC9oHuk", "redeemScript" : "5221034cd3ccfe1c23426c10e0b9acad129d302535d8fef8705fb19b0ec6b59651df162103ba139df5c89b104062cab1356a355fff5627c8547d20ff6d3a9d45c69378805441042d1960c496d8f0b8a2c7016da6049bb9462a3ad9ad38662c17b0eee8634b81b0f1d63fbe05727e4d0894dfcb1a94d3dca6dfabea578c2d1e8075bd8be0c4c95553ae" } And it was funded by the following transactions fbec65ad3a38f6e0a5fc8fd82060271c89d9922de49a962ee33452ffaafc11ea 527622999bb1d2cbbf06a6d2150fabff97534315013931f4e92f8397526df4de 2b5e4f259f5314ae48a4acd78d333e6702a438be4e3e35ae8c88b63592322fef
|
|
|
Thanks, I'll check it out now. It was last thing at night so I went to bed before you published it. Been up for 20 hours, drunk loads of caffeine -- not sleepy but absolutely shattered, I'm sure you know how it goes...
After testing it, it does work, so uh, have a beer or something. (As in, that mysterious address in your sidebar)
When I first tried it, it kept returning an error of "no private key". I didn't know why dumppubkey would say this, so I thought I'd have to go looking a little deeper. Then I had an idea...
Maybe there's something wrong the address I'm using. So, getnewaddress and then immediately dumppubkey on that... It worked! I think you know what my problem was... getactivewallet
Bam, wrong wallet. The address I'd used in the GUI was in my normal wallet, so I just had to call setactivewallet to the right one. Try the old address again and yep, there's my public key.
|
|
|
It'd be very nice if you would since it sounds like you have an idea of where in the code to look for what I'm trying so hard to find.
My searching for "pubkey", "publickey", "pub-key" and "pub_key" didn't seem to turn up many results except for importprivkey, createrawtransaction and createlockbox.
Even I can figure out, I'm not searching for the right word. I get this feeling I'm looking for one line out of several thousand, which is why it's so irritating. Without knowing the magic keyword I'm left with searching line by line...
|
|
|
OK, so upon learning that strangely, this command really isn't included, I've broken out a hex editor. I made a backup of my backup wallet, and opened that. Searching through it for the ascii string of the address I want the key for - nothing. So then I decided to search for the hex string of a public key I already know (because the GUI interface gave it to me). Predictably, it's there, so I decided to search around for the wallet format. Here it is: https://bitcoinarmory.com/wallet-format/So now it looks like my best bet is going to be to seek past all those bytes at the front of the file. Then from there, start looking for address entries. ...So if I don't get a byte value of 0x00, then seek to the 2 bytes that tells me how many bytes N is, then seek past that as well. Each time I do get an address entry, seek past the first 156 bytes, then read 65 bytes, and also the 4 after it for the checksum. If the checksum passes OK, then hex decode the 130 bytes, that's my public key... Then, using the method shown here: https://en.bitcoin.it/wiki/Technical_background_of_version_1_Bitcoin_addresses if the address I create is the address I want the key for, then that's the key I want, if not keep searching through the file... Sheer laziness says if I've just created the address with getnewaddress, then it's likely to be the very last entry in the file, but tempted as I am, I'll avoid it because it's not guaranteed. It sounds like quite a headache if I'm honest. So before I set about attempting to build that solution, does anyone have a better idea they'd like to share? Since Python's already not a language I'm familiar with, if I do take it on, I'll probably do it in C++ and then upload it in case anyone wants to translate it back into python.
|
|
|
I feel like this must be incredibly simple, but for the life of me, I just can't seem to figure it out. If I want to export a public key in the GUI client, I just open the corresponding wallet, right click on the address I want the key of, and click "copy public key (hex)", bam, there's my public key in uncompresed "04" hex format - dunno if that's the official name for it, just what I call it. I can't seem to find the command to do this in the command line interface though. The only real hack I can think of, reading the source code, is to do: dumpprivkey <address> importprivkey <address> Because apparently importing the private key is supposed to show you the corresponding public key at the same time. BUT... This obviously doesn't work in the case of a watching only wallet... You just get { "Error": "An error occurred in dumpprivkey", "Error Type": "PrivateKeyNotFound", "Error Value": "" } I know it's got to be something simple, and it's really annoying me that I just can't see it.
|
|
|
Hi everyone, does anyone know if it's theoretically possible to run Armory and Bitcoin Core on different computers?
I've seen various people ask this question before based on not wanting to duplicate the blockchain. I'm fine with that, but in my case, I'm running bitcoind and armoryd in a datacenter. I like Armory's watch only feature, allowing me to have the private keys on an offline computer - if Bitcoin Core offers this, it's certainly nowhere near as easy as Armory makes it, and I run my regular wallet through Armory anyway so it kinda makes sense..
...The problem is, I might find after a day or two of running, I SSH in to the VPS to find that either armoryd or bitcoind has been killed because the system ran out of RAM. They don't like co-existing inside the same 4GB server - with no swap. Sucks, I know but I get the idea that's pretty standard for a VPS.
Anyway, I looked at upgrading the RAM. I can double the RAM, but the overall rental cost would work out as more than double. So it's actually cheaper to simply rent two 4GB servers side-by-side, and have a VPN link between them.
I could add a rule to my iptables so that armoryd's connection to 127.0.0.0/8:8333 be transparently redirected to the bitcoind's server, and armoryd wouldn't know any better - that's easy, I know I can do that, and it'd work. But this wouldn't help the problem of the --satoshi-datadir... You can't transparently redirect that through iptables.
Would NFS allow me to work around that? I know nothing about NFS besides its name. Does it sound workable? I'd hate to pay to rent another server only to find that it couldn't be done.
|
|
|
|