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

Byron address displayed as bech32 instead of base58 #432

Closed
pedromtcosta opened this issue Sep 14, 2022 · 2 comments
Closed

Byron address displayed as bech32 instead of base58 #432

pedromtcosta opened this issue Sep 14, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@pedromtcosta
Copy link

The transaction a39d10dba7022fdbc4e324ef6234100308bd83e3470dea9d732519406bef268a generates an output to the Byron address Ae2tdPwUPEZAYZFzwHiWsMVR1i9Y9BusUNVN3EnqXJfa9FAEYkxJyTYnMn3. Oura outputs it as a bech32 (addr1stvpskppsdvpezdwv8wlnfqk4v60u7shmkurqls4v7plnqxss8gqeqw4tksqqx4jkr4tcrhewe7) instead of base58. This can be verified by running the following Oura command:

oura dump relays-new.cardano-mainnet.iohk.io:3001 --bearer tcp --since 18894425,3a1e001b0d2690386354c79f83064ec21923ef1f84ae235f24d67c1f6fb41e45

Amongst the data returned by the command above, we get:

{
  "tx_output": {
    "address": "addr1stvpskppsdvpezdwv8wlnfqk4v60u7shmkurqls4v7plnqxss8gqeqw4tksqqx4jkr4tcrhewe7",
    "amount": 391872349249,
    "assets": [],
    "datum_hash": null
  }
}

and finally, we can verify this is indeed a Byron address by running something like this with Cardano Serialization Lib:

const addr = ByronAddress.from_address(
  Address.from_bech32(
    'addr1stvpskppsdvpezdwv8wlnfqk4v60u7shmkurqls4v7plnqxss8gqeqw4tksqqx4jkr4tcrhewe7'
  )
);

console.log(Buffer.from(addr.to_address().to_bytes()).toString('hex'));
console.log(addr.to_base58());

All Byron addresses I encounter are always presented as base58 in block explorers and wallets, so even though the bech32 I get from Oura is "correct", as I can decode it to bytes and encode it back to a base58, I believe Oura should already present it as base58 as it seems pretty standard to do so.

@scarmuega scarmuega self-assigned this Sep 21, 2022
@scarmuega scarmuega added the bug Something isn't working label Sep 21, 2022
@scarmuega
Copy link
Member

hi @pedromtcosta, thanks for reporting. Your report is correct, this is a bug. We'll work on a fix.

@scarmuega
Copy link
Member

Fixed by #530, will go out in v1.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants