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

Redundant fields in tally transaction #87

Open
tmpolaczyk opened this issue Jun 8, 2020 · 0 comments
Open

Redundant fields in tally transaction #87

tmpolaczyk opened this issue Jun 8, 2020 · 0 comments

Comments

@tmpolaczyk
Copy link
Contributor

As of PR witnet/witnet-rust#1267 there are two fields in TallyTransaction that look redundant, we should be able to implicitly calculate them:

out_of_consensus and error_committers

message TallyTransaction {
    Hash dr_pointer = 1;
    bytes tally = 2;
    repeated ValueTransferOutput outputs = 3;
    repeated PublicKeyHash out_of_consensus = 4;
    repeated PublicKeyHash error_committers = 5;
}

Potential size savings: 20 bytes * number_of_out_of_consensus_and_errors per tally transaction.

Alternatives: since the reveals have a well known ordering, we could just store the reveal_index instead of PublicKeyHash. This would reduce the overhead from 20 bytes to ~1 byte, but not sure if we can easily implement that in the node.

@aesedepece aesedepece transferred this issue from witnet/witnet-rust Oct 3, 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

1 participant