Skip to content

Commit 82267a1

Browse files
committed
feat(ethereum): add initial configuration files for Ethereum service
Add various configuration files including MethodWeight.yaml, DisableMethod.json, discount.json, Blacklist.json, ratio.json, dispatch.json, ModeDispatch.yaml, PublicDisableMethod.json, gateways.json, limiter.yaml, DisableMethod.yaml, and fees.json to set up initial Ethereum service parameters and rules
1 parent 7070625 commit 82267a1

12 files changed

Lines changed: 570 additions & 0 deletions

ethereum/Blacklist.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[
2+
"0xcbB30C604b349078f2Ee48e4649EE682898d0d6F"
3+
]

ethereum/DisableMethod.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[]

ethereum/DisableMethod.yaml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#
2+
default: # 等级(所有等级,其它等级没有配置方法时取这里方法配置)
3+
"debug_accountRange":
4+
"debug_backtraceAt":
5+
"debug_blockProfile":
6+
"debug_chaindbCompact":
7+
"debug_chaindbProperty":
8+
"debug_cpuProfile":
9+
"debug_dbAncient":
10+
"debug_dbAncients":
11+
"debug_dbGet":
12+
"debug_dumpBlock":
13+
"debug_freeOSMemory":
14+
"debug_freezeClient":
15+
"debug_gcStats":
16+
"debug_getAccessibleState":
17+
"debug_getBadBlocks":
18+
"debug_getBlockRlp":
19+
"debug_getHeaderRlp":
20+
"debug_getModifiedAccountsByHash":
21+
"debug_getModifiedAccountsByNumber":
22+
"debug_goTrace":
23+
"debug_intermediateRoots":
24+
"debug_memStats":
25+
"debug_mutexProfile":
26+
"debug_preimage":
27+
"debug_printBlock":
28+
"debug_seedHash":
29+
"debug_setBlockProfileRate":
30+
"debug_setGCPercent":
31+
"debug_setHead":
32+
"debug_setMutexProfileFraction":
33+
"debug_stacks":
34+
"debug_standardTraceBlockToFile":
35+
"debug_standardTraceBadBlockToFile":
36+
"debug_startCPUProfile":
37+
"debug_startGoTrace":
38+
"debug_stopCPUProfile":
39+
"debug_stopGoTrace":
40+
"debug_storageRangeAt":
41+
"debug_traceBadBlock":
42+
"debug_traceBlock":
43+
"debug_traceBlockFromFile":
44+
"debug_traceChain":
45+
"debug_verbosity":
46+
"debug_vmodule":
47+
"debug_writeBlockProfile":
48+
"debug_writeMemProfile":
49+
"debug_writeMutexProfile":
50+
"debug_setTrieFlushInterval":
51+
"debug_getTrieFlushInterval":
52+
"trace_callMany":

ethereum/MethodWeight.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#

ethereum/ModeDispatch.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# 模式分流
2+
# 目前只支持 full 分流,指定的方法将会被分流到 full 节点处理。
3+
4+
# 所有节点类型都支持
5+
all:
6+
eth_chainId:
7+
eth_syncing:
8+
eth_gasPrice:
9+
eth_estimateGas:
10+
eth_sendRawTransaction:
11+
eth_subscribe:
12+
txpool_inspect:
13+
txpool_status:
14+
txpool_content:
15+
web3_sha3:
16+
web3_clientVersion:
17+
net_listening:
18+
net_peerCount:
19+
eth_getProof:
20+
21+
# 只支持 full ,目前 full 是和 archive 混用的,所以设置 full 也基本等于设置 all,作为预留,可以配置。
22+
full:
23+
24+
# 被 设置 的方法将分流到 archive 节点,但是目前没有相关收费逻辑,作为预留使用,请 暂时别设置。
25+
archive:

ethereum/PublicDisableMethod.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
[
2+
"txpool_content",
3+
"txpool_inspect",
4+
"debug_traceCall",
5+
"debug_traceBlockByHash",
6+
"debug_traceBlockByNumber",
7+
"debug_traceTransaction",
8+
"trace_block",
9+
"trace_call",
10+
"trace_get",
11+
"trace_filter",
12+
"trace_transaction",
13+
"trace_rawTransaction",
14+
"trace_replayTransaction",
15+
"eth_newFilter",
16+
"eth_newBlockFilter",
17+
"eth_newPendingTransactionFilter",
18+
"eth_getFilterChanges",
19+
"eth_uninstallFilter",
20+
"eth_getFilterLogs"
21+
]

ethereum/discount.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"default": 1
3+
}

ethereum/dispatch.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"methods": {
3+
"trace_block": "erigon",
4+
"trace_call": "erigon",
5+
"trace_get": "erigon",
6+
"trace_transaction": "erigon",
7+
"trace_filter": "erigon",
8+
"trace_rawTransaction": "erigon",
9+
"trace_replayTransaction": "erigon",
10+
"trace_replayBlockTransactions": "erigon",
11+
"eth_getProof": "Geth"
12+
},
13+
"default": "",
14+
"default_archive": ""
15+
}

0 commit comments

Comments
 (0)