tinygeth

module
v0.0.0-...-5b6e8be Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2024 License: GPL-3.0

README

Tiny Geth Mascot

Tiny Geth

Docs/Wiki API Reference Build Status Code Coverage

Tiny Geth is Peter's personal, opinionated "fork" of go-ethereum. It's not a complete fork, rather combined bits and bobs from upstream with some local changes that were rejected upstream. I want to explore what Geth could be with hands untied, without having to care about breaking code for that one developer in Nebraska¹.

Disclaimers:

  • This is a personal project. I take no responsibility for anyone using it and incurring arbitrary losses.
  • Unless promised personally, there is no API guarantee anywhere in this project, not even on the RPCs.

Binaries

Tiny Geth is only pre-built as a multi-arch docker image for amd64 and arm64 in tinygeth/tinygeth. The tags available are: latest (all pushes to main), stable (latest tagged release) and vX.Y.Z (specific tagged release).

For anything else, you can build with Go:

go install ./cmd/tinygeth

There are no plans to distribute to any other platforms.

Changelog

These are the approximate changes compared upstream:

  • Tiny Geth uses a number of upstream packages.
    • There is no point in maintaining the same utility functionality in multiple repositories / forks. Any Go library code that can be reused as a pre-canned chunk of code from upstream, will be done so. These include: accounts/abi, common, crypto, ethdb, log, metrics, p2p, rlp, rpc at the moment.
    • Whilst the above packages are akin to utilities, there are also critical ones that should not be duplicated or maintained separately. These include: consensus, core/state, core/types, core/vm, params, trie, triedb at the moment.
  • Tiny Geth does not support account management.
    • Ethereum nodes should not concern themselves with being wallets. Whilst having a wallet implementation in Go is useful (please use go-ethereum as a library), having a keystore inside a running node is not.
  • Tiny Geth does not support hashdb and old archive mode.
    • Legacy archive nodes store full MPT proofs for all states, for all blocks. That is prohibitively expensive and there is no point in retaining it. A pathdb archive mechanism may be enabled in the future.
  • Tiny Geth uses node.js + ethers for its console.
    • Any JavaScript runtime other than the major ones will always trail behind the specs, usually by years. Using node.js is admittedly a big cannon, but it gets rid one a set of problems an Ethereum node should not care about; and at the same time opens up the door for the modern JavaScript package ecosystem.
    • Details at Tiny Geth JavaScript Console.
  • Tiny Geth ships one single monolithic binary.
    • There are many tools that can come in handy when working with an Ethereum node. Anything deemed important or uniquely useful is shipped as a subcommand. Everything else is left for external projects.
    • Details at Tiny Geth Command Line Interface.
  • Tiny Geth does not support GraphQL.
    • GraphQL was an honest attempt at accessing Ethereum data lighter. Unfortunately, it turned out to be misplaced inside an Ethereum node. The data representation is tuned for operation, not querying. Serving GraphQL is better done from purpose-built indexers. Nodes should focus on exporting data.
  • Tiny Geth does not support pending blocks.
    • The notion of the pending block originated from a time when most of the transactions fit into the next block. Nowadays, with high mempool sizes and private order flows, the pending block became useless.
    • Special caveat, Tiny Geth also does not serve getTransactionCount from the transaction pool (i.e. pending nonces). The reason is the same, it is not reliable. Please track your transactions yourself.
  • Tiny Geth does not support JavaScript tracers.
    • JavaScript tracers were an early attempt to allow users to inject their custom EVM tracers into Geth. As runtime costs were too high, native Go tracers were introduced. There's no point in dragging .js along.
  • Tiny Geth does not support Ethstats publishing.
    • Ethstats was the original web dashboard for monitoring the Ethereum network and nodes on it. It has been abandoned a long time ago and clients shipped proper metrics collection and dashboards since.

Authorship

Tracking authorship information through git commits from upstream is not possible due to the different code and dependency structure and changes to fundamental types. I'll try to explicitly highlight commits that are merging upstream code downstream into this repo to try and explicitly highlight its origins.

