| Information | - |
| --- | --- |
| Version | Master branch |
| Platform | Linux |
| Installation | From source |
Response with "success" status and estimated data.
The "error" status with explanation: "Bad request. Error in $.payments[0].address: Unable to decode Address: not a well-formed Byron Address."
$ cardano-address address inspect <<< DdzFFzCqrhseTBUHRGNjAv57khfvYyFftfEpBuo2fH5wkm8ae9dSxjubx5unTjUAfoL1sU35MqdeRbhbvvgyUoKPK3xTT8ESiGAaMvrR
address style: Byron
stake reference: none
address root: 0522483baba38de064639b1211c8f9edde53fb245db75ac02d3003d3
derivation path: 581c78b5e7d1506a7c3dc7bce135a338fc57651847cbe57bbcae553f7f62
network tag: 酶
This seems indeed like a legit Byron mainnet address. May I ask what command did you use to spin up a wallet server?
1) Run Cardano-node in the mainnet mode.
2) do a
./cardano-wallet-byron serve --listen-address 127.0.0.1 --port 8090 --node-socket path/to/socket/byron-mainnet-socket --database ./wallets --sync-tolerance 300s --testnet genesis.json
And then just try to estimate fees with the byron endpoint. When I try to do this for a fresh-generated address, everything works fine. For example address like:
37btjrVyb4KDrFe4MbTUTrh3o21gC7RNcVqdDK78BappjvA6drkV2YLFvc1ShzufcugKurUbGSrDrvxU1NhjABtzL8oCfcEF4GQ8T6drdrVX8QsYWW
doesnt trigger an error and fees are calculated correctly.
I cannot reproduce it on Byron mainnet using most recent wallet 2020.6.5 (git revision: 3bafec15d862c81c052c4cf450fa7e6cf29d0f76).
Are you getting this on Byron mainnet, byron testnet or shelley testnet maybe? (If the latest, then byron addresses are not really supported there yet).
Byron mainnet.
ok, I'll try to rebuild my wallet in case there were some changes in the last commits.
@Fell-x27 just read your comment. I think you need to drop --testnet genesis.json in favour of --mainnet, e.g.:
cardano-wallet-byron serve --node-socket path/to/socket/byron-mainnet-socket \
--mainnet \
--database ./wallets \
--listen-address 127.0.0.1 \
--port 8090
Make sense, I just didnt see "mainnet" parameter in the docs. It was strange, but doc is the doc. Will try.
Well, I've rebuilt the wallet and used the "mainnet" flag and..it works. Estimation is working as well now. Thanks!
It is mentioned in the cmd "usage":
$ cardano-wallet-byron serve
Usage: cardano-wallet-byron serve [--listen-address HOST] ([--random-port] |
[--port INT]) [--tls-ca-cert FILE]
[--tls-sv-cert FILE] [--tls-sv-key FILE]
--node-socket FILE (--mainnet |
--testnet FILE) [--database DIR]
[--sync-tolerance DURATION]
[--shutdown-handler] [--trace-NAME SEVERITY]
However not explained in the cmdline help "available options", indeed.
Mentioned in the doc also:
https://github.com/input-output-hk/cardano-wallet/wiki/Wallet-Command-Line-Interface-(cardano-wallet-byron)#example
The error is not great though... "Unable to decode Address: not a well-formed Byron Address." should really be "Invalid network discrimination, expected Testnet address but received Mainnet address".
The address is, so-to-speak, well-formed.
The same problem, if you tried to post a mainnet transaction with the "testnet connection". The message is not about wrong network, its looks like:
{
"code":"created_invalid_transaction",
"message":"That's embarrassing. It looks like I've created an invalid transaction that could not be parsed by the node. Here's an error message that may help with debugging: MempoolTxErr (UTxOValidationTxValidationError (TxValidationNetworkMagicMismatch NetworkMainOrStage (NetworkTestnet 764824073)))"
}
@Fell-x27 this is using which endpoint exactly? /v2/proxy/transactions ? Because the message is actually about a network mismatch, but it's caught by the node. This endpoint is, like the name suggests, just proxying the request to the node; The wallet does some sanity check about the well-formness of the transaction, but not much. In particular, it doesn't check that addresses have the right discrimination.
Yes. I understand you :)