Skip to content

Unchecked history tree growth #1

@disgustingwall

Description

@disgustingwall

The main problem with the system currently is that the history tree can become infinitely large without having any content stored in it.

This problem is especially noticeable when two servers are set to pull each other's trees and merge them: one server will merge the other's tree, making a node with only references to two other nodes in it - the foreign server's head node and the server's own previous node. The second server will then detect that a new head node is available, and it will create a similarly empty node in its own tree. The first server will then recognize that a new node is available, and the cycle will repeat.

This could be solved in one of two ways:

  • Each server could use spare resources to compress its own tree: adjacent sparse nodes could be compressed into a single node and the tree could be rebuilt. The server could aim to have each node be a natural file size, IE less than or equal to some IPFS or local filesystem block size, or perhaps some multiple of 512 bytes.
  • The receiving node could check if content included in the foreign tree has already been included in its own tree. This would take time, delay the inclusion of content to the server's tree, and an exhaustive search would be extremely resource intensive and likely fruitless. This is likely a poor solution in isolation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions