Skip to content

Source nodes that produce TxSet clone and hash the entire vec of u32s #79

Description

@arminsabouri

Dense ids produce a vec of u32s

 pub fn dense_txids_from(&self, start: usize) -> Vec<AnyTxId> {
        ...
        (start..total)
            .map(|idx| dense::TxId::new(u32::try_from(idx).expect("dense txid should fit in u32")))
            .map(AnyTxId::from)
    }

This is already overkill. Source nodes can simply output low and high tuple. hashsets are probably the wrong tools entirely.
As filters prune the tx set, we can store more granular ranges -- vec of tuples. Of course this only works for dense ids.
Need to do some back of the envelope math but if this ends up being bottleneck, would it make sense to have sequential ids for the loose repr as well?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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