Skip to content

Consider storing the sum tree as a dynamic array #153

Open

Description

@Stebalien

Right now, it's stored as a mapping. Unfortunately, that means:

  1. We waste a hash syscall every time we do a lookup (not huge).
  2. Every step will access a random slot which will lead to an IPLD load.

If we switch to a dynamic array, I think the last 5 steps (once we're within 5 bits of the target) should all fall within 1-2 IPLD nodes so we should save 4-5 IPLD loads every time we search.

Activity

  1. moved this to 🐱 Todo in PDPon Apr 21, 2025
  2. rjan90 commented on Apr 21, 2025

    @rjan90
    Contributor

    We are keeping this around as an informational issue about potential future gas savings.

  3. moved this from 🐱 Todo to No status in PDPon Apr 21, 2025
  4. moved this to 🐱 Todo in PDPon May 1, 2025
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

    Fields

    No fields configured for issues without a type.

    Projects

    • Status
      🐱 Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions