--l1-trust-rpc and --l2-trust-rpc flags control whether Kona performs additional verification on RPC responses to protect against malicious or faulty RPC providers. This guide helps you choose the right setting for your infrastructure and shows how to configure it.
Trust Modes
The defaults match op-node: L1 trust is disabled (false), while L2 engine trust is enabled (true). To retain the previous L1 trust behavior, set --l1-trust-rpc=true or KONA_NODE_L1_TRUST_RPC=true.
Trust Mode (trust enabled, true):
- No additional block hash verification is performed
- Optimized for performance
- Suitable for local nodes and trusted infrastructure
- Assumes the RPC provider is reliable and honest
false):
- Block hash verification is enabled
- Protects against malicious RPC providers returning incorrect blocks
- Recommended for public or third-party RPC endpoints
- Small performance overhead due to hash verification
Examples
Using trusted local RPCs:Security Recommendations
- Local Infrastructure: Use trust mode (
true) only for RPCs you control - Public RPCs: Use
--l1-trust-rpc=falseand--l2-trust-rpc=falsefor third-party endpoints - Shared Infrastructure: Consider disabling trust for both RPCs
- Performance Testing: The verification overhead is minimal but can be measured in high-throughput scenarios
Next Steps
- Both flags are catalogued with the rest of the node’s options in the Kona node CLI reference.
- To get a node running end to end, follow the binary guide or the Docker guide.