Skip to content
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 Base Support #1150

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Add Base Support #1150

wants to merge 8 commits into from

Conversation

kaladinlight
Copy link
Contributor

@kaladinlight kaladinlight commented Nov 1, 2024

This PR adds support for Base (includes docker image backend logic from add-arbitrum).

I also made some slight changes regarding addrContracts storage structure and caching. Happy to discuss this further, but it stemmed from my initial attempts at improving performance for Gnosis chain due to the large amount of spam on chain. The main bottleneck was the storing and fetching of addrContracts. To help I made two changes:

  • Use protobuf to (de)serialize the data as opposed to manual (un)pack of byte slices under the assumption that protobuf is more performant than the manual byte slice manipulation. It also just modernizes the format to align with some of the other stored types. I did leave the legacy (un)pack functions to ensure everything was backwards compatible so legacy data can be read and then stored back in the new protobuf format.
  • Extend the addressContracts cache to be supported for both bulk connect and the regular synchronous sync modes. This allows synchronous sync to utilize the cache instead of constantly reading from db to help improve performance. There is a config flag for setting the max size of the contracts map as well for tweaking based on desired memory usage. The cache will auto prune when full prioritizing keeping the larger address contract sets considering those would take the most time to read from the db.

I know this isn't really a direct requirement for Base and didn't even fully solve the Gnosis sync issues, but they still seemed like useful improvements to me, but feel free to let me know if you aren't keen about the changes and I will rip them out.

@kaladinlight kaladinlight marked this pull request as ready for review November 4, 2024 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant