Back to Home

GroveLib

Library
Part of The Piper Merriam Collection
0xce642b6a82e7...6ba8eaeb31d7
FrontierContract #2,356Exact Bytecode MatchEdit this contract
Deployed October 21, 2015 (10 years ago)Block 419,522

An ordered index library for contract storage, deployed 2015-10-21.

Frontier EraVerified Source

Historical Significance

Storage on Ethereum is a hash map, so a contract can look a value up by key but cannot ask which key comes next. Anything that has to process records in order, a queue of scheduled work above all, has to build that order itself. This library supplies it as a balanced tree kept in the caller's own storage, and it is one of the pieces of infrastructure that had to be written and deployed by hand because the language shipped nothing like it.

Context

Deployed in October 2015, when contracts had no standard library and common routines were put on chain individually to be linked against.

Key Facts
Deployer
Piper Merriam(0xd3cda9...293601)
Deployment Block
419,522
Deployment Date
Oct 21, 2015, 11:06 PM
Code Size
4.3 KB
Gas at Deploy
1,175,251

Description

GroveLib maintains sorted indexes inside contract storage using a self balancing binary tree. It supports inserting a value under a key, querying for the node exactly at a value, and walking to the next or previous node in order, which is what lets a contract ask for the earliest entry above or below a threshold without scanning everything it holds. It was written to let the Ethereum Alarm Clock look up which scheduled call comes next, a query the EVM offers no native way to answer. Deployed as a standalone library so other contracts could link against it rather than carry their own copy.

Source Verified

Exact bytecode match(4,361 bytes)
Compiler: v0.1.5-

Historian Categories

Library
Heuristic Analysis

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

Detected Type: Library

Bytecode Overview

Opcodes4,361
Unique Opcodes165
Jump Instructions269
Storage Operations273

External Links

Related contracts