Skip to content

Redundant fields in tally transaction #87

@tmpolaczyk

Description

@tmpolaczyk

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions