Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Problem: missing json rpc of eth_feeHistory #685

Closed
leejw51crypto opened this issue Oct 18, 2021 · 8 comments
Closed

Problem: missing json rpc of eth_feeHistory #685

leejw51crypto opened this issue Oct 18, 2021 · 8 comments
Assignees
Labels

Comments

@leejw51crypto
Copy link
Contributor

revise or add eth_feeHistory

@leejw51crypto
Copy link
Contributor Author

working now

leejw51crypto added a commit to leejw51crypto/ethermint that referenced this issue Oct 21, 2021
@leejw51crypto
Copy link
Contributor Author

leejw51crypto commented Oct 26, 2021

added FeeHistory for api, backend

func (e *EVMBackend) FeeHistory(blockCount rpc.DecimalOrHex, lastBlock rpc.BlockNumber, rewardPercentiles []float64) (*rpctypes.FeeHistoryResult, error

tested return values vis curl

now filling BaseFee,GasUsed, Reward

referring to oracle source in go-ethereum

@leejw51crypto
Copy link
Contributor Author

leejw51crypto commented Oct 26, 2021

testing script

curl http://localhost:8545 -X POST  -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_feeHistory","params":[4, "latest", [25, 75]],"id":1}'

@tomtau tomtau added the C:JSON-RPC JSON-RPC client label Oct 28, 2021
@leejw51crypto
Copy link
Contributor Author

reward computed,
now working on like this

  1. run devnet
  2. create a lot of txs with different fees
  3. test fee_history
    then will submit the pr

@fedekunze
Copy link
Contributor

@leejw51crypto any updates on this?

@leejw51crypto
Copy link
Contributor Author

leejw51crypto commented Nov 9, 2021

used feemarket and current backend apis

test is done, refactoring now
will submit pr shortly

@leejw51crypto
Copy link
Contributor Author

leejw51crypto commented Nov 9, 2021

submitted pr
in cr

leejw51crypto added a commit to leejw51crypto/ethermint that referenced this issue Nov 17, 2021
add oracle backend

space ready

structure ok

refactoring

return feehistory

data flow ok

basefee

set gas used ratio

computing reward

add testing

add gas used

prepare data

fill reward

increase coin

fixing api

add mac

add launch

gas used ratio ok

print element

reward workes

reward working

fix panic

value correct

remove debugging log

tidy up

tidy up

remove oracle

tidy up

fix handler crash

add unit test

tidy up

add limit check

reformat

fix lint

fix lint

fix lint

fix lint

Update rpc/ethereum/backend/feebackend.go

thanks

Co-authored-by: Federico Kunze Küllmer <[email protected]>

Update rpc/ethereum/backend/feebackend.go

Co-authored-by: Federico Kunze Küllmer <[email protected]>

Update rpc/ethereum/backend/feebackend.go

thanks

Co-authored-by: Federico Kunze Küllmer <[email protected]>

Update rpc/ethereum/backend/feebackend.go

Co-authored-by: Federico Kunze Küllmer <[email protected]>

fix compile error

split lines

remove temporary string conversion

return error if gaslimit is 0

move OneFeeHistory to types

add comment

only err check
leejw51crypto added a commit to leejw51crypto/ethermint that referenced this issue Nov 17, 2021
add oracle backend

space ready

structure ok

refactoring

return feehistory

data flow ok

basefee

set gas used ratio

computing reward

add testing

add gas used

prepare data

fill reward

increase coin

fixing api

add mac

add launch

gas used ratio ok

print element

reward workes

reward working

fix panic

value correct

remove debugging log

tidy up

tidy up

remove oracle

tidy up

fix handler crash

add unit test

tidy up

add limit check

reformat

fix lint

fix lint

fix lint

fix lint

Update rpc/ethereum/backend/feebackend.go

thanks

Co-authored-by: Federico Kunze Küllmer <[email protected]>

Update rpc/ethereum/backend/feebackend.go

Co-authored-by: Federico Kunze Küllmer <[email protected]>

Update rpc/ethereum/backend/feebackend.go

thanks

Co-authored-by: Federico Kunze Küllmer <[email protected]>

Update rpc/ethereum/backend/feebackend.go

Co-authored-by: Federico Kunze Küllmer <[email protected]>

fix compile error

split lines

remove temporary string conversion

return error if gaslimit is 0

move OneFeeHistory to types

add comment

only err check

Update rpc/ethereum/backend/feebackend.go

Co-authored-by: Federico Kunze Küllmer <[email protected]>

Update rpc/ethereum/backend/feebackend.go

Co-authored-by: Federico Kunze Küllmer <[email protected]>

tidy up

add feehistory-cap
fedekunze added a commit that referenced this issue Nov 17, 2021
* Problem: missing json rpc of eth_feeHistory #685

add oracle backend

space ready

structure ok

refactoring

return feehistory

data flow ok

basefee

set gas used ratio

computing reward

add testing

add gas used

prepare data

fill reward

increase coin

fixing api

add mac

add launch

gas used ratio ok

print element

reward workes

reward working

fix panic

value correct

remove debugging log

tidy up

tidy up

remove oracle

tidy up

fix handler crash

add unit test

tidy up

add limit check

reformat

fix lint

fix lint

fix lint

fix lint

Update rpc/ethereum/backend/feebackend.go

thanks

Co-authored-by: Federico Kunze Küllmer <[email protected]>

Update rpc/ethereum/backend/feebackend.go

Co-authored-by: Federico Kunze Küllmer <[email protected]>

Update rpc/ethereum/backend/feebackend.go

thanks

Co-authored-by: Federico Kunze Küllmer <[email protected]>

Update rpc/ethereum/backend/feebackend.go

Co-authored-by: Federico Kunze Küllmer <[email protected]>

fix compile error

split lines

remove temporary string conversion

return error if gaslimit is 0

move OneFeeHistory to types

add comment

only err check

Update rpc/ethereum/backend/feebackend.go

Co-authored-by: Federico Kunze Küllmer <[email protected]>

Update rpc/ethereum/backend/feebackend.go

Co-authored-by: Federico Kunze Küllmer <[email protected]>

tidy up

add feehistory-cap

* Apply suggestions from code review

* changelog

Co-authored-by: Federico Kunze Küllmer <[email protected]>
Co-authored-by: Federico Kunze Küllmer <[email protected]>
@github-actions
Copy link

This issue is stale because it has been open 45 days with no activity. Remove Status: Stale label or comment or this will be closed in 7 days.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants