From f4f25ae8dca6658fe35a56cd1c0d4b35a50b4efb Mon Sep 17 00:00:00 2001 From: blockpi019 <127294963+blockpi019@users.noreply.github.com> Date: Thu, 26 Mar 2026 17:03:09 +0800 Subject: [PATCH] add plume --- plume/DisableMethod.yaml | 52 +++++ plume/ModeDispatch.yaml | 24 ++ plume/PublicDisableMethod.json | 21 ++ plume/dispatch.yaml | 3 + plume/fees.json | 399 +++++++++++++++++++++++++++++++++ 5 files changed, 499 insertions(+) create mode 100644 plume/DisableMethod.yaml create mode 100644 plume/ModeDispatch.yaml create mode 100644 plume/PublicDisableMethod.json create mode 100644 plume/dispatch.yaml create mode 100644 plume/fees.json diff --git a/plume/DisableMethod.yaml b/plume/DisableMethod.yaml new file mode 100644 index 0000000..43eeef4 --- /dev/null +++ b/plume/DisableMethod.yaml @@ -0,0 +1,52 @@ +# +default: # 等级(所有等级,其它等级没有配置方法时取这里方法配置) + "debug_accountRange": + "debug_backtraceAt": + "debug_blockProfile": + "debug_chaindbCompact": + "debug_chaindbProperty": + "debug_cpuProfile": + "debug_dbAncient": + "debug_dbAncients": + "debug_dbGet": + "debug_dumpBlock": + "debug_freeOSMemory": + "debug_freezeClient": + "debug_gcStats": + "debug_getAccessibleState": + "debug_getBadBlocks": + "debug_getBlockRlp": + "debug_getHeaderRlp": + "debug_getModifiedAccountsByHash": + "debug_getModifiedAccountsByNumber": + "debug_getRawReceipts": + "debug_goTrace": + "debug_intermediateRoots": + "debug_memStats": + "debug_mutexProfile": + "debug_preimage": + "debug_printBlock": + "debug_seedHash": + "debug_setBlockProfileRate": + "debug_setGCPercent": + "debug_setHead": + "debug_setMutexProfileFraction": + "debug_stacks": + "debug_standardTraceBlockToFile": + "debug_standardTraceBadBlockToFile": + "debug_startCPUProfile": + "debug_startGoTrace": + "debug_stopCPUProfile": + "debug_stopGoTrace": + "debug_storageRangeAt": + "debug_traceBadBlock": + "debug_traceBlock": + "debug_traceBlockFromFile": + "debug_traceChain": + "debug_verbosity": + "debug_vmodule": + "debug_writeBlockProfile": + "debug_writeMemProfile": + "debug_writeMutexProfile": + "trace_callMany": + diff --git a/plume/ModeDispatch.yaml b/plume/ModeDispatch.yaml new file mode 100644 index 0000000..b3b2048 --- /dev/null +++ b/plume/ModeDispatch.yaml @@ -0,0 +1,24 @@ +# 模式分流 +# 目前只支持 full 分流,指定的方法将会被分流到 full 节点处理。 + +# 所有节点类型都支持 +all: + eth_chainId: + eth_syncing: + eth_gasPrice: + eth_estimateGas: + eth_sendRawTransaction: + eth_subscribe: + txpool_inspect: + txpool_status: + txpool_content: + web3_sha3: + web3_clientVersion: + net_listening: + net_peerCount: + +# 只支持 full ,目前 full 是和 archive 混用的,所以设置 full 也基本等于设置 all,作为预留,可以配置。 +full: + +# 被 设置 的方法将分流到 archive 节点,但是目前没有相关收费逻辑,作为预留使用,请 暂时别设置。 +archive: diff --git a/plume/PublicDisableMethod.json b/plume/PublicDisableMethod.json new file mode 100644 index 0000000..126f09d --- /dev/null +++ b/plume/PublicDisableMethod.json @@ -0,0 +1,21 @@ +[ + "txpool_content", + "txpool_inspect", + "debug_traceCall", + "debug_traceBlockByHash", + "debug_traceBlockByNumber", + "debug_traceTransaction", + "trace_block", + "trace_call", + "trace_get", + "trace_filter", + "trace_transaction", + "trace_rawTransaction", + "trace_replayTransaction", + "eth_newFilter", + "eth_newBlockFilter", + "eth_newPendingTransactionFilter", + "eth_getFilterChanges", + "eth_uninstallFilter", + "eth_getFilterLogs" +] diff --git a/plume/dispatch.yaml b/plume/dispatch.yaml new file mode 100644 index 0000000..34c50e3 --- /dev/null +++ b/plume/dispatch.yaml @@ -0,0 +1,3 @@ +default_archive: +default: + diff --git a/plume/fees.json b/plume/fees.json new file mode 100644 index 0000000..41b4b77 --- /dev/null +++ b/plume/fees.json @@ -0,0 +1,399 @@ +{ + "methodPrice": [ + { + "method": "default", + "calBase": 250, + "ruCost": 5 + }, + { + "method": "net_listening", + "calBase": 100000000, + "ruCost": 5 + }, + { + "method": "net_version", + "calBase": 100000000, + "ruCost": 5 + }, + { + "method": "net_peerCount", + "calBase": 100000000, + "ruCost": 5 + }, + { + "method": "web3_clientVersion", + "calBase": 100000000, + "ruCost": 15 + }, + { + "method": "web3_sha3", + "calBase": 100000000, + "ruCost": 15 + }, + { + "method": "eth_chainId", + "calBase": 100000000, + "ruCost": 5 + }, + { + "method": "eth_syncing", + "calBase": 100000000, + "ruCost": 5 + }, + { + "method": "eth_accounts", + "calBase": 100000000, + "ruCost": 10 + }, + { + "method": "eth_uninstallFilter", + "calBase": 100000000, + "ruCost": 10 + }, + { + "method": "eth_blockNumber", + "calBase": 100000000, + "ruCost": 10 + }, + { + "method": "eth_accountCreated", + "calBase": 100000000, + "ruCost": 15 + }, + { + "method": "eth_getBalance", + "calBase": 100000000, + "ruCost": 15 + }, + { + "method": "eth_getCode", + "calBase": 100000000, + "ruCost": 15 + }, + { + "method": "eth_getTransactionCount", + "calBase": 100000000, + "ruCost": 15 + }, + { + "method": "eth_isContractAccount", + "calBase": 100000000, + "ruCost": 15 + }, + { + "method": "eth_sign", + "calBase": 100000000, + "ruCost": 15 + }, + { + "method": "eth_clientVersion", + "calBase": 100000000, + "ruCost": 15 + }, + { + "method": "eth_mining", + "calBase": 100000000, + "ruCost": 15 + }, + { + "method": "eth_hashrate", + "calBase": 100000000, + "ruCost": 15 + }, + { + "method": "eth_gasPrice", + "calBase": 100000000, + "ruCost": 15 + }, + { + "method": "eth_gasPriceAt", + "calBase": 100000000, + "ruCost": 15 + }, + { + "method": "eth_isParallelDBWrite", + "calBase": 100000000, + "ruCost": 15 + }, + { + "method": "eth_isSenderTxHashIndexingEnabled", + "calBase": 100000000, + "ruCost": 15 + }, + { + "method": "eth_rewardbase", + "calBase": 100000000, + "ruCost": 15 + }, + { + "method": "eth_sha3", + "calBase": 100000000, + "ruCost": 15 + }, + { + "method": "eth_newBlockFilter", + "calBase": 100000000, + "ruCost": 15 + }, + { + "method": "eth_newFilter", + "calBase": 100000000, + "ruCost": 15 + }, + { + "method": "eth_newPendingTransactionFilter", + "calBase": 100000000, + "ruCost": 15 + }, + { + "method": "eth_getBlockTransactionCountByNumber", + "calBase": 100000000, + "ruCost": 15 + }, + { + "method": "eth_getBlockTransactionCountByHash", + "calBase": 100000000, + "ruCost": 15 + }, + { + "method": "eth_getCommittee", + "calBase": 100000000, + "ruCost": 15 + }, + { + "method": "eth_getCommitteeSize", + "calBase": 100000000, + "ruCost": 15 + }, + { + "method": "eth_getCouncil", + "calBase": 100000000, + "ruCost": 15 + }, + { + "method": "eth_getCouncilSize", + "calBase": 100000000, + "ruCost": 15 + }, + { + "method": "eth_getStorageAt", + "calBase": 100000000, + "ruCost": 15 + }, + { + "method": "eth_getAccount", + "calBase": 100000000, + "ruCost": 20 + }, + { + "method": "eth_getFilterChanges", + "calBase": 100000000, + "ruCost": 20 + }, + { + "method": "eth_call", + "calBase": 100000000, + "ruCost": 20 + }, + { + "method": "eth_estimateGas", + "calBase": 100000000, + "ruCost": 20 + }, + { + "method": "eth_estimateComputationCost", + "calBase": 100000000, + "ruCost": 20 + }, + { + "method": "eth_getAccountKey", + "calBase": 100000000, + "ruCost": 25 + }, + { + "method": "eth_getDecodedAnchoringTransactionByHash", + "calBase": 100000000, + "ruCost": 25 + }, + { + "method": "eth_getHeaderByNumber", + "calBase": 100000000, + "ruCost": 25 + }, + { + "method": "eth_getHeaderByHash", + "calBase": 100000000, + "ruCost": 25 + }, + { + "method": "eth_getTransactionByBlockHashAndIndex", + "calBase": 100000000, + "ruCost": 30 + }, + { + "method": "eth_getTransactionByBlockNumberAndIndex", + "calBase": 100000000, + "ruCost": 30 + }, + { + "method": "eth_signTransaction", + "calBase": 100000000, + "ruCost": 30 + }, + { + "method": "eth_encodeAccountKey", + "calBase": 100000000, + "ruCost": 35 + }, + { + "method": "eth_getTransactionByHash", + "calBase": 100000000, + "ruCost": 35 + }, + { + "method": "eth_getTransactionBySenderTxHash", + "calBase": 100000000, + "ruCost": 35 + }, + { + "method": "eth_signTransactionAsFeePayer", + "calBase": 100000000, + "ruCost": 45 + }, + { + "method": "eth_decodeAccountKey", + "calBase": 100000000, + "ruCost": 50 + }, + { + "method": "eth_getBlockByHash", + "calBase": 100000000, + "ruCost": 20 + }, + { + "method": "eth_getBlockByNumber", + "calBase": 100000000, + "ruCost": 20 + }, + { + "method": "eth_getFilterLogs", + "calBase": 100000000, + "ruCost": 75 + }, + { + "method": "eth_getLogs", + "calBase": 200000, + "ruCost": 50 + }, + { + "method": "eth_getBlockWithConsensusInfoByHash", + "calBase": 100000000, + "ruCost": 170 + }, + { + "method": "eth_getBlockWithConsensusInfoByNumber", + "calBase": 100000000, + "ruCost": 170 + }, + { + "method": "eth_getTransactionReceipt", + "calBase": 100000000, + "ruCost": 15 + }, + { + "method": "eth_getTransactionReceiptBySenderTxHash", + "calBase": 100000000, + "ruCost": 200 + }, + { + "method": "eth_sendRawTransaction", + "calBase": 100000000, + "ruCost": 50 + }, + { + "method": "eth_sendTransactionAsFeePayer", + "calBase": 100000000, + "ruCost": 200 + }, + { + "method": "eth_getBlockReceipts", + "calBase": 100000000, + "ruCost": 150 + }, + { + "method": "debug_traceTransaction", + "calBase": 100000000, + "ruCost": 150 + }, + { + "method": "debug_traceCall", + "calBase": 100000000, + "ruCost": 150 + }, + { + "method": "debug_traceBlockByNumber", + "calBase": 100000000, + "ruCost": 150 + }, + { + "method": "debug_traceBlockByHash", + "calBase": 100000000, + "ruCost": 150 + }, + { + "method": "trace_block", + "calBase": 100000000, + "ruCost": 20 + }, + { + "method": "trace_call", + "calBase": 100000000, + "ruCost": 60 + }, + { + "method": "trace_get", + "calBase": 100000000, + "ruCost": 15 + }, + { + "method": "trace_rawTransaction", + "calBase": 100000000, + "ruCost": 60 + }, + { + "method": "trace_replayTransaction", + "calBase": 100000000, + "ruCost": 2900 + }, + { + "method": "trace_transaction", + "calBase": 100000000, + "ruCost": 20 + }, + { + "method": "trace_filter", + "calBase": 100000000, + "ruCost": 60 + }, + { + "method": "txpool_inspect", + "calBase": 100000000, + "ruCost": 10 + }, + { + "method": "txpool_status", + "calBase": 100000000, + "ruCost": 10 + }, + { + "method": "eth_getProof", + "calBase": 100000000, + "ruCost": 50 + } + ], + "nodeTypeRate": { + "default": 1, + "fullNode": 1, + "archiveNode": 1.3 + } +} \ No newline at end of file