Upstream code sync history:

License

This project reuses probably 99.999% code from go-ethereum, some as a dependency, some verbatim. The license is the same as upstream:

  • The library (i.e. code outside the cmd folder) is licensed under the GNU Lesser General Public License v3.0.
  • The binaries (i.e. code inside the cmd folder) are licensed under the GNU General Public License v3.0.

Directories

Path Synopsis
beacon
merkle
Package merkle implements proof verifications in binary merkle trees.
Package merkle implements proof verifications in binary merkle trees.
types
Package types implements a few types of the beacon chain for light client usage.
Package types implements a few types of the beacon chain for light client usage.
cmd
tinygeth
geth is a command-line client for Ethereum.
geth is a command-line client for Ethereum.
utils
Package utils contains internal helper functions for go-ethereum commands.
Package utils contains internal helper functions for go-ethereum commands.
Package core implements the Ethereum consensus protocol.
Package core implements the Ethereum consensus protocol.
bloombits
Package bloombits implements bloom filtering on batches of data.
Package bloombits implements bloom filtering on batches of data.
forkid
Package forkid implements EIP-2124 (https://eips.ethereum.org/EIPS/eip-2124).
Package forkid implements EIP-2124 (https://eips.ethereum.org/EIPS/eip-2124).
rawdb
Package rawdb contains a collection of low level database accessors.
Package rawdb contains a collection of low level database accessors.
txpool/blobpool
Package blobpool implements the EIP-4844 blob transaction pool.
Package blobpool implements the EIP-4844 blob transaction pool.
txpool/legacypool
Package legacypool implements the normal EVM execution transaction pool.
Package legacypool implements the normal EVM execution transaction pool.
eth
Package eth implements the Ethereum protocol.
Package eth implements the Ethereum protocol.
catalyst
Package catalyst implements the temporary eth1/eth2 RPC integration.
Package catalyst implements the temporary eth1/eth2 RPC integration.
downloader
Package downloader contains the manual full chain synchronisation.
Package downloader contains the manual full chain synchronisation.
ethconfig
Package ethconfig contains the configuration of the ETH and LES protocols.
Package ethconfig contains the configuration of the ETH and LES protocols.
filters
Package filters implements an ethereum filtering system for block, transactions and log events.
Package filters implements an ethereum filtering system for block, transactions and log events.
Package event deals with subscriptions to real-time events.
Package event deals with subscriptions to real-time events.
internal
debug
Package debug interfaces Go runtime debugging facilities.
Package debug interfaces Go runtime debugging facilities.
ethapi
Package ethapi implements the general Ethereum API functions.
Package ethapi implements the general Ethereum API functions.
reexec
This file originates from Docker/Moby, https://github.com/moby/moby/blob/master/pkg/reexec/reexec.go Licensed under Apache License 2.0: https://github.com/moby/moby/blob/master/LICENSE Copyright 2013-2018 Docker, Inc.
This file originates from Docker/Moby, https://github.com/moby/moby/blob/master/pkg/reexec/reexec.go Licensed under Apache License 2.0: https://github.com/moby/moby/blob/master/LICENSE Copyright 2013-2018 Docker, Inc.
syncx
Package syncx contains exotic synchronization primitives.
Package syncx contains exotic synchronization primitives.
testlog
Package testlog provides a log handler for unit tests.
Package testlog provides a log handler for unit tests.
utesting
Package utesting provides a standalone replacement for package testing.
Package utesting provides a standalone replacement for package testing.
version
Package version implements reading of build version information.
Package version implements reading of build version information.
web3ext
Package web3ext contains geth specific web3.js extensions.
Package web3ext contains geth specific web3.js extensions.
Package miner implements Ethereum block creation and mining.
Package miner implements Ethereum block creation and mining.
Package node sets up multi-protocol Ethereum nodes.
Package node sets up multi-protocol Ethereum nodes.
Package tests implements execution of Ethereum JSON tests.
Package tests implements execution of Ethereum JSON tests.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL