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

Support for LTC #32

Open
voidzero opened this issue Dec 9, 2012 · 20 comments
Open

Support for LTC #32

voidzero opened this issue Dec 9, 2012 · 20 comments

Comments

@voidzero
Copy link

voidzero commented Dec 9, 2012

Hi,

Well I suppose this question would come up sooner or later so I might as well "break the lance" in favour of it. So, here goes:

With LTC becoming more popular as a lightweight BTC variant, could you consider supporting LTC with Armory?

@etotheipi
Copy link
Owner

I've never paid any real attention to the alt chains. However, if you tell me what is different about LTC, I can tell you what you'd need to change to make a LTC-Armory clone.

For instance, if you were simply talking about a different network with the same mechanics, you only have to change the following lines in armoryengine.txt:

  BITCOIN_PORT = 8333
  MAGIC_BYTES = '\xf9\xbe\xb4\xd9'
  GENESIS_BLOCK_HASH_HEX  = '6fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d6190000000000'
  GENESIS_BLOCK_HASH      = 'o\xe2\x8c\n\xb6\xf1\xb3r\xc1\xa6\xa2F\xaec\xf7O\x93\x1e\x83e\xe1Z\x08\x9ch\xd6\x19\x00\x00\x00\x00\x00'
  GENESIS_TX_HASH_HEX     = '3ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a'
  GENESIS_TX_HASH         = ';\xa3\xed\xfdz{\x12\xb2z\xc7,>gv\x8fa\x7f\xc8\x1b\xc3\x88\x8aQ2:\x9f\xb8\xaaK\x1e^J'
  ADDRBYTE = '\x00'

You might also change a couple directories, so that your LTC wallets don't get mixed in with the regular wallets (perhaps ~/.armory/litecoin instead of just ~/.armory).

@voidzero
Copy link
Author

I'll start off by admitting that I'm not too familiar with bitcoin/litecoin's internals, but I'll do my best to give relevant information.

What I understand so far is that LTC blocks are hashed with scrypt, not with sha256. This makes it less beneficial to use GPUs to mine which lowers the bar for people to mine; using a CPU actually pays off. Scrypt also has a higher memory requirement.

So the value of 1 litecoin is less than 1 bitcoin. The maximum number of LTC is higher; approx 82 million. https://en.bitcoin.it/wiki/Litecoin

They develop on Github too: https://github.com/litecoin-project/litecoin

There is currently a discussion about fees, http://forum.litecoin.net/index.php/topic,838.0.html

So there are some differences; what are your thoughts?

@etotheipi
Copy link
Owner

I don't have too much time to get into it, but the hardest part about this would probably be getting scrypt implemented on the C++ side of the Armory code base. It doesn't look like there's native scrypt capability, but I think all the pieces are there (Armory uses Crypto++, which includes scrypt pieces like salsa).

After that, you would have to find all places in the code where header hashes are computed, and replace the getHash256() calls with getScryptOutput(). I don't know how many other things have to change, but I imagine this wouldn't be atrocious. I think you would start by modifying Armory as I described previously, to make sure you understand how to switch to a bitcoin-clone network (such as testnet), then make the modifications I just described. I think it would be only a couple day's work. But maybe there's more stuff different under-the-hood of LTC that I am not aware of.

I don't have time to dig into it, but if you put down a list of things that you know will be different, I can tell you how to do it (or at least point in you in the right direction). Maybe I've already covered it...

@Neozonz
Copy link

Neozonz commented May 30, 2013

I would really like to see this project start off the ground.

Offering a 50 LTC bounty to anyone that forks a semi successful scrypt version

Preferably ethotheipi if you were up to the task that would be appreciated :)

@wtogami
Copy link

wtogami commented May 30, 2013

Be aware that it is critical for any alt implementation of Litecoin to calculate the minimum fees in exactly the same manner as Litecoin. It differs from Bitcoin in such a way that it is insufficient to simply set a flat fee. This is a problem for other existing Litecoin wallet implementations like the Android SPV client, as bitcoinj currently lacks any capability of calculating fees.

@Mazo
Copy link

Mazo commented Jul 10, 2013

As a web developer integrating Armory into a new website I would also like to see LTC support added to give users more flexibility in which currency they can make transactions on the site with.

@wtogami
Copy link

wtogami commented Jul 10, 2013

I would like to see Litecoin protocol support in all clients, but our team's bandwidth is limited to the amount of donations we receive as most of the team has full-time jobs elsewhere. Currently our alt client priority is focused on bitcoinj because it enables Android Wallet, Multibit and vendor integration benefits. There are two key challenges to safely supporting the Litecoin protocol in any alt client.

First, is the necessity to calculate the exact minimum fees necessary for the transaction. Not many alt clients currently support this even for the Bitcoin protocol. I am unfamiliar with Armory, does it enforce coin age based priority calculation of minimum fees for outgoing transactions? Second, the alt client must be well maintained in the long-term so as not to become abandonware, dangerous to users. The current Litecoin Wallets on Android are dangerous and unmaintained for different reasons, and unfortunately our team needs to rewrite them from scratch. Part of long-term maintenance is working cooperatively with the upstream project to upstream changes that would benefit both the upstream project and the alt client.

https://forum.litecoin.net/index.php/topic,3874.0.html
The Litecoin Dev Team has now finished the major 0.8.x development pending code audit for release. Our next major push starts with bitcoinj and surrounding tools. We are hiring some external contractors to help speed along these ports, so it would be helpful if the LTC community could help us with small donations to help offset our expenses.

@voidzero
Copy link
Author

voidzero commented Dec 5, 2013

Wow. 50LTC from @Neozonz. That's quite some cash these days. Has any progress on this been made? Just checking in.

@etotheipi
Copy link
Owner

@wtogami, Yes Armory calculates the fees based on all the correct criteria (for Bitcoin). It uses age/priority, tx size, dust, and properly implements AllowFree. It always amazed me that the other clients don't do this because it's really quite simple. If we ever get around to doing a LTC version, we'll be sure to make sure we adapt it correctly.

@etotheipi
Copy link
Owner

@freewil
Copy link

freewil commented Dec 5, 2013

What are you trying to say @etotheipi - you need another 600k for litecoin? 😉

@disposable-ksa98
Copy link

Armory should also support Vaginacoin and Shitcoin! They are very innovative coins like Litecoin!

@TrollByFire
Copy link

More than willing to work on this if a bounty is still available.

@disposable-ksa98
Copy link

Armory should definitely support Dogecoin.

wow

@coldmug
Copy link

coldmug commented Dec 14, 2013

I second this. Much crypto.

@ghost
Copy link

ghost commented Dec 18, 2013

It'd be great to implement this, or, hell, have them running side-by-side in the same client, but, I feel as though Bitcoin is the priority here.

@alialsaif
Copy link

BITCOIN_PORT = 8333
MAGIC_BYTES = '\xf9\xbe\xb4\xd9'
GENESIS_BLOCK_HASH_HEX = '6fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d6190000000000'
GENESIS_BLOCK_HASH = 'o\xe2\x8c\n\xb6\xf1\xb3r\xc1\xa6\xa2F\xaec\xf7O\x93\x1e\x83e\xe1Z\x08\x9ch\xd6\x19\x00\x00\x00\x00\x00'
GENESIS_TX_HASH_HEX = '3ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a'
GENESIS_TX_HASH = ';\xa3\xed\xfdz{\x12\xb2z\xc7,>gv\x8fa\x7f\xc8\x1b\xc3\x88\x8aQ2:\x9f\xb8\xaaK\x1e^J'
ADDRBYTE = '\x00'

I just came by this and had a question..I'm trying to make armory work with another bitcoin fork.

How did you get the :
GENESIS_BLOCK_HASH_HEX = '6fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d6190000000000'

