-
Notifications
You must be signed in to change notification settings - Fork 20.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gasPrice RPC gives back number instead of HEX #370
Comments
Currently is reporting the value from string const at Line 29 in 483d96a
|
Currently: {
"id":73,
"jsonrpc":"2.0",
"result":"1000000000"
} expect: {
"id":73,
"jsonrpc":"2.0",
"result":"0x09184e72a000"
} |
What's the benefit of giving the result in hex? Wouldn't it make more sense to change the specification to show it in base 10? |
I think some of the "hex result" might have to do with lack of large number support in JavaScript. Maybe @debris could provide some insight? |
I thought we were using bignumber.js to work around that. |
its the big number i guess. in ethereum js the hex is change into a big number. |
bignumber.js can handle decimal numbers in strings as well. The real issue is that we have differences in cpp && go ethereum json-rpc api. Go is already returning hex for balance rpc method. Let's unify this && return hex for all value related properties. |
* merge geth v1.10.15 * fix: Removed FastSync from cli server * fix: TestHeadersRLPStorage * Added t.skip(ETH2 in bor) * fix: flow in create consensus engine * bumped version * Fix typo * increase block time * remove file * bumped version * merge gethv1.10.17 * bumped version * fix failing tests * Bump Go version to v1.18 (ethereum#368) * Bump Go version to v1.18.1 * Build using netgo tag This will create a static build using Go native networking stack. Checked and it works stable for all archs and distros. * Fix meta * initial implementation for common ancestor approach * extract whitelist interface * fix types * fix tests and format * add unit tests for IsValidChain function * more tests * wip * test ErrCheckpointMismatch * minor fixes * fix test * dont panic * fmt * Limit state sync by gas * Added logging for state-sync total gas usage * Added number of event-records in log * Minor Changes * Minor Fix * Adding individual gasUsed * Minor Fix * fix: return value for no remote block * handle all errors * modularise fake chain validator in downloader * add more tests * fix tests * Modifying miner.recommit flag and its adjustment function. (ethereum#370) * changed min/max/current recommit values * Remove Hardcoded min/max * Code Sanitization * Skipping tests for constant recommit interval * Adding default miner.recommit value * Minor Change * Increased default value of rpc.txfeecap to 5 * add debug rpc endpoints for checkpoint whitelist service * minor fixes and enhancements * avoid capping warnings for gas set by internal system transactions * use typed mocks * fix * fix * fix * fix close * fix * Create stale.yml * Fix bor consensus checkpoint bug Co-authored-by: Arpit Temani <[email protected]> Co-authored-by: Shivam Sharma <[email protected]> Co-authored-by: Manav Darji <[email protected]> Co-authored-by: Sandeep Sreenath <[email protected]> Co-authored-by: Victor Castell <[email protected]> Co-authored-by: Ferran <[email protected]> Co-authored-by: Krishna Upadhyaya <[email protected]> Co-authored-by: Karlo <[email protected]> Co-authored-by: Sandeep Sreenath <[email protected]> Co-authored-by: Jerry <[email protected]>
* instructions: add access witness recording for EXTCODEHASH * add test for EXTCODEHASH witness recording * add test for access witness EXTCODEHASH Signed-off-by: Ignacio Hagopian <[email protected]> * do not touch version Signed-off-by: Ignacio Hagopian <[email protected]> --------- Signed-off-by: Ignacio Hagopian <[email protected]>
When only a single CPU is available: * Avoid creating threads in StateDB.IntermediateRoot * Force single threaded hashing
Fix nil Error in function reportBlock
The docs state it should return a HEX, though it returns a number as string:
https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_gasprice
The text was updated successfully, but these errors were encountered: