-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: verifiable-api #505
feat: verifiable-api #505
Conversation
aa7f092
to
2d5c06c
Compare
2d5c06c
to
5a15742
Compare
439c8a1
to
31d376e
Compare
31d376e
to
265f7f3
Compare
f8d93b3
to
baff83f
Compare
baff83f
to
c99886f
Compare
c19fa60
to
86fac3b
Compare
a66cbe7
to
34abdfe
Compare
34abdfe
to
10090e7
Compare
54cf1b4
to
4e005ab
Compare
45d4bac
to
6cefbd8
Compare
Ok(id) | ||
} | ||
|
||
async fn new_block_filter(&self) -> Result<U256> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, the filter is created on the underlying RPC, and its filter ID is stored in Helios and returned to the user. However, when the user requests filter changes for this filter ID, the response is constructed from Helios's state without querying the underlying RPC. This means we can likely eliminate the initial call as well, generating the filter ID on Helios side itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah lets do that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we should get rid of new_block_filter
from both RPC and API altogether since it will not be used by Helios?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I think if we have unused methods it makes sense to cut them unless you see a reason to keep them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should keep it in the Verifiable-API for completeness, even if Helios doesn't use it.
The POST /eth/v1/filter
endpoint allows requests with a kind
value of Logs
, NewBlocks
, or NewPendingTransactions
, effectively replacing the eth_newFilter
, eth_newBlockFilter
, and eth_newPendingTransactionFilter
RPC methods.
Removing NewBlocks
option would make the implementation feel incomplete.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also don't think it's a big issue to rely on the underlying RPC to return the filter ID so might just wanna keep the current implementation for simplicity's sake.
7180932
to
6930ed7
Compare
6930ed7
to
5206b89
Compare
Note that there's a good amount of redundant code in this PR because of the need to convert b/w |
ecc5fb7
to
73f8db5
Compare
73f8db5
to
46ea202
Compare
ToDo
Endpoints
eth_getProof
-GET /eth/v1/proof/account/{address}
eth_getBalance
-GET /eth/v1/proof/account/{address}
eth_getTransactionCount
-GET /eth/v1/proof/account/{address}
eth_getCode
-GET /eth/v1/proof/account/{address}?includeCode=true
eth_getStorageAt
-GET /eth/v1/proof/account/{address}?storageSlots={slots}
eth_getTransactionReceipt
-GET /eth/v1/proof/transaction/{hash}/receipt
eth_getLogs
-GET /eth/v1/proof/logs
eth_getFilterLogs
-GET /eth/v1/proof/filterLogs
eth_getFilterChanges
-GET /eth/v1/proof/filterChanges
eth_call
-POST /eth/v1/proof/createExtendedAccessList
eth_estimateGas
-POST /eth/v1/proof/createExtendedAccessList
eth_createAccessList
-POST /eth/v1/proof/createExtendedAccessList
eth_chainId
->GET /eth/v1/chainId
eth_sendRawTransaction
->POST /eth/v1/sendRawTransaction
eth_getBlockByHash
->GET /eth/v1/block/{block_id}
eth_getBlockByNumber
->GET /eth/v1/block/{block_id}
eth_getBlockReceipts
->GET /eth/v1/block/{block_id}/receipts
eth_newFilter
->POST /eth/v1/filter
eth_newBlockFilter
->POST /eth/v1/filter
eth_newPendingTransactionFilter
->/POST eth/v1/filter
eth_uninstallFilter
->DELETE /eth/v1/filter/{filter_id}
Other