aeternity / aeternal

Æterrnal--the caching and reporting layer for the æternity blockchain
https://aeternal.io
ISC License
18 stars 10 forks source link

Pointers of the names are not correct #251

Closed CedrikNikita closed 4 years ago

CedrikNikita commented 4 years ago

https://sdk-testnet.aepps.com/v2/names/qwertyuiopasdf.chain

{
"id":"nm_HPhwtyXZfSzGXrxHexRPuHi8B7oEUMfhSPG8Jhyw1GDAohh2Q",
"pointers":[{"id":"ak_BrJErWKWYUNqGcXzDniXf13saPV6H1dsh1NaDsm913vbPGAH6","key":"account_pubkey"}],
"ttl":217121
}

https://testnet.aeternal.io/middleware/names/qwertyuiopasdf.chain

[{
"name":"qwertyuiopasdf.chain",
"name_hash":"nm_HPhwtyXZfSzGXrxHexRPuHi8B7oEUMfhSPG8Jhyw1GDAohh2Q",
"tx_hash":"th_2dqcReWTtXp83fpJ1sJb1Dzpv7DEk9G2JXc16N6W9AAZ8KGqbN",
"created_at_height":167121,"auction_end_height":167121,
"owner":"ak_BrJErWKWYUNqGcXzDniXf13saPV6H1dsh1NaDsm913vbPGAH6",
"expires_at":217121,
"pointers":null
}]

Pointers in the names that we have before, are now set to null. But that could be set back by sdk method aensUpdate()

johnsnewby commented 4 years ago

Fixed, but this whole implementation is brittle, and I do not like it.

I currently have the ability to recover pointers at any chain height. Previously I had tried to extract and lookup name pointers from all transactions as they were imported, but that was a bad solution as well. I am minded to store all name changes so everything can be re-assembled, at any point. But we stick with this for now. All it means is that whenever a transaction is reloaded, all dependent name transactions must also be reloaded, which is what I had to do now.

Now you know everything :)