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

CHIP-0020: Wallet Hinted Coin Discovery #81

Merged
merged 9 commits into from Oct 30, 2023
Merged

CHIP-0020: Wallet Hinted Coin Discovery #81

merged 9 commits into from Oct 30, 2023

Conversation

Rigidity
Copy link
Contributor

No description provided.

@danieljperry
Copy link
Contributor

This CHIP presents an optional method for Chia wallets to implement hinting. It is being opened directly to a status of Review (Fast Track) because it is already in use in Chia's reference wallet.

Please leave your reviews as comments in this PR.

@danieljperry danieljperry changed the title CHIP: Wallet Hinted Coin Discovery CHIP-0020: Wallet Hinted Coin Discovery Aug 25, 2023
@danieljperry
Copy link
Contributor

We will be holding a public Zoom call to discuss this CHIP on September 5 at 1500 UTC (8 AM PDT, 11 PM China). See the #chips channel in our Discord for more info.

@Rigidity
Copy link
Contributor Author

In addition to rewording the CHIP a bit to make it easier to follow, some questions brought up on the call have been addressed in the CHIP. A review would be appreciated.

Is the zero-index of the memo list always interpreted as a hint?
Only if the first memo is 32 bytes long.

If you want to include a memo on an unhinted coin, do you need to set the hint to null?
This CHIP's wording previously implied that the hint is separate from the other memos in the list. This is not the case, and has been corrected. As such, even if a memo is 32 bytes, it does not need to be in a separate position than a hint. It would just be considered a "hint" to that 32 bytes in addition to a regular memo for other purposes (and assuming those 32 bytes aren't a valid puzzle hash that a wallet would look up, it would have no effect).

Is it possible to DoS a wallet or node by including a large hint?
No, since a hint must be exactly 32 bytes. If the first memo is larger than this, it would be discarded and not stored in the database. You also still have to pay the regular CLVM cost of 12,000 per byte for memos.

Are RPCs in the scope of this CHIP?
Documentation of RPCs and implementation details are not in the scope of this CHIP, however a link has been added to the get_coin_records_by_hint RPC.

What is the CLVM cost of a hint?
A hint is 32 bytes, and each byte has a cost of 12,000, so the total cost of the hint is 384,000.

@danieljperry
Copy link
Contributor

All questions have been answered regarding this CHIP, and it appears to have achieved community consensus. It is now in Last Call. If no further changes are required in the next two weeks, this CHIP will be moved to Final, after which changes (other than errata) will no longer be allowed.

@danieljperry
Copy link
Contributor

This CHIP is now Final. No further changes are allowed, other than adding errata.

@danieljperry danieljperry merged commit afd8468 into main Oct 30, 2023
2 checks passed
@danieljperry danieljperry deleted the coin-hinting branch October 30, 2023 01:13
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

Successfully merging this pull request may close these issues.

None yet

2 participants