Skip to content

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