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

Required adjustments for stake pool metadata #1076

Closed
rvl opened this issue Nov 28, 2019 · 5 comments
Closed

Required adjustments for stake pool metadata #1076

rvl opened this issue Nov 28, 2019 · 5 comments
Assignees

Comments

@rvl
Copy link
Contributor

rvl commented Nov 28, 2019

Context

Part of WB-25 Collect stake pool metadata.

There have been changes to the stake pool registry so that metadata are associated with stake pool owners rather than stake pool IDs.

Additionally, more metadata fields need to be added.

The relevant issue is input-output-hk/testnet-stake-pool-registry-validator#2

Decision

  • Stake pool metadata is now associated with a stake pool owner public key rather than PoolId.

  • A registered stake pool (identified by PoolId) may have more than one owner.

  • An owner (identified by a public key) may be registered with multiple stake pools.

  • If multiple stake pool owners publish metadata for their stake pool, the metadata fields must all be exactly the same (modulo owner). Otherwise, cardano-wallet shall produce no metadata at all for that pool.

  • If a stake pool owner is associated with multiple pools, the metadata is re-used for all pools he owns, though the previous rule applies.

  • When applying blocks, the wallet extracts the owner(s) associated with stake pool registrations and stores them in the database. This is a many-to-many association of PoolId to public key.

  • We can still assume validation and authentication of metadata is done by the registry validator and cardano-wallet can trust what is downloaded.

  • Add the extra metadata fields and update the tests accordingly.

Acceptance Criteria

  1. The extra metadata fields must be added to the types, JSON codecs, and API spec.

(Other tickets contain more AC.)


Development

QA

  1. lib/core/test/unit/Cardano/Pool/MetadataSpec.hs has been updated to match the new registry format.
@rvl rvl added this to the Collect stake pool metadata milestone Nov 28, 2019
@rvl rvl self-assigned this Nov 28, 2019
@KtorZ
Copy link
Member

KtorZ commented Nov 28, 2019

@rvl

Stake pool metadata is now associated with a stake pool owner XPub rather than PoolId.

Note that, the X in XPub stands for eXtended, which refers to a public key + a chain code (typically 64 bits in total).

Here, metadata will be identified by 32-bit public keys.

@rvl
Copy link
Contributor Author

rvl commented Nov 28, 2019

OK corrected. This is starting to look like it should be split into more issues.

@KtorZ
Copy link
Member

KtorZ commented Nov 28, 2019

@rvl You may be right. The JSON updates are quite straightforward I think. The indirection however requires additional logic to map owners to pool correctly and also, to extract the owner from the blocks which we currently don't do. So I'd say at least 3 issues yes.

iohk-bors bot added a commit that referenced this issue Dec 4, 2019
1078: Stake pool registry format updates r=rvl a=rvl

Relates to #1076

# Overview

This starts updating the types and tests for the new stake pool registry format, which is indexed by pool owner(s) rather than pool id.


Co-authored-by: Rodney Lorrimar <[email protected]>
@piotr-iohk
Copy link
Contributor

OK, It was not quite clear to me what is the status of this one because there are quite a few issues linked in the Development section, which are still opened.

If I understand correctly that this particular issue corresponds to pr -> #1078 (in terms of work done), and the rest is still in progress.

@piotr-iohk
Copy link
Contributor

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

3 participants