### Verify installation with CMake Source: https://github.com/ethereum/go-ethereum/blob/master/crypto/secp256k1/libsecp256k1/doc/release-process.md Tests the installation process and compiles an example using CMake configuration. ```shell dir=$(mktemp -d) build=$(mktemp -d) cmake -B $build -DCMAKE_INSTALL_PREFIX=$dir && cmake --build $build && cmake --install $build && ls -RlAh $dir gcc -o ecdsa examples/ecdsa.c -I $dir/include -L $dir/lib*/ -l secp256k1 -Wl,-rpath,"$dir/lib",-rpath,"$dir/lib64" && ./ecdsa ``` -------------------------------- ### Install go-metrics Source: https://github.com/ethereum/go-ethereum/blob/master/metrics/README.md Command to install the go-metrics library using go get. ```sh go get github.com/rcrowley/go-metrics ``` -------------------------------- ### Quick Start Geth Node with Docker Source: https://github.com/ethereum/go-ethereum/blob/master/README.md Runs a Geth node using Docker, setting up a persistent volume, mapping ports, and starting in snap-sync mode. This is a fast way to get a node running. ```shell docker run -d --name ethereum-node -v /Users/alice/ethereum:/root \ -p 8545:8545 -p 30303:30303 \ ethereum/client-go ``` -------------------------------- ### Verify installation with autotools Source: https://github.com/ethereum/go-ethereum/blob/master/crypto/secp256k1/libsecp256k1/doc/release-process.md Tests the installation process and compiles an example using autotools-generated configuration. ```shell dir=$(mktemp -d) ./autogen.sh && ./configure --prefix=$dir && make clean && make install && ls -RlAh $dir gcc -o ecdsa examples/ecdsa.c $(PKG_CONFIG_PATH=$dir/lib/pkgconfig pkg-config --cflags --libs libsecp256k1) -Wl,-rpath,"$dir/lib" && ./ecdsa ``` -------------------------------- ### Install and Initialize Smartcard Source: https://github.com/ethereum/go-ethereum/blob/master/accounts/scwallet/README.md Use the keycard-cli to install the smartcard application and initialize the card. This process generates a PIN, PUK, and pairing password. ```bash keycard install -a keycard_v2.2.1.cap && keycard init ``` -------------------------------- ### Install Debian Packaging Tools and Go Source: https://github.com/ethereum/go-ethereum/blob/master/build/ci-notes.md Installs essential build tools and the Go programming language required for Debian packaging. Ensure you have sudo privileges. ```bash sudo apt-get install build-essential golang-go devscripts debhelper python-bzrlib python-paramiko ``` -------------------------------- ### Install CMake and Pkg-Config files Source: https://github.com/ethereum/go-ethereum/blob/master/crypto/secp256k1/libsecp256k1/src/CMakeLists.txt Configures the installation path for CMake version files and generates a pkg-config file from a template. ```cmake ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} ) include(GeneratePkgConfigFile) generate_pkg_config_file(${PROJECT_SOURCE_DIR}/libsecp256k1.pc.in) install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig ) endif() ``` -------------------------------- ### Install StatHat Support for go-metrics Source: https://github.com/ethereum/go-ethereum/blob/master/metrics/README.md Command to install the StatHat Go client, which is a dependency for StatHat support in go-metrics. ```sh go get github.com/stathat/go ``` -------------------------------- ### Build the Geth executable Source: https://github.com/ethereum/go-ethereum/blob/master/README.md Use this command to build the main Geth executable. Ensure Go and a C compiler are installed. ```shell make geth ``` -------------------------------- ### Build with Autotools Source: https://github.com/ethereum/go-ethereum/blob/master/crypto/secp256k1/libsecp256k1/README.md Standard build process using Autotools. Optional installation requires sudo. ```bash $ ./autogen.sh # Generate a ./configure script $ ./configure # Generate a build system $ make # Run the actual build process $ make check # Run the test suite $ sudo make install # Install the library into the system (optional) ``` -------------------------------- ### Start Geth Console on Main Ethereum Network Source: https://github.com/ethereum/go-ethereum/blob/master/README.md Starts a Geth node in snap sync mode and opens the JavaScript console for interaction with the main Ethereum network. Use this for general interaction with the network. ```shell $ geth console ``` -------------------------------- ### Example Allocation Input File Source: https://github.com/ethereum/go-ethereum/blob/master/cmd/evm/README.md A JSON file defining the initial state of accounts, including balances and nonces. ```json { "0x8a8eafb1cf62bfbeb1741769dae1a9dd47996192": { "balance": "0xfeed1a9d", "nonce": "0x1" }, "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { "balance": "0x5ffd4878be161d74", "nonce": "0xac" }, "0xc94f5374fce5edbc8e2a8697c15331677e6ebf0b": { "balance": "0xa410" } } ``` -------------------------------- ### Execute CLI Transition Command Source: https://github.com/ethereum/go-ethereum/blob/master/cmd/evm/README.md Example command for running a state transition with specific inputs and fork configuration. ```bash # This should exit with 3 ./evm t8n --input.alloc=./testdata/1/alloc.json --input.txs=./testdata/1/txs.json --input.env=./testdata/1/env.json --state.fork=Frontier+1346 2>/dev/null exitcode:3 OK ``` -------------------------------- ### Install secp256k1 Target and Headers Source: https://github.com/ethereum/go-ethereum/blob/master/crypto/secp256k1/libsecp256k1/src/CMakeLists.txt Installs the secp256k1 target, its associated CMake export files, and header files. Conditionally includes headers for enabled modules. ```cmake if(SECP256K1_INSTALL) install(TARGETS secp256k1 EXPORT ${PROJECT_NAME}-targets RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ) set(${PROJECT_NAME}_headers "${PROJECT_SOURCE_DIR}/include/secp256k1.h" "${PROJECT_SOURCE_DIR}/include/secp256k1_preallocated.h" ) if(SECP256K1_ENABLE_MODULE_ECDH) list(APPEND ${PROJECT_NAME}_headers "${PROJECT_SOURCE_DIR}/include/secp256k1_ecdh.h") endif() if(SECP256K1_ENABLE_MODULE_RECOVERY) list(APPEND ${PROJECT_NAME}_headers "${PROJECT_SOURCE_DIR}/include/secp256k1_recovery.h") endif() if(SECP256K1_ENABLE_MODULE_EXTRAKEYS) list(APPEND ${PROJECT_NAME}_headers "${PROJECT_SOURCE_DIR}/include/secp256k1_extrakeys.h") endif() if(SECP256K1_ENABLE_MODULE_SCHNORRSIG) list(APPEND ${PROJECT_NAME}_headers "${PROJECT_SOURCE_DIR}/include/secp256k1_schnorrsig.h") endif() if(SECP256K1_ENABLE_MODULE_MUSIG) list(APPEND ${PROJECT_NAME}_headers "${PROJECT_SOURCE_DIR}/include/secp256k1_musig.h") endif() if(SECP256K1_ENABLE_MODULE_ELLSWIFT) list(APPEND ${PROJECT_NAME}_headers "${PROJECT_SOURCE_DIR}/include/secp256k1_ellswift.h") endif() install(FILES ${${PROJECT_NAME}_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ) install(EXPORT ${PROJECT_NAME}-targets FILE ${PROJECT_NAME}-targets.cmake NAMESPACE ${PROJECT_NAME}:: DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} ) include(CMakePackageConfigHelpers) configure_package_config_file( ${PROJECT_SOURCE_DIR}/cmake/config.cmake.in ${PROJECT_NAME}-config.cmake INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} NO_SET_AND_CHECK_MACRO ) write_basic_package_version_file(${PROJECT_NAME}-config-version.cmake COMPATIBILITY SameMinorVersion ) install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake ``` -------------------------------- ### Start Geth Monitoring Tool Source: https://github.com/ethereum/go-ethereum/wiki/Metrics-and-Monitoring Initiates the terminal-based monitoring UI to track specific metrics from a Geth node. ```bash geth monitor [--attach=api-endpoint] metric1 metric2 ... metricN ``` -------------------------------- ### EOF Corpus Example 2 Source: https://github.com/ethereum/go-ethereum/blob/master/cmd/evm/testdata/eof/eof_corpus_0.txt This is the second example from the EOF corpus, representing a specific byte sequence. ```plaintext 0xff01010100040200010001040000000080000000 ``` -------------------------------- ### EOF Corpus Example 1 Source: https://github.com/ethereum/go-ethereum/blob/master/cmd/evm/testdata/eof/eof_corpus_0.txt This is the first example from the EOF corpus, representing a specific byte sequence. ```plaintext 0xff00010100040200010001040000000080000000 ``` -------------------------------- ### Example Result Output File Source: https://github.com/ethereum/go-ethereum/blob/master/cmd/evm/README.md A JSON file containing the state transition results, including roots, receipts, and any rejected transactions. ```json { "stateRoot": "0x84208a19bc2b46ada7445180c1db162be5b39b9abc8c0a54b05d32943eae4e13", "txRoot": "0xc4761fd7b87ff2364c7c60b6c5c8d02e522e815328aaea3f20e3b7b7ef52c42d", "receiptsRoot": "0x056b23fbba480696b65fe5a59b8f2148a1299103c4f57df839233af2cf4ca2d2", "logsHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "receipts": [ { "root": "0x", "status": "0x1", "cumulativeGasUsed": "0x5208", "logsBloom": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "logs": null, "transactionHash": "0x0557bacce3375c98d806609b8d5043072f0b6a8bae45ae5a67a00d3a1a18d673", "contractAddress": "0x0000000000000000000000000000000000000000", "gasUsed": "0x5208", "blockHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "transactionIndex": "0x0" } ], "rejected": [ { "index": 1, "error": "nonce too low: address 0x8A8eAFb1cf62BfBeb1741769DAE1a9dd47996192, tx: 0 state: 1" } ], "currentDifficulty": "0x20000", "gasUsed": "0x5208" } ``` -------------------------------- ### EOF Corpus Example 4 Source: https://github.com/ethereum/go-ethereum/blob/master/cmd/evm/testdata/eof/eof_corpus_0.txt This is the fourth example from the EOF corpus, representing a specific byte sequence. ```plaintext 0xfffe010100040200010001040000000080000000 ``` -------------------------------- ### EOF Corpus Example 5 Source: https://github.com/ethereum/go-ethereum/blob/master/cmd/evm/testdata/eof/eof_corpus_0.txt This is the fifth example from the EOF corpus, representing a specific byte sequence. ```plaintext 0xffff010100040200010001040000000080000000 ``` -------------------------------- ### Open Smartcard Wallet (Usage Example) Source: https://github.com/ethereum/go-ethereum/blob/master/accounts/scwallet/README.md Open the smartcard wallet using its URL. You will be prompted for your pairing password and then your PIN. ```javascript personal.openWallet("keycard://a4d73015") ``` -------------------------------- ### EOF Corpus Example 3 Source: https://github.com/ethereum/go-ethereum/blob/master/cmd/evm/testdata/eof/eof_corpus_0.txt This is the third example from the EOF corpus, representing a specific byte sequence. ```plaintext 0xff02010100040200010001040000000080000000 ``` -------------------------------- ### EOF Bytecode Example 7 Source: https://github.com/ethereum/go-ethereum/blob/master/cmd/evm/testdata/eof/eof_corpus_0.txt An EOF bytecode snippet with a specific section size and data. ```Assembly 0xef0001010004020001000404000000008000016000e100 ``` -------------------------------- ### EOF Bytecode Example 11 Source: https://github.com/ethereum/go-ethereum/blob/master/cmd/evm/testdata/eof/eof_corpus_0.txt An EOF bytecode snippet with a specific section size and data. ```Assembly 0xef0001010004020001000404000000008000025f5f00fd ``` -------------------------------- ### EOF Bytecode Example 12 Source: https://github.com/ethereum/go-ethereum/blob/master/cmd/evm/testdata/eof/eof_corpus_0.txt An EOF bytecode snippet with a specific section size and data. ```Assembly 0xef0001010004020001000404000000008000025f5f00fe ``` -------------------------------- ### EOF Bytecode Example 10 Source: https://github.com/ethereum/go-ethereum/blob/master/cmd/evm/testdata/eof/eof_corpus_0.txt An EOF bytecode snippet with a specific section size and data. ```Assembly 0xef0001010004020001000404000000008000025f5f00f3 ``` -------------------------------- ### EOF Bytecode Example 2 Source: https://github.com/ethereum/go-ethereum/blob/master/cmd/evm/testdata/eof/eof_corpus_0.txt An EOF bytecode snippet with a specific section size and termination. ```Assembly 0xef000101000402000100040400000000800000e0000100 ``` -------------------------------- ### Initialize InfluxDB Reporter Source: https://github.com/ethereum/go-ethereum/blob/master/metrics/influxdb/README.md Use this to configure and start reporting metrics to InfluxDB. Ensure your InfluxDB instance is accessible and version 0.9+. ```go import "github.com/vrischmann/go-metrics-influxdb" go influxdb.InfluxDB( metrics.DefaultRegistry, // metrics registry time.Second * 10, // interval "http://localhost:8086", // the InfluxDB url "mydb", // your InfluxDB database "myuser", // your InfluxDB user "mypassword", // your InfluxDB password ) ``` -------------------------------- ### EOF Bytecode Example 6 Source: https://github.com/ethereum/go-ethereum/blob/master/cmd/evm/testdata/eof/eof_corpus_0.txt An EOF bytecode snippet with a specific section size and data. ```Assembly 0xef00010100040200010004040000000080000160005000 ``` -------------------------------- ### EOF Bytecode Example 9 Source: https://github.com/ethereum/go-ethereum/blob/master/cmd/evm/testdata/eof/eof_corpus_0.txt An EOF bytecode snippet with a specific section size and data. ```Assembly 0xef000101000402000100040400000000800001e1000000 ``` -------------------------------- ### EOF Bytecode Example 8 Source: https://github.com/ethereum/go-ethereum/blob/master/cmd/evm/testdata/eof/eof_corpus_0.txt An EOF bytecode snippet with a specific section size and data. ```Assembly 0xef0001010004020001000404000000008000016001e200 ``` -------------------------------- ### EOF Bytecode Example 3 Source: https://github.com/ethereum/go-ethereum/blob/master/cmd/evm/testdata/eof/eof_corpus_0.txt An EOF bytecode snippet with a specific section size and an error code. ```Assembly 0xef000101000402000100040400000000800000e0fffd00 ``` -------------------------------- ### EOF Bytecode Example 13 Source: https://github.com/ethereum/go-ethereum/blob/master/cmd/evm/testdata/eof/eof_corpus_0.txt An EOF bytecode snippet with a specific section size and data. ```Assembly 0xef0001010004020001000404000000008000025fe70000 ``` -------------------------------- ### EOF Bytecode Example 5 Source: https://github.com/ethereum/go-ethereum/blob/master/cmd/evm/testdata/eof/eof_corpus_0.txt An EOF bytecode snippet with a specific section size and a final error code. ```Assembly 0xef000101000402000100040400000000800000e0ffff00 ``` -------------------------------- ### Basic EOF Code Structure Source: https://github.com/ethereum/go-ethereum/blob/master/cmd/evm/testdata/eof/eof_corpus_0.txt A fundamental EOF bytecode structure. This example demonstrates the basic header and code section. ```hex 0xef0001010004020001ffff ``` -------------------------------- ### EOF Bytecode Example 4 Source: https://github.com/ethereum/go-ethereum/blob/master/cmd/evm/testdata/eof/eof_corpus_0.txt An EOF bytecode snippet with a specific section size and a different error code. ```Assembly 0xef000101000402000100040400000000800000e0fffe00 ```