GithubHelp home page GithubHelp logo

eos-evm-miner's People

Contributors

deniscarriere avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

eos-evm-miner's Issues

๐Ÿš€ Feature request: Health check Metrics for Monitoring

  • Add /v1/chain/get_info endpoint to the miner for monitoring

โŒ ChatGPT

About

Currently miner only providing two function eth_getPrice and eth_sendRawTransaction. eth_getPrice is the providing local value instead of remote value from EOS nodes rpc. There are too many factor to cause eth_sendRawTransaction not working property

Is your proposal related to a problem?

The current functionality of the miner has limitations that make it difficult to control and debug in certain environments. Specifically, the eth_getPrice function provides a local value instead of fetching the remote value from the EOS node RPC. Additionally, there are multiple factors that can cause issues with the eth_sendRawTransaction function, further complicating the debugging process.

Describe the solution you'd like

I would like to propose the addition of Health Check Metrics for Monitoring to enhance the miner functionality. This feature would address the existing limitations and provide a more reliable and manageable environment for controlling and debugging. The Health Check Metrics would serve the following purposes:

  • Fetching the remote value from the EOS node RPC periodically for eth_getPrice to ensure eos node connectivity.
  • Expose /v1/chain/get_info endpoint to the miner for monitoring

Describe alternatives you've considered

I have explored alternative solutions for improving the miner functionality. Some alternatives considered were:

  1. Using the existing eth_getPrice function as the health probe. However, this approach would only should the miner status and not ensure all function work properly.

Additional context

Adding Health Check Metrics for Monitoring would greatly enhance the usability and reliability of the miner. It would provide developers with accurate data and better visibility into any potential issues, enabling them to monitor and maintain the system more effectively. This feature request aligns with the goal of improving the overall user experience and ensuring smooth operation of the application.

Please let me know if you need any further information or if there are any specific requirements for the feature request.

๐Ÿš€ Feature request: Count the number of transactions sent via eth_sendRawTransaction

  • Add prometheus exporter
    • count the number of transactions sent via eth_sendRawTransaction

โŒ ChatGPT

About

Add prometheus exporter to the miner with count the number of transactions sent via eth_sendRawTransaction

Is your proposal related to a problem?

Currently, there is no built-in functionality in the miner to count the number of transactions sent via the eth_sendRawTransaction function. This lack of visibility makes it challenging to track and analyse the transaction volume, which can be crucial for monitoring and optimising system performance.

Describe the solution you'd like

I would like to propose the addition of a transaction counter feature to the miner. This feature would provide the capability to count the number of transactions sent using the eth_sendRawTransaction function. The transaction counter would increment every time a transaction is successfully sent, allowing users to accurately monitor and analyze the transaction volume over time.

Describe alternatives you've considered

While there are alternative methods to count transactions sent via eth_sendRawTransaction, such as tracking events on chain event by the specific miner, these approaches can be cumbersome and time-consuming. Having an integrated transaction counter within the miner would offer a more convenient and efficient solution for users.

Additional context

The transaction counter feature would significantly enhance the usability and monitoring capabilities of the miner. It would enable developers to gain insights into the transaction volume and assess the impact of changes or optimizations made to the system. This feature request aligns with the goal of providing users with valuable metrics and enhancing their ability to monitor and manage their EVM transactions effectively.

Please let me know if you need any further information or if there are any specific requirements for the feature request.

Remove jayson dependency since not ESM

  • must be ESM compatible
  • must work with bun
$ bun ./bin/cli.ts start
[0.06ms] ".env"
1071 |   _dispatchSubcommand(commandName, operands, unknown) {
1072 |     const subCommand = this._findCommand(commandName);
1073 |     if (!subCommand) this.help({ error: true });
1074 | 
1075 |     let hookResult;
1076 |     hookResult = this._chainOrCallSubCommandHook(hookResult, subCommand, 'preSubcommand');
                     ^
ReferenceError: Cannot access uninitialized variable.
      at _dispatchSubcommand (/Users/denis/Github/eos-evm-miner/node_modules/commander/lib/command.js:1076:17)
      at parse (/Users/denis/Github/eos-evm-miner/node_modules/commander/lib/command.js:909:4)
      at /Users/denis/Github/eos-evm-miner/bin/cli.ts:29:0

The local address is hardcoded

EOS EVM Miner listening @ http://127.0.0.1:${port.toString()}

127.0.0.1 binds it only to the localhost
0.0.0.0 binds to all IP addresses
There is no option to define which interface is listening.

Hard coded 127.0.0.1 is confusing.

remove default value of `--lock-genesis-time`

https://github.com/pinax-network/eos-evm-miner/blob/main/src/eth_blockNumber.ts

I am facing incorrect return value from miner endpoint. I think it is related to the wrong calculation within eth_blockNumber.ts. Metamask based on the latest block number to query tx count. Therefore, it related a incorrect value:

Request:

curl http://jungle4evm-arch41.mar.eosn.io:50305 -X POST --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":83}'

Result from miner:

{"jsonrpc":"2.0","id":83,"result":"0x5d1537"}

Result from rpc:

{"id":83,"jsonrpc":"2.0","result":"0x6e3d16"}

Fail to getting gas price from nodeos

I am trying to call the eth_gasPrice without setting a lock gas price. Referring to the code, the miner should able to get the price from chain.

From pinax-network/eos-evm-miner
Server side error

2023-06-08 12:00:32.521	ERROR		Error getting gas price from nodeos: TypeError: fetch failed

Client side error

{"jsonrpc":"2.0","id":1,"error":{"code":-32000,"message":"There was an error getting the gas price from this EOS EVM miner."}}

From the original repo,
Values can be fetched successfully from tx_wrapper
Server side logs

number of RPC endpoints = 1, using http://jungle4-nodeos-peer.service.march.consul.eosn.io:8888
server is listening at 127.0.0.1:3335
{"method":"eth_gasPrice","params":[],"id":1,"jsonrpc":"2.0"}
result: 150000000000

Client Result

{"jsonrpc":"2.0","id":1,"result":"0x22ecb25c00"}

Source code: https://github.com/eosnetworkfoundation/eos-evm/blob/main/peripherals/tx_wrapper/index.js#LL139C1-L153C1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.