ethereum/

directory
v0.0.0-...-9a46783 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2019 License: Apache-2.0

Directories

Path Synopsis
Package ethereum defines interfaces for interacting with Ethereum.
Package ethereum defines interfaces for interacting with Ethereum.
accounts
Package accounts implements high level Ethereum account management.
Package accounts implements high level Ethereum account management.
accounts/abi
Package abi implements the Ethereum ABI (Application Binary Interface).
Package abi implements the Ethereum ABI (Application Binary Interface).
accounts/abi/bind
Package bind generates Ethereum contract Go bindings.
Package bind generates Ethereum contract Go bindings.
accounts/keystore
Package keystore implements encrypted storage of secp256k1 private keys.
Package keystore implements encrypted storage of secp256k1 private keys.
accounts/usbwallet
Package usbwallet implements support for USB hardware wallets.
Package usbwallet implements support for USB hardware wallets.
accounts/usbwallet/trezor
Package trezor contains the wire protocol wrapper in Go.
Package trezor contains the wire protocol wrapper in Go.
cmd/bootnode
bootnode runs a bootstrap node for the Ethereum Discovery Protocol.
bootnode runs a bootstrap node for the Ethereum Discovery Protocol.
cmd/clef
signer is a utility that can be used so sign transactions and arbitrary data.
signer is a utility that can be used so sign transactions and arbitrary data.
cmd/evm
evm executes EVM code snippets.
evm executes EVM code snippets.
cmd/faucet
faucet is a Ether faucet backed by a light client.
faucet is a Ether faucet backed by a light client.
cmd/geth
geth is the official command-line client for Ethereum.
geth is the official command-line client for Ethereum.
cmd/internal/browser
Package browser provides utilities for interacting with users' browsers.
Package browser provides utilities for interacting with users' browsers.
cmd/p2psim
p2psim provides a command-line client for a simulation HTTP API.
p2psim provides a command-line client for a simulation HTTP API.
cmd/puppeth
puppeth is a command to assemble and maintain private networks.
puppeth is a command to assemble and maintain private networks.
cmd/rlpdump
rlpdump is a pretty-printer for RLP data.
rlpdump is a pretty-printer for RLP data.
cmd/utils
Package utils contains internal helper functions for go-ethereum commands.
Package utils contains internal helper functions for go-ethereum commands.
common
Package common contains various helper functions.
Package common contains various helper functions.
common/bitutil
Package bitutil implements fast bitwise operations.
Package bitutil implements fast bitwise operations.
common/compiler
Package compiler wraps the Solidity compiler executable (solc).
Package compiler wraps the Solidity compiler executable (solc).
common/hexutil
Package hexutil implements hex encoding with 0x prefix.
Package hexutil implements hex encoding with 0x prefix.
common/math
Package math provides integer math utilities.
Package math provides integer math utilities.
common/mclock
Package mclock is a wrapper for a monotonic clock source
Package mclock is a wrapper for a monotonic clock source
consensus
Package consensus implements different Ethereum consensus engines.
Package consensus implements different Ethereum consensus engines.
consensus/clique
Package clique implements the proof-of-authority consensus engine.
Package clique implements the proof-of-authority consensus engine.
consensus/ethash
Package ethash implements the ethash proof-of-work consensus engine.
Package ethash implements the ethash proof-of-work consensus engine.
contracts/chequebook
Package chequebook package wraps the 'chequebook' Ethereum smart contract.
Package chequebook package wraps the 'chequebook' Ethereum smart contract.
core
Package core implements the Ethereum consensus protocol.
Package core implements the Ethereum consensus protocol.
core/asm
Provides support for dealing with EVM assembly instructions (e.g., disassembling them).
Provides support for dealing with EVM assembly instructions (e.g., disassembling them).
core/bloombits
Package bloombits implements bloom filtering on batches of data.
Package bloombits implements bloom filtering on batches of data.
core/rawdb
Package rawdb contains a collection of low level database accessors.
Package rawdb contains a collection of low level database accessors.
core/state
Package state provides a caching layer atop the Ethereum state trie.
Package state provides a caching layer atop the Ethereum state trie.
core/types
Package types contains data types related to Ethereum consensus.
Package types contains data types related to Ethereum consensus.
core/vm
Package vm implements the Ethereum Virtual Machine.
Package vm implements the Ethereum Virtual Machine.
core/vm/runtime
Package runtime provides a basic execution model for executing EVM code.
Package runtime provides a basic execution model for executing EVM code.
crypto/bn256
Package bn256 implements the Optimal Ate pairing over a 256-bit Barreto-Naehrig curve.
Package bn256 implements the Optimal Ate pairing over a 256-bit Barreto-Naehrig curve.
crypto/bn256/cloudflare
Package bn256 implements a particular bilinear group at the 128-bit security level.
Package bn256 implements a particular bilinear group at the 128-bit security level.
crypto/bn256/google
Package bn256 implements a particular bilinear group.
Package bn256 implements a particular bilinear group.
crypto/secp256k1
Package secp256k1 wraps the bitcoin secp256k1 C library.
Package secp256k1 wraps the bitcoin secp256k1 C library.
eth
Package eth implements the Ethereum protocol.
Package eth implements the Ethereum protocol.
eth/downloader
Package downloader contains the manual full chain synchronisation.
Package downloader contains the manual full chain synchronisation.
eth/fetcher
Package fetcher contains the block announcement based synchronisation.
Package fetcher contains the block announcement based synchronisation.
eth/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.
eth/tracers
Package tracers is a collection of JavaScript transaction tracers.
Package tracers is a collection of JavaScript transaction tracers.
eth/tracers/internal/tracers
Package tracers contains the actual JavaScript tracer assets.
Package tracers contains the actual JavaScript tracer assets.
ethclient
Package ethclient provides a client for the Ethereum RPC API.
Package ethclient provides a client for the Ethereum RPC API.
ethstats
Package ethstats implements the network stats reporting service.
Package ethstats implements the network stats reporting service.
event
Package event deals with subscriptions to real-time events.
Package event deals with subscriptions to real-time events.
graphql
Package graphql provides a GraphQL interface to Ethereum node data.
Package graphql provides a GraphQL interface to Ethereum node data.
internal/debug
Package debug interfaces Go runtime debugging facilities.
Package debug interfaces Go runtime debugging facilities.
internal/ethapi
Package ethapi implements the general Ethereum API functions.
Package ethapi implements the general Ethereum API functions.
internal/guide
Package guide is a small test suite to ensure snippets in the dev guide work.
Package guide is a small test suite to ensure snippets in the dev guide work.
internal/jsre
Package jsre provides execution environment for JavaScript.
Package jsre provides execution environment for JavaScript.
internal/jsre/deps
Package deps contains the console JavaScript dependencies Go embedded.
Package deps contains the console JavaScript dependencies Go embedded.
internal/web3ext
package web3ext contains geth specific web3.js extensions.
package web3ext contains geth specific web3.js extensions.
les
Package les implements the Light Ethereum Subprotocol.
Package les implements the Light Ethereum Subprotocol.
les/flowcontrol
Package flowcontrol implements a client side flow control mechanism Package flowcontrol implements a client side flow control mechanism
Package flowcontrol implements a client side flow control mechanism Package flowcontrol implements a client side flow control mechanism
light
Package light implements on-demand retrieval capable state and chain objects for the Ethereum Light Client.
Package light implements on-demand retrieval capable state and chain objects for the Ethereum Light Client.
log
Package log15 provides an opinionated, simple toolkit for best-practice logging that is both human and machine readable.
Package log15 provides an opinionated, simple toolkit for best-practice logging that is both human and machine readable.
metrics
Go port of Coda Hale's Metrics library <https://github.com/rcrowley/go-metrics> Coda Hale's original work: <https://github.com/codahale/metrics>
Go port of Coda Hale's Metrics library <https://github.com/rcrowley/go-metrics> Coda Hale's original work: <https://github.com/codahale/metrics>
metrics/exp
Hook go-metrics into expvar on any /debug/metrics request, load all vars from the registry into expvar, and execute regular expvar handler
Hook go-metrics into expvar on any /debug/metrics request, load all vars from the registry into expvar, and execute regular expvar handler
miner
Package miner implements Ethereum block creation and mining.
Package miner implements Ethereum block creation and mining.
mobile
Package geth contains the simplified mobile APIs to go-ethereum.
Package geth contains the simplified mobile APIs to go-ethereum.
node
Package node sets up multi-protocol Ethereum nodes.
Package node sets up multi-protocol Ethereum nodes.
p2p
Package p2p implements the Ethereum p2p network protocols.
Package p2p implements the Ethereum p2p network protocols.
p2p/discover
Package discover implements the Node Discovery Protocol.
Package discover implements the Node Discovery Protocol.
p2p/discv5
Package discv5 implements the RLPx v5 Topic Discovery Protocol.
Package discv5 implements the RLPx v5 Topic Discovery Protocol.
p2p/enr
Package enr implements Ethereum Node Records as defined in EIP-778.
Package enr implements Ethereum Node Records as defined in EIP-778.
p2p/nat
Package nat provides access to common network port mapping protocols.
Package nat provides access to common network port mapping protocols.
p2p/netutil
Package netutil contains extensions to the net package.
Package netutil contains extensions to the net package.
p2p/protocols
Package protocols is an extension to p2p.
Package protocols is an extension to p2p.
p2p/simulations
Package simulations simulates p2p networks.
Package simulations simulates p2p networks.
rlp
Package rlp implements the RLP serialization format.
Package rlp implements the RLP serialization format.
rpc
Package rpc implements bi-directional JSON-RPC 2.0 on multiple transports.
Package rpc implements bi-directional JSON-RPC 2.0 on multiple transports.
signer/rules/deps
Package deps contains the console JavaScript dependencies Go embedded.
Package deps contains the console JavaScript dependencies Go embedded.
swarm/api/http
A simple http server interface to Swarm
A simple http server interface to Swarm
swarm/bmt
Package bmt provides a binary merkle tree implementation used for swarm chunk hash Package bmt is a simple nonconcurrent reference implementation for hashsize segment based Binary Merkle tree hash on arbitrary but fixed maximum chunksize This implementation does not take advantage of any paralellisms and uses far more memory than necessary, but it is easy to see that it is correct.
Package bmt provides a binary merkle tree implementation used for swarm chunk hash Package bmt is a simple nonconcurrent reference implementation for hashsize segment based Binary Merkle tree hash on arbitrary but fixed maximum chunksize This implementation does not take advantage of any paralellisms and uses far more memory than necessary, but it is easy to see that it is correct.
swarm/network/simulations
You can run this simulation using go run ./swarm/network/simulations/overlay.go
You can run this simulation using go run ./swarm/network/simulations/overlay.go
swarm/pot
Package pot see doc.go Package pot (proximity order tree) implements a container similar to a binary tree.
Package pot see doc.go Package pot (proximity order tree) implements a container similar to a binary tree.
swarm/pss
Pss provides devp2p functionality for swarm nodes without the need for a direct tcp connection between them.
Pss provides devp2p functionality for swarm nodes without the need for a direct tcp connection between them.
swarm/pss/client
simple abstraction for implementing pss functionality the pss client library aims to simplify usage of the p2p.protocols package over pss IO is performed using the ordinary p2p.MsgReadWriter interface, which transparently communicates with a pss node via RPC using websockets as transport layer, using methods in the PssAPI class in the swarm/pss package Minimal-ish usage example (requires a running pss node with websocket RPC): import ( "context" "fmt" "os" pss "github.com/ie310mu/ie310go/forks/github.com/ethereum/go-ethereum/swarm/pss/client" "github.com/ie310mu/ie310go/forks/github.com/ethereum/go-ethereum/p2p/protocols" "github.com/ie310mu/ie310go/forks/github.com/ethereum/go-ethereum/p2p" "github.com/ie310mu/ie310go/forks/github.com/ethereum/go-ethereum/swarm/pot" "github.com/ie310mu/ie310go/forks/github.com/ethereum/go-ethereum/swarm/log" ) type FooMsg struct { Bar int } func fooHandler (msg interface{}) error { foomsg, ok := msg.(*FooMsg) if ok { log.Debug("Yay, just got a message", "msg", foomsg) } return errors.New(fmt.Sprintf("Unknown message")) } spec := &protocols.Spec{ Name: "foo", Version: 1, MaxMsgSize: 1024, Messages: []interface{}{ FooMsg{}, }, } proto := &p2p.Protocol{ Name: spec.Name, Version: spec.Version, Length: uint64(len(spec.Messages)), Run: func(p *p2p.Peer, rw p2p.MsgReadWriter) error { pp := protocols.NewPeer(p, rw, spec) return pp.Run(fooHandler) }, } func implementation() { cfg := pss.NewClientConfig() psc := pss.NewClient(context.Background(), nil, cfg) err := psc.Start() if err != nil { log.Crit("can't start pss client") os.Exit(1) } log.Debug("connected to pss node", "bzz addr", psc.BaseAddr) err = psc.RunProtocol(proto) if err != nil { log.Crit("can't start protocol on pss websocket") os.Exit(1) } addr := pot.RandomAddress() // should be a real address, of course psc.AddPssPeer(addr, spec) // use the protocol for something psc.Stop() } BUG(test): TestIncoming test times out due to deadlock issues in the swarm hive
simple abstraction for implementing pss functionality the pss client library aims to simplify usage of the p2p.protocols package over pss IO is performed using the ordinary p2p.MsgReadWriter interface, which transparently communicates with a pss node via RPC using websockets as transport layer, using methods in the PssAPI class in the swarm/pss package Minimal-ish usage example (requires a running pss node with websocket RPC): import ( "context" "fmt" "os" pss "github.com/ie310mu/ie310go/forks/github.com/ethereum/go-ethereum/swarm/pss/client" "github.com/ie310mu/ie310go/forks/github.com/ethereum/go-ethereum/p2p/protocols" "github.com/ie310mu/ie310go/forks/github.com/ethereum/go-ethereum/p2p" "github.com/ie310mu/ie310go/forks/github.com/ethereum/go-ethereum/swarm/pot" "github.com/ie310mu/ie310go/forks/github.com/ethereum/go-ethereum/swarm/log" ) type FooMsg struct { Bar int } func fooHandler (msg interface{}) error { foomsg, ok := msg.(*FooMsg) if ok { log.Debug("Yay, just got a message", "msg", foomsg) } return errors.New(fmt.Sprintf("Unknown message")) } spec := &protocols.Spec{ Name: "foo", Version: 1, MaxMsgSize: 1024, Messages: []interface{}{ FooMsg{}, }, } proto := &p2p.Protocol{ Name: spec.Name, Version: spec.Version, Length: uint64(len(spec.Messages)), Run: func(p *p2p.Peer, rw p2p.MsgReadWriter) error { pp := protocols.NewPeer(p, rw, spec) return pp.Run(fooHandler) }, } func implementation() { cfg := pss.NewClientConfig() psc := pss.NewClient(context.Background(), nil, cfg) err := psc.Start() if err != nil { log.Crit("can't start pss client") os.Exit(1) } log.Debug("connected to pss node", "bzz addr", psc.BaseAddr) err = psc.RunProtocol(proto) if err != nil { log.Crit("can't start protocol on pss websocket") os.Exit(1) } addr := pot.RandomAddress() // should be a real address, of course psc.AddPssPeer(addr, spec) // use the protocol for something psc.Stop() } BUG(test): TestIncoming test times out due to deadlock issues in the swarm hive
swarm/shed
Package shed provides a simple abstraction components to compose more complex operations on storage data organized in fields and indexes.
Package shed provides a simple abstraction components to compose more complex operations on storage data organized in fields and indexes.
swarm/storage/feed
Package feeds defines Swarm Feeds.
Package feeds defines Swarm Feeds.
swarm/storage/feed/lookup
Package lookup defines feed lookup algorithms and provides tools to place updates so they can be found
Package lookup defines feed lookup algorithms and provides tools to place updates so they can be found
swarm/storage/localstore
Package localstore provides disk storage layer for Swarm Chunk persistence.
Package localstore provides disk storage layer for Swarm Chunk persistence.
swarm/storage/mock
Package mock defines types that are used by different implementations of mock storages.
Package mock defines types that are used by different implementations of mock storages.
swarm/storage/mock/db
Package db implements a mock store that keeps all chunk data in LevelDB database.
Package db implements a mock store that keeps all chunk data in LevelDB database.
swarm/storage/mock/mem
Package mem implements a mock store that keeps all chunk data in memory.
Package mem implements a mock store that keeps all chunk data in memory.
swarm/storage/mock/rpc
Package rpc implements an RPC client that connect to a centralized mock store.
Package rpc implements an RPC client that connect to a centralized mock store.
swarm/storage/mock/test
Package test provides functions that are used for testing GlobalStorer implementations.
Package test provides functions that are used for testing GlobalStorer implementations.
tests
Package tests implements execution of Ethereum JSON tests.
Package tests implements execution of Ethereum JSON tests.
trie
Package trie implements Merkle Patricia Tries.
Package trie implements Merkle Patricia Tries.
whisper/mailserver
Package mailserver provides a naive, example mailserver implementation
Package mailserver provides a naive, example mailserver implementation
whisper/whisperv5
Package whisperv5 implements the Whisper protocol (version 5).
Package whisperv5 implements the Whisper protocol (version 5).

Jump to

Keyboard shortcuts

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