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

Stake address hashes not encoded for presentation #224

Closed
oneEdoubleD opened this issue Jul 27, 2020 · 4 comments
Closed

Stake address hashes not encoded for presentation #224

oneEdoubleD opened this issue Jul 27, 2020 · 4 comments

Comments

@oneEdoubleD
Copy link
Contributor

oneEdoubleD commented Jul 27, 2020

{ os:
   { arch: 'x64',
     cpus: { count: 24, model: 'AMD Ryzen 9 3900X 12-Core Processor' },
     release: '5.4.0-42-generic',
     totalMem: 16778514432,
     type: 'Linux' },
  version: '3.1.0' }

stake_address.hash example \\xe0ad216e3dfe704c162d0dbc96243461624b4965dd1e0765ad47b0e4aa

@SebastienGllmt
Copy link
Contributor

SebastienGllmt commented Jul 27, 2020

I assume this is a db-sync issue and not a cardano-graphql issue. Maybe this is a similar ticket? #213

@dcoutts
Copy link
Contributor

dcoutts commented Jul 28, 2020

This was changed in db-sync for payment addresses but probably not for stake addresses.

commit a6132abc5dee1dd77b541980014d4f490559c097
Author: Erik de Castro Lopo <erikd@mega-nerd.com>
Date:   Mon Jul 20 17:26:06 2020 +1000

    db-sync: Render addresses by era

    Byron addresses (even ones within Shelley transactions) are rendered using
    Base58 and Shelley addresses are rendered as Bech32. Use 'cardano-api' to
    do this.

File a ticket on db-sync for stake addresses specifically.

@rhyslbw rhyslbw transferred this issue from cardano-foundation/cardano-graphql Jul 29, 2020
@rhyslbw rhyslbw changed the title Encoding of addresses Stake address hashes not encoded as bech32 Jul 29, 2020
@rhyslbw rhyslbw changed the title Stake address hashes not encoded as bech32 Stake address hashes not encoded for presentation Jul 29, 2020
@erikd
Copy link
Contributor

erikd commented Aug 3, 2020

I think the solution here is to store both the raw serialized version and the Bech32 version (all stake addresses are Shelley era and hence should be Bech32 encoded).

erikd added a commit that referenced this issue Aug 10, 2020
@erikd
Copy link
Contributor

erikd commented Aug 10, 2020

@oneEdoubleD :

cexplorer=# select * from stake_address limit 3 ;
 id |                           hash_raw                           |                            view                             | registered_tx_id 
----+--------------------------------------------------------------+-------------------------------------------------------------+------------------
  1 | \xe10e5b086df87a2a0c5c398b41d413f84176c527da5e5cb641f4598844 | stake1uy89kzrdlpaz5rzu8x95r4qnlpqhd3f8mf09edjp73vcs3qhktrtm |          2415511
  2 | \xe18d0ea87fb33ca385998da1eb4fd8d3347ff3a86c90eebf796934c096 | stake1uxxsa2rlkv728pve3ks7kn7c6v68luagdjgwa0medy6vp9suv96q8 |          2415591
  3 | \xe14f39feccb595162d892abd1e03d80de8e76b8a2015139430e032b2be | stake1u98nnlkvkk23vtvf9273uq7cph5ww6u2yq2389psuqet90sv4xv9v |          2415594
(3 rows)

@erikd erikd closed this as completed in 34b5aaf Aug 10, 2020
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

4 participants