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

feat: increase network performance by reducing unnecessary rpc calls #165

Merged
merged 10 commits into from
Sep 29, 2022

Conversation

alvrs
Copy link
Member

@alvrs alvrs commented Sep 28, 2022

  • send raw transactions instead of via ethers method to avoid unnecessary rpc roundtrips for data we don't need
  • process transaction queue concurrently

@alvrs alvrs requested a review from a user September 28, 2022 19:44
@alvrs alvrs marked this pull request as draft September 28, 2022 19:45
@alvrs alvrs changed the title Ludens/network boost feat: increase network performance by reducing unnecessary rpc calls Sep 28, 2022
const { txQueue, dispose: disposeTxQueue } = createTxQueue(contracts, network, { devMode: networkConfig.devMode });
const gasPriceInput$ = new BehaviorSubject<number>(
// If no initial gas price is provided, check the gas price once and add a 30% buffer
options?.initialGasPrice || (await signerOrProvider.get().getGasPrice()).toNumber() * 1.3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably want to make sure this is not a float; it might make the nodes freak out.

@ludns ludns self-requested a review September 29, 2022 10:37
Copy link
Member

@ludns ludns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@alvrs alvrs merged commit 195b710 into main Sep 29, 2022
github-actions bot pushed a commit that referenced this pull request Sep 29, 2022
…ng unnecessary rpc calls (#165)

* feat: faster network [wip]

* feat: no network check provider

* feat: not wait for stuff you don't care about

* chore: wip

* chore: clean up

* chore: self-review

* test: add chainId to provider config

* feat(network): add gasPriceInput$ to txQueue

* fix(network): make sure initial gas price is an integer value

Co-authored-by: ludens <ludens@lattice.xyz>
@alvrs alvrs deleted the ludens/network-boost branch January 5, 2023 11:24
LPSCRYPT pushed a commit to LPSCRYPT/esp that referenced this pull request Jan 23, 2023
…pc calls (latticexyz#165)

* feat: faster network [wip]

* feat: no network check provider

* feat: not wait for stuff you don't care about

* chore: wip

* chore: clean up

* chore: self-review

* test: add chainId to provider config

* feat(network): add gasPriceInput$ to txQueue

* fix(network): make sure initial gas price is an integer value

Co-authored-by: ludens <ludens@lattice.xyz>
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.

None yet

2 participants