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

Use subscription at rejectIfBlockTimeout when the provider supports subscription #5481

Conversation

Muhammad-Altabba
Copy link
Contributor

@Muhammad-Altabba Muhammad-Altabba commented Sep 27, 2022

Description

Implements #5467. In addition to a few code enhancements at tests.

However, because having lots of subscriptions and the tests are running in parallel some other issues showed up: #5517 and #5519 (and a related suggestion is interduced at #5521). And so this MR introduced a new config variable called enableExperimentalFeatures that contains useSubscriptionWhenCheckingBlockTimeout and the logic of this MR will run only when enableExperimentalFeatures.useSubscriptionWhenCheckingBlockTimeout is true. And tests are written for this accordingly.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist for 1.x:

  • I have selected the correct base branch.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • Any dependent changes have been merged and published in downstream modules.
  • I ran npm run dtslint with success and extended the tests and types if necessary.
  • I ran npm run test:cov and my test cases cover all the lines and branches of the added code.
  • I ran npm run build with success.
  • I have tested the built dist/web3.min.js in a browser.
  • I have tested my code on the live network.
  • I have checked the Deploy Preview and it looks correct.
  • I have updated the CHANGELOG.md file in the root folder.

Checklist for 4.x:

  • I have selected the correct 4.x base branch.
  • Within the description, the feature or issue is discussed in detail or an issue is linked.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added any required tests for the changes I made
  • I have made corresponding changes to the documentation
  • Any dependent changes have been merged and published in downstream modules.
  • I ran yarn successfully
  • I ran yarn lint successfully
  • I ran yarn build:web successfully
  • I ran yarn test:unit successfully
  • I ran yarn test:integration successfully
  • I ran compile:contracts successfully
  • I have tested my code.
  • I have updated the corresponding CHANGELOG.md file in the packages I have edited.

@Muhammad-Altabba Muhammad-Altabba added the 4.x 4.0 related label Sep 27, 2022
@Muhammad-Altabba Muhammad-Altabba marked this pull request as draft September 27, 2022 14:58
@Muhammad-Altabba Muhammad-Altabba changed the title [DRAFT] Use subscription at rejectIfBlockTimeout when the provider supports subscription Oct 6, 2022
@Muhammad-Altabba Muhammad-Altabba marked this pull request as ready for review October 11, 2022 15:59
@Muhammad-Altabba Muhammad-Altabba requested review from avkos, jdevcs, luu-alex and spacesailor24 and removed request for avkos October 11, 2022 16:01
@Muhammad-Altabba Muhammad-Altabba assigned avkos and luu-alex and unassigned avkos and luu-alex Oct 11, 2022
Copy link
Contributor

@avkos avkos left a comment

Choose a reason for hiding this comment

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

some tests stuck (360m)

…kTimeout-when-the-provider-supports-subscription
@Muhammad-Altabba
Copy link
Contributor Author

some tests stuck (360m)

Those tests were not related to this MR. And they pass now after merging with the newest 4.x, as they are fixed and merged separately in different MRs.

Co-authored-by: Alex  <alex.luu@mail.utoronto.ca>
packages/web3-core/src/web3_config.ts Outdated Show resolved Hide resolved
Muhammad-Altabba and others added 3 commits October 25, 2022 11:51
Co-authored-by: Nikos Iliakis <nikoulai@users.noreply.github.com>
…kTimeout-when-the-provider-supports-subscription
@Muhammad-Altabba Muhammad-Altabba merged commit 0185a85 into 4.x Oct 25, 2022
@Muhammad-Altabba Muhammad-Altabba deleted the feature/5467/use-subscription-at-rejectIfBlockTimeout-when-the-provider-supports-subscription branch October 25, 2022 10:19
@jdevcs jdevcs mentioned this pull request Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x 4.0 related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants