Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Online is when the implementation is permitted // to make outbound connections. Online Mode = "ONLINE" // Offline is when the implementation is not permitted // to make outbound connections. Offline Mode = "OFFLINE" // Mainnet is the Ethereum Mainnet. Mainnet string = "MAINNET" // Goerli is the Ethereum Görli testnet. Goerli string = "GOERLI" // Sepolia is the Ethereum Sepolia testnet. Sepolia string = "SEPOLIA" // Testnet defaults to `Ropsten` for backwards compatibility (even though we don't have a ropsten network on Optimism). Testnet string = "TESTNET" // DataDirectory is the default location for all // persistent data. DataDirectory = "/data" // ModeEnv is the environment variable read // to determine mode. ModeEnv = "MODE" // NetworkEnv is the environment variable // read to determine network. NetworkEnv = "NETWORK" // PortEnv is the environment variable // read to determine the port for the Rosetta // implementation. PortEnv = "PORT" // GethEnv is an optional environment variable // used to connect rosetta-ethereum to an already // running geth node. GethEnv = "GETH" // DefaultGethURL is the default URL for // a running geth node. This is used // when GethEnv is not populated. DefaultGethURL = "http://localhost:8545" // Tiemout of L2 Geth HTTP Client in seconds L2GethHTTPTimeoutEnv = "L2_GETH_HTTP_TIMEOUT" // Maximum number of concurrent debug_trace RPCs issued to nodes // debug tracing is an expensive operation that can DoS a node // if one is not careful MaxConcurrentTracesEnv = "MAX_CONCURRENT_TRACES" // MiddlewareVersion is the version of rosetta-ethereum. MiddlewareVersion = "0.0.4" // Experimental: Maintain a cache of debug traces EnableTraceCacheEnv = "ENABLE_TRACE_CACHE" // Configures the size of the trace cache TraceCacheSizeEnv = "TRACE_CACHE_SIZE" // Experimental: Use newly added built-in geth tracer EnableGethTracer = "ENABLE_GETH_TRACER" // Experimental: Custom Bedrock op-geth Tracer EnableCustomBedrockTracerEnv = "ENABLE_CUSTOM_BEDROCK_TRACER" // TokenFilterEnv is the environment variable // read to determine if we will filter tokens // using our token white list // NOTE: this is enabled by default TokenFilterEnv = "FILTER_TOKEN" // Whether to construct traces using debug_traceBlockByHash or debug_traceTransaction // By default, optimism-rosetta batches calls to debug_traceTransaction to lighten the load on downstream geth clients // DEFAULT: `false` TraceByBlockEnv = "TRACE_BY_BLOCK" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { Mode Mode Network *types.NetworkIdentifier GenesisBlockIdentifier *types.BlockIdentifier GethURL string RemoteGeth bool Port int GethArguments string L2GethHTTPTimeout time.Duration MaxConcurrentTraces int64 EnableTraceCache bool TraceCacheSize int EnableGethTracer bool TokenFilter bool SupportsSyncing bool EnableCustomBedrockTracer bool TraceByBlock bool // Block Reward Data Params *params.ChainConfig }
Configuration determines how
func LoadConfiguration ¶
func LoadConfiguration() (*Configuration, error)
LoadConfiguration attempts to create a new Configuration using the ENVs in the environment.
Click to show internal directories.
Click to hide internal directories.