pinax-network / eos-evm-miner Goto Github PK
View Code? Open in Web Editor NEWEOS EVM miner
License: MIT License
EOS EVM miner
License: MIT License
eth_estimateGas
JSON RPC call https://www.quicknode.com/docs/ethereum/eth_estimateGaseth_getTransactionCount
Method required for get nonce for sign tx.
/v1/chain/get_info
endpoint to the miner for monitoringCurrently 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
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.
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:
eth_getPrice
to ensure eos node connectivity./v1/chain/get_info
endpoint to the miner for monitoringI have explored alternative solutions for improving the miner functionality. Some alternatives considered were:
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.
eth_sendRawTransaction
Add prometheus exporter to the miner with count the number of transactions sent via eth_sendRawTransaction
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.
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.
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.
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.
$ 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
net_version
JSON RPC call https://www.quicknode.com/docs/ethereum/net_versioneth_getBalance
JSON RPC call https://www.quicknode.com/docs/ethereum/eth_getBalancehttps://github.com/pinax-network/eos-evm-miner/blob/main/src/eth_getBalance.ts#LL5C5-L5C5
Metamask using batch of address to query all address balance at once. Limited getBalance call for only one address flow error
Error log
Received {"id":7321810095480698,"jsonrpc":"2.0","method":"eth_getBalance","params":["0x2293a13d4d812a845eb115a91f215ec20e1685ec","0x5d0468"]} undefined
Line 78 in df665a6
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.
If we're running in "production" mode, I don't want to see all the internal URLs. https://jungle4.rpc.eosnation.io:8545/
Else I need to override this page so not leak internal info.
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"}
eth_getBlockByNumber
JSON RPC call https://www.quicknode.com/docs/ethereum/eth_getBlockByNumberI 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
Set max_cpu_usage_ms
as an argument when pushing a transaction
eth_chainId
JSON RPC calleth_blockNumber
JSON RPC call https://www.quicknode.com/docs/ethereum/eth_blockNumberdelta of get info - genesis_time = block number on EVM
eth_getCode
JSON RPC call https://www.quicknode.com/docs/ethereum/eth_getCodeIt would be nicer to support floating gas prices without DEFAULT_LOCK_GAS_PRICE_FILE set.
Refer to
https://github.com/eosnetworkfoundation/eos-evm-miner/blob/main/src/miner.ts#LL86C1-L111C30
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.