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

Referral code based on Query ID #131

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

oleganza
Copy link

This is a proposal to split query ID in two halves: app identifier and the random app data.

Specification

@mr-tron
Copy link

mr-tron commented Jan 18, 2024

Please add algorithm for creating first part. I suggest to user CRC32 IEEE like for tlb schemes.
for example

crc32('tonkeeper') = 0x546de4ef
crc32('dedust') = 0xc671412d

@EmelyanenkoK
Copy link
Member

I think it need to be explicitly mentioned that this data can be used only for offchain analysis and can not be fully trusted.

@oleganza
Copy link
Author

@mr-tron @EmelyanenkoK added notes as you suggested. Please review.

@howardpen9
Copy link

looks cool for me.

But what is the impact for this to DeFi like STON.fi and DeDust?

I remember they use query_id in zero only I am afraid.

@ProgramCrafter
Copy link

Second 32 bits (low bits) are reserved for arbitrary use: identifying individual queries in smart-contracts...

By the way, is there any onchain usecase which would allow to "identify individual queries" securely? I have not seen one so I guess main (and probably the only) usecase for query IDs is optimizing blockchain indexers.

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.

5 participants