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

Add Litecoin (LTC) support. #114

Merged
merged 26 commits into from May 26, 2022
Merged

Add Litecoin (LTC) support. #114

merged 26 commits into from May 26, 2022

Conversation

cculianu
Copy link
Owner

With this PR Fulcrum will now have support for Litecoin, in addition to Bitcoin Cash and Bitcoin BTC.

This PR includes support for deserializing/reserializing mweb data, so Fulcrum should work with latest litecoind v0.21.2. Note that no known Electrum clients on LTC know how to deal with mweb data, but Fulcrum at least won't die on it when receiving txns or blocks containing it from litcoind RPC.

With respect to mweb txn and block data, Fulcrum will:

  • silently ignore the mweb data in a block
  • silently ignore "mweb-only" txns in mempool (these txns have vin and vout as empty so they contain no spends visible to the normal UTXO system anyway).
  • does accept mweb txns that have canonical CTxIns/CTxOuts (the mweb data is ignored, but the canonical UTXOs outside of mweb are processed correctly).

The ignoring of mweb data by Fulcrum internally is not a huge problem. This is because MimbleWimble coins and/or whatever else exists in mweb can't presently be handled by the Electrum protocol anyway, so it's safe to ignore.

Note that if clients end up requesting a txn containing mweb data, Fulcrum will faithfully send to them the txn as litecoind reports it. If litecoind is configured to serialize mweb data (the default), then clients may throw a deserialization error if they are not updated to process this new txn format correctly. For now, if your server anticipates having non-upgraded Electrum-LTC clients connected to it and potentially requesting txns containing mweb data, then you should start litecoind with the -rpcserialversion=1 argument (this tells litecoind to strips mweb data from all txns it sends out through RPC).

See discussion here: spesmilo/electrumx#179

@cculianu cculianu added enhancement New feature or request Litecoin labels May 25, 2022
Just in case. This option was added anyway to troubleshoot LTC
deserialization problems.  For BCH and BTC, no need to rock the boat.
Who knows maybe some C++ compilers will hate that.
We had to do this because Qt really doesn't want you to emit
const-signals and this function needs to emit a signal.
@cculianu cculianu merged commit 5ac7d07 into master May 26, 2022
@cculianu cculianu deleted the ltc branch May 26, 2022 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Litecoin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant