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

new address format for FIRO and ZEC #2297

Open
cipig opened this issue Dec 17, 2024 · 1 comment
Open

new address format for FIRO and ZEC #2297

cipig opened this issue Dec 17, 2024 · 1 comment

Comments

@cipig
Copy link
Member

cipig commented Dec 17, 2024

FIRO and ZEC (and maybe more privacy coins) have added a new address format, which is not supported by mm2. Problem is that eg Binance switched to the new address format, so it is not possible any more to deposit ZEC and FIRO from mm2 to Binance
the error when you try is

"error" : "rpc:182] dispatcher_legacy:140] dispatcher_legacy:150] utxo_withdraw:131] utxo_common:367] Invalid address: Cannot determine format: [\"invalid address\", \"bech32: missing human-readable separator, \\\"1\\\"\", \"cashaddress contains mixed upper and lowercase characters\"]"

found this in FIRO wallet code

        base58Prefixes[PUBKEY_ADDRESS] = std::vector < unsigned char > (1, 82);
        base58Prefixes[SCRIPT_ADDRESS] = std::vector < unsigned char > (1, 7);
        base58Prefixes[EXCHANGE_PUBKEY_ADDRESS] = {0x01, 0xb9, 0xbb};   // EXX prefix for the address

the new address on Binance is eg EXXPmtE..., so that seems to be it
82 is the "old" format, as of coins file "pubtype": 82

same on ZEC, found this in wallet code

        keyConstants.bech32mHRPs[TEX_ADDRESS]                 = "tex";

and the address on Binance is tex15s3...

saw that ZEC has "segwit": true set in coins file (FIRO does not)
but adding "bech32_hrp": "tex" does not help, error is then

   "error" : "rpc:182] dispatcher_legacy:140] dispatcher_legacy:150] utxo_withdraw:131] utxo_common:367] Invalid address: Cannot determine format: [\"invalid address\", \"address variant/format Bech32m is not supported yet!\", \"Invalid base32 input string\"]"

so either the bech32 in the name of the variable in ZEC is BS and it's not bech32, or mm2 does not support bech32 for ZEC for some other reasons

so big question is: how can we support this?
i removed all bids for FIRO on my makers till we find a solution... kept it for ZEC for now, since i found some other CEXs that still accept the old address format

@cipig
Copy link
Member Author

cipig commented Dec 17, 2024

here is the ZIP for ZEC: https://zips.z.cash/zip-0320

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

1 participant