Skip to content
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

Closed
frozeman opened this issue Feb 23, 2015 · 7 comments
Closed

gasPrice RPC gives back number instead of HEX #370

frozeman opened this issue Feb 23, 2015 · 7 comments
Assignees

Comments

@frozeman
Copy link
Contributor

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

@tgerring
Copy link
Contributor

Currently is reporting the value from string const at

defaultGasPrice = "10000000000000"

@frozeman
Copy link
Contributor Author

Currently:

{
"id":73,
"jsonrpc":"2.0",
"result":"1000000000"
}

expect:

{
"id":73,
"jsonrpc":"2.0",
"result":"0x09184e72a000"
}

@maran
Copy link
Member

maran commented Feb 23, 2015

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?

@tgerring
Copy link
Contributor

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?

@maran
Copy link
Member

maran commented Feb 23, 2015

I thought we were using bignumber.js to work around that.

tgerring added a commit to tgerring/go-ethereum that referenced this issue Feb 24, 2015
@frozeman
Copy link
Contributor Author

its the big number i guess. in ethereum js the hex is change into a big number.

@debris
Copy link
Contributor

debris commented Feb 24, 2015

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.

maoueh pushed a commit to streamingfast/go-ethereum that referenced this issue Dec 9, 2022
)

* 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
maoueh pushed a commit to streamingfast/go-ethereum that referenced this issue Dec 9, 2022
* 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]>
weiihann pushed a commit to weiihann/go-ethereum that referenced this issue Mar 13, 2024
* 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]>
mralj pushed a commit to NethermindEth/rollup-geth that referenced this issue Oct 1, 2024
When only a single CPU is available:
* Avoid creating threads in StateDB.IntermediateRoot
* Force single threaded hashing
s1na pushed a commit to s1na/go-ethereum that referenced this issue Dec 2, 2024
Fix nil Error in function reportBlock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants