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

EIP 1559 Support #96

Open
wants to merge 163 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
163 commits
Select commit Hold shift + click to select a range
19e277e
Merge pull request #91 from telosnetwork/dev
jbuice Jun 11, 2024
2f5d424
unserialize according to tx type
tomtomcrypto Jun 13, 2024
b754965
switched fork to london
tomtomcrypto Jun 13, 2024
b3b3a73
switched fork to london
tomtomcrypto Jun 13, 2024
5a50a07
switched fork to london
tomtomcrypto Jun 13, 2024
288791e
switched fork to london
tomtomcrypto Jun 13, 2024
40e2793
switched fork to london
tomtomcrypto Jun 13, 2024
1eec4be
switched fork to london
tomtomcrypto Jun 13, 2024
c044bee
switched fork to london
tomtomcrypto Jun 13, 2024
2055928
switched fork to london
tomtomcrypto Jun 13, 2024
02ab160
switched fork to london
tomtomcrypto Jun 13, 2024
33041db
switched fork to london
tomtomcrypto Jun 14, 2024
b109b2f
switched fork to london
tomtomcrypto Jun 14, 2024
5ab61e7
switched fork to london
tomtomcrypto Jun 14, 2024
7f99d94
switched fork to london
tomtomcrypto Jun 14, 2024
ab231ae
fixes
tomtomcrypto Jun 14, 2024
965d4af
fixes
tomtomcrypto Jun 14, 2024
b188e6c
fixes
tomtomcrypto Jun 14, 2024
a55e82d
fixes
tomtomcrypto Jun 14, 2024
64a4b40
fixes
tomtomcrypto Jun 14, 2024
e62dad2
fixes
tomtomcrypto Jun 14, 2024
eab530c
fix
tomtomcrypto Jun 17, 2024
88ab483
fix
tomtomcrypto Jun 17, 2024
d8dd764
fix log
tomtomcrypto Jun 17, 2024
b7d4c91
more debug log
tomtomcrypto Jun 17, 2024
e71f87b
more debug log
tomtomcrypto Jun 17, 2024
f01857f
more debug log
tomtomcrypto Jun 17, 2024
b3484de
more debug log
tomtomcrypto Jun 17, 2024
a84f44d
fix ethereumjs tx object usage
tomtomcrypto Jun 18, 2024
c5cea3f
remove cast as any
tomtomcrypto Jun 18, 2024
517e3db
add gasLimit to eip 1559 trx
tomtomcrypto Jun 18, 2024
2164e12
ref txData in createEthTx
tomtomcrypto Jun 18, 2024
48d26e3
ref txData in createEthTx
tomtomcrypto Jun 19, 2024
9503b27
added accessList to txData
tomtomcrypto Jun 19, 2024
33fd655
add type to txData
tomtomcrypto Jun 19, 2024
1a45cfc
ref type to txData
tomtomcrypto Jun 19, 2024
5e0a39b
log
tomtomcrypto Jun 19, 2024
3254dcb
changed serialization
tomtomcrypto Jun 19, 2024
b031195
log
tomtomcrypto Jun 19, 2024
81fe241
ref
tomtomcrypto Jun 19, 2024
d9de384
ref
tomtomcrypto Jun 19, 2024
d9865fa
ref
tomtomcrypto Jun 19, 2024
c7763f5
ref
tomtomcrypto Jun 19, 2024
f554e89
ref
tomtomcrypto Jun 19, 2024
cca6082
ref
tomtomcrypto Jun 19, 2024
d6ad7b8
ref
tomtomcrypto Jun 19, 2024
df5d63f
ref
tomtomcrypto Jun 20, 2024
967ad9d
ref
tomtomcrypto Jun 20, 2024
8e8fcb4
ref
tomtomcrypto Jun 20, 2024
35f941d
ref
tomtomcrypto Jun 20, 2024
ed8169c
ref
tomtomcrypto Jun 20, 2024
e02cfb5
ref
tomtomcrypto Jun 20, 2024
d44bae8
ref
tomtomcrypto Jun 20, 2024
a6edda7
ref
tomtomcrypto Jun 20, 2024
f0c7dee
ref
tomtomcrypto Jun 20, 2024
774f321
ref
tomtomcrypto Jun 20, 2024
fa9658f
ref
tomtomcrypto Jun 20, 2024
9698670
ref
tomtomcrypto Jun 20, 2024
c205d81
ref
tomtomcrypto Jun 20, 2024
fe84388
ref
tomtomcrypto Jun 20, 2024
d88ecf4
ref
tomtomcrypto Jun 20, 2024
ee9785b
ref
tomtomcrypto Jun 20, 2024
f2b25c2
log
tomtomcrypto Jun 21, 2024
82a305c
ref
tomtomcrypto Jun 21, 2024
17053d5
ref
tomtomcrypto Jun 21, 2024
f296a07
ref
tomtomcrypto Jun 21, 2024
3703d4c
ref
tomtomcrypto Jun 21, 2024
1c4c78d
added chainId to txData
tomtomcrypto Jun 22, 2024
ae3d035
log ref
tomtomcrypto Jun 22, 2024
2d7e5bf
log ref
tomtomcrypto Jun 22, 2024
6a5f51c
log ref
tomtomcrypto Jun 22, 2024
e6d7af9
ref
tomtomcrypto Jun 22, 2024
e75e748
ref
tomtomcrypto Jun 23, 2024
f0116d7
ref
tomtomcrypto Jun 23, 2024
ecd05be
log
tomtomcrypto Jun 24, 2024
daa4251
ELK read ref, EIP 4844 compat
tomtomcrypto Jun 24, 2024
f5d65ef
fix to getTransactionByHash reeturn
tomtomcrypto Jun 24, 2024
756e451
fix block receipt
tomtomcrypto Jun 24, 2024
e2246f9
log
tomtomcrypto Jun 24, 2024
24f1ed4
log
tomtomcrypto Jun 24, 2024
d3066f9
fix block retrieval
tomtomcrypto Jun 24, 2024
084ae81
fix block retrieval
tomtomcrypto Jun 24, 2024
9c33aea
log
tomtomcrypto Jun 24, 2024
c40d760
fix blockNum
tomtomcrypto Jun 25, 2024
2225ca7
cast feePerGas to hex string
tomtomcrypto Jun 25, 2024
6f331ac
cast feePerGas to hex string
tomtomcrypto Jun 25, 2024
c29fe65
fix missing )
tomtomcrypto Jun 25, 2024
7f3cab7
log
tomtomcrypto Jun 25, 2024
1d484eb
cleanup
tomtomcrypto Jun 26, 2024
08d014f
if maxFeePerGas set to 0, use fixed gas price
tomtomcrypto Jun 26, 2024
b061a96
fix object assign
tomtomcrypto Jun 26, 2024
3978056
added debug log
tomtomcrypto Jun 26, 2024
5556ca1
fix: set baseFeePerGas to null
tomtomcrypto Jun 26, 2024
a70a16a
log
tomtomcrypto Jun 27, 2024
be49f26
assign gas price to baseFeePerGas
tomtomcrypto Jun 27, 2024
e59bbbf
remove baseFeePerGas as we don't support in in ELK
tomtomcrypto Jun 27, 2024
2cdd149
BASE FEE BLOCK constant, effectiveGasPrice calculation
tomtomcrypto Jun 28, 2024
5e0a08f
fix cumulative gas used on trx
tomtomcrypto Jun 28, 2024
abbbd2f
ref baseFeePerGas to be = our fixed gas price
tomtomcrypto Jun 30, 2024
0437c2e
ref effectiveGasPrice calculation
tomtomcrypto Jun 30, 2024
86e7b31
log
tomtomcrypto Jun 30, 2024
6977907
ref getCumulativeGasUsed
tomtomcrypto Jul 1, 2024
c52258e
gas_used to gasused, added try/catch
tomtomcrypto Jul 1, 2024
1cdac88
ref baseFeePerGas on empty blocks
tomtomcrypto Jul 1, 2024
3b1b036
log
tomtomcrypto Jul 1, 2024
e3f2d18
Merge pull request #95 from telosnetwork/master
tomtomcrypto Jul 1, 2024
c22c121
ref object assignment
tomtomcrypto Jul 1, 2024
7e34f04
Merge branch 'eip1559' of https://github.com/telosnetwork/telos-evm-r…
tomtomcrypto Jul 1, 2024
52100f5
ref object assignment
tomtomcrypto Jul 1, 2024
e0a0f87
ref object assignment
tomtomcrypto Jul 1, 2024
586c945
logging
tomtomcrypto Jul 1, 2024
b9e64a1
log cleanup
tomtomcrypto Jul 1, 2024
2bc05ac
ref retrymanager transaction
tomtomcrypto Jul 1, 2024
757459e
fix cumulativeGasUsed, cast to BN
tomtomcrypto Jul 8, 2024
460e5dd
fix cumulativeGasUsed BN instanciation
tomtomcrypto Jul 8, 2024
e9372fe
log
tomtomcrypto Jul 8, 2024
10ee5fa
fix receipt parseing
tomtomcrypto Jul 8, 2024
e3802e1
fix BN fn call
tomtomcrypto Jul 8, 2024
8dcf1b3
cast cumulativeGasUsed to hex string
tomtomcrypto Jul 8, 2024
04e0880
ref getCumualtiveGasUsed
tomtomcrypto Jul 8, 2024
61e7d74
ref getCumualtiveGasUsed
tomtomcrypto Jul 8, 2024
0a05c70
ref getCumualtiveGasUsed
tomtomcrypto Jul 8, 2024
5716af5
log
tomtomcrypto Jul 8, 2024
38c0790
log
tomtomcrypto Jul 9, 2024
048f185
fix loop
tomtomcrypto Jul 9, 2024
6620308
fix loop
tomtomcrypto Jul 9, 2024
d44f3ee
missing await
tomtomcrypto Jul 9, 2024
e0ad8b2
remove log
tomtomcrypto Jul 9, 2024
5a99b7b
ref log
tomtomcrypto Jul 9, 2024
473da19
log
tomtomcrypto Jul 9, 2024
3fe9772
ref type in trx object
tomtomcrypto Jul 9, 2024
47de7b3
ref type in trx object
tomtomcrypto Jul 9, 2024
a4928d5
remmoved rogue ,
tomtomcrypto Jul 9, 2024
eaf7f14
ref type assignment
tomtomcrypto Jul 9, 2024
ac67b60
ref effectiveGasPrice
tomtomcrypto Jul 9, 2024
895d4a6
log
tomtomcrypto Jul 9, 2024
32f3e1b
ref effectiveGasPrice
tomtomcrypto Jul 9, 2024
1b6829c
log
tomtomcrypto Jul 9, 2024
c668d07
remove log, ref BN instantiation
tomtomcrypto Jul 9, 2024
391895e
ref BN for effectiveGasPrice
tomtomcrypto Jul 9, 2024
9322fe3
ref BN for effectiveGasPrice
tomtomcrypto Jul 9, 2024
95c122c
log
tomtomcrypto Jul 10, 2024
03de5ca
log
tomtomcrypto Jul 10, 2024
e1ac277
remove toHex cast
tomtomcrypto Jul 10, 2024
ff141cd
remove log, ref effectiveGasPrice to be charger_gas_price
tomtomcrypto Jul 10, 2024
a325113
log
tomtomcrypto Jul 10, 2024
c130f27
remove log, fix accessList missing
tomtomcrypto Jul 10, 2024
35bbed9
removed unecessary properties on transactionReceipt
tomtomcrypto Jul 10, 2024
5a821ff
eth_getTransactionByHash fix
tomtomcrypto Jul 10, 2024
fe10185
fix gasFeePerGas
tomtomcrypto Jul 15, 2024
fc6c3ec
use type 2 transactions by default (gas params missing)
tomtomcrypto Jul 30, 2024
7da811f
fix createEthTx
tomtomcrypto Jul 30, 2024
10c2d91
fix createEthTx
tomtomcrypto Jul 30, 2024
872f189
fixes
tomtomcrypto Jul 31, 2024
7aa5208
remove log
tomtomcrypto Aug 1, 2024
9c19cd6
fix default transaction type
tomtomcrypto Aug 1, 2024
26b069e
removeLog
tomtomcrypto Aug 5, 2024
5642bb3
debug log
tomtomcrypto Aug 14, 2024
3674157
debug log
tomtomcrypto Aug 15, 2024
e5a0067
correct object merge
tomtomcrypto Aug 15, 2024
2eefa12
remove debug log
tomtomcrypto Aug 15, 2024
0d0ee5a
fix Object.assign
tomtomcrypto Aug 15, 2024
6149007
remove baseFeePerGas for transactions in block
tomtomcrypto Aug 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
207 changes: 81 additions & 126 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "telos-evm-rpc",
"version": "1.0.0",
"version": "1.5.0",
"description": "",
"main": "main.ts",
"scripts": {
Expand Down Expand Up @@ -28,9 +28,9 @@
"dependencies": {
"@dnlup/fastify-traps": "^2.0.0",
"@elastic/elasticsearch": "^8.7.0",
"@ethereumjs/common": "^2.4.0",
"@ethereumjs/tx": "^3.3.0",
"@ethereumjs/util": "^8.0.2",
"@ethereumjs/common": "^4.3.0",
"@ethereumjs/tx": "^5.3.0",
"@ethereumjs/util": "^9.0.3",
"@fastify/cors": "^8.2.1",
"@types/uws": "^0.13.3",
"@wharfkit/antelope": "^0.7.0",
Expand Down
15 changes: 7 additions & 8 deletions src/TelosEVMRPC.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {fastify, FastifyInstance, FastifyListenOptions} from "fastify";
import fastifyTraps from '@dnlup/fastify-traps'
import fastifyCors from '@fastify/cors'
import Common, {default as ethCommon} from '@ethereumjs/common';
import {Chain, Common, Hardfork} from '@ethereumjs/common';
import {createLogger} from "./util/logger";
import evmRoute from './routes/evm'
import {RedisClientConnection, TelosEvmConfig} from "./types";
Expand All @@ -24,9 +24,9 @@ const logger = createLogger(`telos-evm-rpc`)
export default class TelosEVMRPC {
debug = false;

common: Common;
common: any;
baseChain = 'mainnet';
hardfork = 'istanbul';
hardfork = Hardfork.London;
fastify: FastifyInstance;
config: TelosEvmConfig;
websocketRPC: WebsocketRPC
Expand All @@ -35,11 +35,10 @@ export default class TelosEVMRPC {
this.config = config
this.debug = config.debug
if (config.chainId) {
this.common = ethCommon.forCustomChain(
this.baseChain,
{chainId: config.chainId},
this.hardfork
);
this.common = Common.custom({chainId: config.chainId}, {
hardfork: Hardfork.London,
eips: [1559]
});
}

this.fastify = fastify({
Expand Down
Loading