mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
fix: Disable eth_getProof by default
No need to give malfunctioning feature by default. Issue #15 affects StoragesTrie, AccountsTrie table which is used only for state root and proof generation. Also clearing the table does not affect any other parts of reth node. Meanwhile, add --experimental-eth-get-proof flag to enable eth_getProof forcefully.
This commit is contained in:
@ -39,7 +39,7 @@ fn main() -> eyre::Result<()> {
|
||||
let (node, engine_handle_tx) = HlNode::new(ext.block_source_args.parse().await?);
|
||||
let NodeHandle { node, node_exit_future: exit_future } = builder
|
||||
.node(node)
|
||||
.extend_rpc_modules(move |ctx| {
|
||||
.extend_rpc_modules(move |mut ctx| {
|
||||
let upstream_rpc_url =
|
||||
ext.upstream_rpc_url.unwrap_or_else(|| default_upstream_rpc_url.to_owned());
|
||||
|
||||
@ -60,10 +60,15 @@ fn main() -> eyre::Result<()> {
|
||||
}
|
||||
|
||||
if ext.hl_node_compliant {
|
||||
install_hl_node_compliance(ctx)?;
|
||||
install_hl_node_compliance(&mut ctx)?;
|
||||
info!("hl-node compliant mode enabled");
|
||||
}
|
||||
|
||||
if !ext.experimental_eth_get_proof {
|
||||
ctx.modules.remove_method_from_configured("eth_getProof");
|
||||
info!("eth_getProof is disabled by default");
|
||||
}
|
||||
|
||||
Ok(())
|
||||
})
|
||||
.apply(|builder| {
|
||||
|
||||
Reference in New Issue
Block a user