cause when i checked this link : http://blockexplorer.com/block/000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f

the hash reads :
000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f

I can see that it's very much the same hash number just reordered a different way. If I'm inputing the genesis hash of another coin, how do I go about reordering it ?or am i missing something ? same thing with the transaction hash.

and what's the difference between the GENESIS_BLOCK_HASH_HEX and the GENESIS_BLOCK_HASH ? can one be calculated from the other? same with the TX.

Thank you in advance

@coldmug
Copy link

coldmug commented May 2, 2014

For the BLOCK HEX, it looks like its a reverse string bytewise. In hex 2
characters equals one byte. So just take two characters off the end and put
them first, then another two and so on.

So... 6f, e2, 8c ....

The TX HEX looks like the Merkle root in the same process.
4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b
becomes: 3b a3 ed ...

--Zohair

On Fri, May 2, 2014 at 3:29 PM, Al Saif, Ali notifications@github.comwrote:

[code] BITCOIN_PORT = 8333
MAGIC_BYTES = '\xf9\xbe\xb4\xd9'
GENESIS_BLOCK_HASH_HEX =
'6fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d6190000000000'
GENESIS_BLOCK_HASH =
'o\xe2\x8c\n\xb6\xf1\xb3r\xc1\xa6\xa2F\xaec\xf7O\x93\x1e\x83e\xe1Z\x08\x9ch\xd6\x19\x00\x00\x00\x00\x00'
GENESIS_TX_HASH_HEX =
'3ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a'
GENESIS_TX_HASH =
';\xa3\xed\xfdz{\x12\xb2z\xc7,>gv\x8fa\x7f\xc8\x1b\xc3\x88\x8aQ2:\x9f\xb8\xaaK\x1e^J'
ADDRBYTE = '\x00' [/code]

I just came by this and had a question..I'm trying to make armory work
with another bitcoin fork.

How did you get the :
GENESIS_BLOCK_HASH_HEX =
'6fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d6190000000000'

cause when i checked this link :
http://blockexplorer.com/block/000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f

the hash reads :
000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f

I can see that it's very much the same hash number just reordered a
different way. If I'm inputing the genesis hash of another coin, how do I
go about reordering it ?or am i missing something ?

Thank you in advance


Reply to this email directly or view it on GitHubhttps://github.com//issues/32#issuecomment-41998730
.

@disposable-ksa98
Copy link

What's the timeline on Shibecoin? It's much better than dogecoin and I think it's gonna take over.

@yhaenggi
Copy link

yhaenggi commented May 9, 2014

@disposable-ksa98 im sure coins for "butthurt GPU miners" will never be implemented... makes me sad how much scumy shit is going on lately.

TierNolan pushed a commit to TierNolan/BitcoinArmory that referenced this issue Nov 23, 2018
af2da22 Add new tests for invalid Bech32 strings (Clark Moody)

Pull request description:

  Similar updates in the vein of etotheipi#27, etotheipi#29, etotheipi#30, etotheipi#31, etotheipi#32

  Adds invalid Bech32 string test cases.

  Please note: Rust strings are UTF-8, so that the character literal `0xff` [turns into](https://codepoints.net/U+00FF) `0xc3bf` when accessed with the `bytes` function.

Tree-SHA512: 73f85762fc22059acb9c4b382068997fb0341354f1de26ecb2d75ba3c57aee80609fd2839967541c9a9f96ccdc04137140174396f5acfe62a6511fd9f18e703e
TierNolan pushed a commit to TierNolan/BitcoinArmory that referenced this issue Nov 23, 2018
6af00f4 Update Ruby tests (azuchi)

Pull request description:

Tree-SHA512: 9b2ab961738a40f8fed0fbbf22fdda23a0d3077975e0ca88a80ec91912703ab57c02193ac3d3873fc30443c12046c390c7252308615a4df1c6c56d6a7d5b8203
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests