Replies: 2 comments 2 replies
-
a maybe viable option is to increase the window of historic data that geth saves in memory, here: We could just increase, or parametrize it so we can save a month or two of state data to execute |
Beta Was this translation helpful? Give feedback.
1 reply
-
So far, the methods that we are using are:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When deploying the Vocdoni smart contracts to mainnet, we will need to provide Web3 access for Archive Nodes in order to let the eligible voters fetch their ethereum storage proofs when using the Vocdoni Bridge
Running an Archive Node is very expensive (around 200€/month), so the access to them should be limited for vocdoni only usage, else we'll end up with thousands of queries not related to vocdoni that will probably occupy the node resources.
To limit the queries we need to build an intermediate proxy between the client and the web3 archive-node. This proxy will needs to:
eth_getProof
andeth_call
allow only querying those contracts that have an active voting processCurrent list of queries that should be allowed:
Here an existing proxy implementation that could be used as basis https://github.com/gochain/rpc-proxy
eth_call
Here an eth_call example query.
The
to
parameter is the contract to query. The proxy should filter to allow only queries to an existing Vocdoni smart contract.eth_getProof
An example for
eth_getProof
JSON call:The first argument of
params
is the contract address on which the storage proof will be retrieved. The last onelatest
is the block number to which the proof wants to be fetched.The Web3 proxy should also listen for
processNewProcess
event, as the Oracle does. And in case ofcensusOrigin=ERC20
include the contract address and block number to the whitelist.When a getProof query is received, check that contract and block-number are whitelisted, else return an error.
Beta Was this translation helpful? Give feedback.
All reactions