Skip to content

Releases: pinax-network/eos-evm-miner

v0.5.2

16 Oct 15:10
Compare
Choose a tag to compare
  • Update tests to latest Bun v1.0
  • Update @wharfkit to latest v1.0

v0.5.1

14 Jul 02:38
Compare
Choose a tag to compare
$ docker pull ghcr.io/pinax-network/eos-evm-miner:latest

v0.5.0

15 Jun 02:02
Compare
Choose a tag to compare

What's new? 🚀

  • Middleware now able to proxy all missing JSON RPC requests to EVM RPC endpoint
  • Add the ability to show or hide endpoints & miner details
    • --show-miner flag or SHOW_MINER .env
    • --show-endpoints flag or SHOW_ENDPOINTS .env
  • Fix proxy logging

example

# JSON RPC (optional)
SHOW_MINER=true
SHOW_ENDPOINTS=false
image

CLI

eos-evm-miner start --help
Usage: @enf/eos-evm-miner start [options]

Start JSON RPC Server

Options:
  --private-key <string>                                  Miner private key (ex: "PVT_K1_...")
  --actor <string>                                        Miner account name (ex: "miner.enf")
  --permission <string>', 'Miner permission (ex: active)
  -p --port <int>                                         JSON RPC listens on port number, listen for incoming Ethereum transactions. (default: "50305")
  --hostname <string>                                     JSON RPC listens on hostname, listen for incoming Ethereum transactions (ex: "127.0.0.1)"
  --metrics-listen-port <int>                             The process will listen on this port for Prometheus metrics requests (default: "9102")
  --metrics-disabled                                      If set, will not send metrics to Prometheus
  --verbose                                               Enable verbose logging
  --lock-gas-price                                        Lock gas price as hex value (ex: "0x22ecb25c00")
  --lock-chain-id                                         Lock chain ID as hex value (ex: "0x4571")
  --lock-genesis-time                                     Lock genesis time (ex: "2023-04-05T02:18:09")
  --rpc-endpoint                                          EOS RPC endpoint (ex: "https://eos.api.eosnation.io")
  --rpc-evm-endpoint                                      EOS RPC endpoint (ex: "https://api.evm.eosnetwork.com")
  --show-endpoints                                        If set, will display all RPC endpoints used by the server
  --show-miner                                            If set, will display all miner account details used by the server
  -h, --help                                              display help for command

.env

# miner (required)
PRIVATE_KEY=PVT_K1_...
MINER_ACCOUNT=miner.enf

# miner (optional)
MINER_PERMISSION=active

# RPC EOS (optional)
RPC_ENDPOINT=https://eos.api.eosnation.io
CHAIN_ID=aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906

# RPC EVM (optional)
RPC_EVM_ENDPOINT=https://api.evm.eosnetwork.com

# JSON RPC (optional)
PORT=50305
HOSTNAME=127.0.0.1
LOCK_GAS_PRICE=0x22ecb25c00
LOCK_CHAIN_ID=0x4571
LOCK_GENESIS_TIME="2023-04-05T02:18:09"
SHOW_MINER=true
SHOW_ENDPOINTS=false

# Prometheus Metrics
PROMETHEUS_PORT=9102
METRICS_DISABLED=false

# CLI (optional)
VERBOSE=true

v0.4.4

14 Jun 20:35
Compare
Choose a tag to compare
  • Improve logging messages
  • Add cache functionality for eth_getCode

{"0":"💾 cache::read:HIT","1":{"method":"eth_getCode","file":"0xc00592aa41d32d137dc480d9f6d0df19b860104f","filepath":"/var/folders/mm/46m31dr97v1_k02y_ftl10lh0000gn/T/eos-evm-miner/eth_getCode/0xc00592aa41d32d137dc480d9f6d0df19b860104f"},"_meta":{"runtime":"Nodejs","runtimeVersion":"v18.15.0","hostname":"Deniss-MacBook-Pro.local","date":"2023-06-14T20:31:43.019Z","logLevelId":3,"logLevelName":"INFO","path":{}}}

image

v0.4.3

14 Jun 17:50
Compare
Choose a tag to compare

v0.4.2

14 Jun 14:18
Compare
Choose a tag to compare
  • add eth_call
  • add version to banner

v0.4.1

13 Jun 21:31
Compare
Choose a tag to compare
  • Prometheus log fixes
  • add eth_getCode as native JSON RPC request instead of EVM proxy

v0.4.0

13 Jun 19:44
Compare
Choose a tag to compare

New 🌟 JSON RPC methods (Request to EOS RPC)

  • eth_gasPrice - Returns the current gas price on the network in wei.
  • eth_sendRawTransaction - Creates new message call transaction or a contract creation for signed transactions.
  • eth_chainId - Returns the current network/chain ID, used to sign replay-protected transaction introduced in EIP-155.
  • eth_blockNumber - Returns the latest block number of the blockchain.
  • eth_getBalance - Returns the balance of given account address in wei.
  • net_version - Returns the current network id.
  • eth_getCode - Returns the compiled bytecode of a smart contract.

New 🌟 JSON RPC methods (Proxy to EVM RPC)

  • eth_estimateGas - Returns an estimation of gas for a given transaction.
  • eth_getTransactionCount - Returns the number of transactions sent from an address.
  • eth_getTransactionReceipt - Returns the receipt of a transaction by transaction hash.
  • eth_getBlockByHash - Returns information of the block matching the given block hash.
  • eth_getBlockByNumber - Returns information of the block matching the given block number.

JSON RPC methods (Request to EOS RPC)

  • eth_gasPrice - Returns the current gas price on the network in wei.
  • eth_sendRawTransaction - Creates new message call transaction or a contract creation for signed transactions.
  • eth_chainId - Returns the current network/chain ID, used to sign replay-protected transaction introduced in EIP-155.

New 🌟.env & CLI updates

  • add EVM_RPC_ENDPOINT env & --rpc-evm-endpoint flag
  • add --rpc-endpoint flag
# EOS RPC (optional)
RPC_ENDPOINT=https://eos.api.eosnation.io
CHAIN_ID=aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906

# EVM RPC (optional)
EVM_RPC_ENDPOINT=https://api.evm.eosnetwork.com

CLI

eos-evm-miner start --help
Usage: @enf/eos-evm-miner start [options]

Start JSON RPC Server

Options:
  --private-key <string>       Miner private key (ex: "PVT_K1_...")
  --account <string>           Miner account name (ex: "miner.evm")
  --permission <string>        Miner permission (default: "active")
  -p --port <int>              JSON RPC listens on port number, listen for
                               incoming Ethereum transactions. (default:
                               "50305")
  --hostname <string>          JSON RPC listens on hostname, listen for
                               incoming Ethereum transactions (ex: "127.0.0.1)"
  --metrics-listen-port <int>  The process will listen on this port for
                               Prometheus metrics requests (default: "9102")
  --metrics-disabled           If set, will not send metrics to Prometheus
  --verbose                    Enable verbose logging
  --lock-gas-price             Lock gas price as hex value (ex: "0x22ecb25c00")
  --lock-chain-id              Lock chain ID as hex value (ex: "0x4571")
  --lock-genesis-time          Lock genesis time (ex: "2023-04-05T02:18:09")
  --rpc-endpoint               EOS RPC endpoint (ex:
                               "https://eos.api.eosnation.io")
  --rpc-evm-endpoint           EOS RPC endpoint (ex:
                               "https://api.evm.eosnetwork.com")
  -h, --help                   display help for command

.env

# miner (required)
PRIVATE_KEY=PVT_K1_...
MINER_ACCOUNT=miner.enf

# miner (optional)
MINER_PERMISSION=active

# RPC EOS (optional)
RPC_ENDPOINT=https://eos.api.eosnation.io
CHAIN_ID=aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906

# RPC EVM (optional)
RPC_EVM_ENDPOINT=https://api.evm.eosnetwork.com

# JSON RPC (optional)
PORT=50305
HOSTNAME=127.0.0.1
LOCK_GAS_PRICE=0x22ecb25c00
LOCK_CHAIN_ID=0x4571

# Prometheus Metrics
PROMETHEUS_PORT=9102
METRICS_DISABLED=false

# CLI (optional)
VERBOSE=true

v0.3.2

12 Jun 20:34
Compare
Choose a tag to compare
  • Fix eth_sendRawTransaction issue

v0.3.1

09 Jun 20:51
Compare
Choose a tag to compare
  • add GET / landing page EOS EVM Miner details
  • add GET /v1/chain/get_info applied to all GET requests (except /)
  • Added Prometheus metrics http://localhost:9102/
  • add HOSTNAME .env or CLI argument --hostname

Help

$ eos-evm-miner start --help

Usage: @enf/eos-evm-miner start [options]

Start JSON RPC Server

Options:
  --private-key <string>       Miner private key (ex: "PVT_K1_...")
  --account <string>           Miner account name (ex: "miner.evm")
  --permission <string>        Miner permission (default: "active")
  -p --port <int>              JSON RPC listens on port number, listen for
                               incoming Ethereum transactions. (default:
                               "50305")
  --hostname <string>          JSON RPC listens on hostname, listen for
                               incoming Ethereum transactions (ex: "127.0.0.1)"
  --metrics-listen-port <int>  The process will listen on this port for
                               Prometheus metrics requests (default: "9102")
  --metrics-disabled           If set, will not send metrics to Prometheus
  --verbose                    Enable verbose logging
  --lock-gas-price             Lock gas price as hex value (ex: "0x22ecb25c00")
  -h, --help                   display help for command

Prometheus Metrics

# HELP eth_gas_price_requests The number of eth_gasPrice errors from request received
# TYPE eth_gas_price_requests counter
eth_gas_price_requests 3

# HELP eth_gas_price_success The number of eth_gasPrice successful request received
# TYPE eth_gas_price_success counter
eth_gas_price_success 3

# HELP eth_send_raw_transaction_requests The number of eth_sendRawTransaction errors from request received
# TYPE eth_send_raw_transaction_requests counter
eth_send_raw_transaction_requests 2

# HELP eth_send_raw_transaction_success The number of eth_sendRawTransaction successful request received
# TYPE eth_send_raw_transaction_success counter
eth_send_raw_transaction_success 0

Environment Variables

.env

# miner (required)
PRIVATE_KEY=PVT_K1_...
MINER_ACCOUNT=miner.enf

# miner (optional)
MINER_PERMISSION=active

# Nodeos (optional)
RPC_ENDPOINT=https://eos.greymass.com
CHAIN_ID=aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906

# JSON RPC (optional)
PORT=50305
HOSTNAME=127.0.0.1
LOCK_GAS_PRICE=0x22ecb25c00

# Prometheus Metrics
PROMETHEUS_PORT=9102
METRICS_DISABLED=false

# CLI (optional)
VERBOSE=true