-
-
Notifications
You must be signed in to change notification settings - Fork 654
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
Add Gnosis #925
base: master
Are you sure you want to change the base?
Add Gnosis #925
Conversation
@martinboehm ready for review whenever you have free cycles :) |
@kaladinlight Hi. Archive node.
|
Did you build blockbook using the
|
Yes. I run make command with BASE_IMAGE=ubuntu:22.04. |
I can push a change to bump that limit if you want to rebuild the image to test. I don't have an archive node to point at currently to test locally... |
Size json file 205 MB |
Good lord... I will bump to 256 for temp fix. I would like to look into adding a logic fork to leverage the parity |
@kaladinlight I raised the limit to 2048 because the page size is 1800MB. And rpc timeout to 300 sec.
5 million blocks. The flight is normal. |
~2200 MB
|
that is crazy... at this point I would say raise it as you need to for your purposes and when I have time I will work on supporting the trace module for gnosis which will hopefully help things |
@matyushkins not sure if you are still running this, but I finally got around to adding the parity trace debug for gnosis if you wanted to give that a shot. it should be significantly lighter to run with this change. let me know! |
Parser *EthereumParser | ||
PushHandler func(bchain.NotificationType) | ||
OpenRPC func(string) (bchain.EVMRPCClient, bchain.EVMClient, error) | ||
GetInternalDataForBlock func(blockHash string, blockHeight uint32, transactions []bchain.RpcTransaction) ([]bchain.EthereumInternalData, []bchain.ContractInfo, error) |
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.
support overridable GetInternalDataForBlock
to support the use of the parity trace
module for debug. This is only used by gnosis at this time, but I suppose I could also add that logic directly to ethrpc.go
and leverage a DebugType
flag if you would like that better.
@@ -592,7 +595,8 @@ type rpcTraceResult struct { | |||
Result rpcCallTrace `json:"result"` | |||
} | |||
|
|||
func (b *EthereumRPC) getCreationContractInfo(contract string, height uint32) *bchain.ContractInfo { | |||
// GetCreationContractInfo retrieves the info for a contract address and sets the creation block height | |||
func (b *EthereumRPC) GetCreationContractInfo(contract string, height uint32) *bchain.ContractInfo { |
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.
expose for use in GnosisRPC
} | ||
|
||
// getInternalDataForBlock extracts internal transfers and creation or destruction of contracts using the parity trace module | ||
func (b *GnosisRPC) getInternalDataForBlock(blockHash string, blockHeight uint32, transactions []bchain.RpcTransaction) ([]bchain.EthereumInternalData, []bchain.ContractInfo, error) { |
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.
parity trace logic for internal data
@martinboehm another one that would be nice to get upstreamed if you have any spare cycles. thanks! |
|
||
option go_package = "github.com/trezor/blockbook/bchain/coins/eth"; | ||
|
||
message ProtoAddrContracts { |
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.
update addr contracts to proto type to fix performance impact of manual pack/unpack related to huge multi addr contracts on chain
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.
seemed to help a bit, but sync has since crawled to a stop...
55f1bba
to
f22919d
Compare
@martinboehm happy to talk through this guy as well, but quick tldr:
Would love to brainstorm with you if you have the time and are up for it, but at this point gnosis is not really production ready in the current state of blockbook :( |
Header
type and associated marshal/rlp handlers. I did start to think about if it is even necessary to use theHash()
function on theHeader
to get the blockhash
instead of just gettinghash
directly off theBlock
. Was this an intentional decision for some edge case that I am not thinking about?