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

RFC 313 - The ordering of the VN set is not correct #73

Closed
stringhandler opened this issue Nov 22, 2022 · 2 comments
Closed

RFC 313 - The ordering of the VN set is not correct #73

stringhandler opened this issue Nov 22, 2022 · 2 comments

Comments

@stringhandler
Copy link
Collaborator

in https://rfc.tari.com/RFC-0313_VNRegistration.html#validator-node-set-definition

The function get_vn_set(ϵstart,ϵend)→S⃗  that returns an ordered vector S⃗  of VN_Shard_Keys that are registered for the epoch ϵn. As all UTXOs are already ordered in the base layer, we can rely on deterministic ordering based on order the registration [UTXO](https://rfc.tari.com/Glossary.html#unspent-transaction-outputs)s are placed in the blockchain.

This should read "The order is based on the VN_Shard_Key"

@sdbondi
Copy link
Member

sdbondi commented Nov 23, 2022

Any reason to impose this ordering? The blockchain already provides canonical ordering.

It could be done this way but requires an extra sorting step

@sdbondi
Copy link
Member

sdbondi commented Nov 23, 2022

Explained in chat: we trade off the very small cost of ordering by shard id for smaller Merkle proofs in QCs (if leaf nodes included in the proof are nearer to each other, then proofs are smaller)

Will update the RFC accordingly

stringhandler pushed a commit to tari-project/tari that referenced this issue Nov 24, 2022
Description
---
Sorts VN set by shard id before returning it

Motivation and Context
---
Ref tari-project/rfcs#73

How Has This Been Tested?
---
Tests updated
sdbondi added a commit to sdbondi/tari-rfcs that referenced this issue Nov 25, 2022
@CjS77 CjS77 closed this as completed in 9f5e55e Nov 25, 2022
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