Back to Home

Grove

Unclassified
Part of The Piper Merriam Collection
0x8017f24a47c8...eb3c017edf0b
FrontierContract #1,857Source VerifiedEdit this contract
Deployed October 9, 2015 (11 years ago)Block 359,574

Piper Merriam's Grove v0.2, a library and registry for queriable indexed ordered data, deployed at block 359574.

Frontier EraVerified Source

Historical Significance

Ordered data is awkward on a chain where storage is a flat mapping and iteration costs gas per step. Grove is one of the earliest attempts to give Solidity a reusable ordered index rather than having every application invent its own, and it comes from Piper Merriam, who also wrote the Ethereum Alarm Clock. It dates from block 359574, within the first months of the live chain.

Key Facts
Deployer
Piper Merriam(0xd3cda9...293601)
Deployment Block
359,574
Deployment Date
Oct 9, 2015, 11:07 PM
Code Size
2.4 KB
Gas at Deploy
666,282
Transactions by Year
20153

Description

GroveLib maintains ordered indexes as a binary search tree held in contract storage. Each index is a set of nodes carrying an id, a signed value, and parent, left and right pointers, with the tree rebalanced on insertion so lookups stay logarithmic. The library exposes query helpers that walk the tree to find the first node above, below or at a given value, which is what makes the ordered data queriable rather than merely stored.

The Grove contract wraps the library so other contracts can create indexes namespaced by their own address and insert into them without deploying their own tree code. The library address appears in a comment in the source, a reminder that library linking at the time was done by hand.

Source Verified

SolidityEtherscan verified
Compiler: v0.1.5+
Heuristic Analysis

The following characteristics were detected through bytecode analysis and may not be accurate.

Detected Type: Unclassified

Bytecode Overview

Opcodes2,506
Unique Opcodes152
Jump Instructions106
Storage Operations22

External Links

Related contracts