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

/transaction-info: add creator's pubkey to txindex metadata #298

Open
alecov opened this issue Feb 17, 2022 · 1 comment
Open

/transaction-info: add creator's pubkey to txindex metadata #298

alecov opened this issue Feb 17, 2022 · 1 comment

Comments

@alecov
Copy link

alecov commented Feb 17, 2022

In tandem with #297:

In /transaction-info, txindex metadata for both CC/DAO transfers identifies the creator by username instead of pubkey, for example:

"CreatorCoinTransferTxindexMetadata": {
    "CreatorUsername": "BeActive",
    "CreatorCoinToTransferNanos": 10000,
    "DiamondLevel": 0,
    "PostHashHex": ""
}

This is really bad since AFAIK usernames are volatile and, even if they're not in case of already issued CCs/DAOs, it would require a second RPC call in order to grab the name's pubkey.

I would suggest improving the output of /transaction-info by adding the creator's pubkey in the txindex metadata.

@lazynina
Copy link
Member

@alecov - I would welcome a PR to add the CreatorPublicKey to these structs as you suggested. You can make this update in core by adding a CreatorPublicKeyBase58Check field to CreatorCoinTransferTxindexMetadata and DAOCoinTransferTxindexMetadata (found in db_utils around line 3588) and then updating the ComputeTransactionMetadata logic in mempool.go in the ComputeTransactionMetadata function

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

2 participants