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

5634/alex fix inconsistent event emitter geth ipc tests #5822

Closed
wants to merge 29 commits into from
Closed

Conversation

luu-alex
Copy link
Contributor

@luu-alex luu-alex commented Feb 8, 2023

Description

#5634

The inconsistent testcases happen because the eventlistener receives confirmationortransactionhashonly half the time. This only happens on the IPC test suite while using geth. I believe by changing geth settings tomine`
this will allow blocks to be mined properly and fix this issue, i havent run into the issue since.
Please include a summary of the changes and be sure to follow our Contribution Guidelines.

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.

@luu-alex luu-alex changed the base branch from 1.x to 4.x February 8, 2023 15:53
@luu-alex luu-alex closed this Feb 8, 2023
@luu-alex luu-alex reopened this Feb 8, 2023
@github-actions
Copy link

github-actions bot commented Feb 8, 2023

Bundle Stats

Hey there, this message comes from a github action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Asset Old size New size Diff Diff %
Total 1.18 MB 1.06 MB -119 KB -9.91%
View detailed bundle breakdown

Added

Asset Old size New size Diff Diff %
../lib/eth.exports.d.ts.map 0 358 bytes 358 bytes -
../lib/eth.exports.d.ts 0 321 bytes 321 bytes -
../lib/providers.exports.d.ts.map 0 292 bytes 292 bytes -
../lib/providers.exports.d.ts 0 238 bytes 238 bytes -

Removed

No assets were removed

Bigger

Asset Old size New size Diff Diff %
../lib/index.d.ts 77 bytes 899 bytes 822 bytes 1067.53%
../lib/index.d.ts.map 155 bytes 919 bytes 764 bytes 492.90%

Smaller

Asset Old size New size Diff Diff %
web3.min.js 1.17 MB 1.05 MB -122 KB -10.19%
../lib/types.d.ts 1.92 KB 1.68 KB -253 bytes -12.84%
../lib/types.d.ts.map 1.75 KB 1.51 KB -241 bytes -13.46%

Unchanged

Asset Old size New size Diff Diff %
../lib/accounts.d.ts 3.42 KB 3.42 KB 0 0.00%
../lib/abi.d.ts 1020 bytes 999 bytes -18 bytes -1.77%
../lib/web3.d.ts 842 bytes 842 bytes 0 0.00%
../lib/web3.d.ts.map 693 bytes 694 bytes 1 bytes 0.14%
../lib/accounts.d.ts.map 528 bytes 528 bytes 0 0.00%
../lib/version.d.ts.map 140 bytes 140 bytes 0 0.00%
../lib/abi.d.ts.map 124 bytes 124 bytes 0 0.00%
../lib/version.d.ts 97 bytes 97 bytes 0 0.00%

@github-actions github-actions bot temporarily deployed to Preview: (5634/alex) February 8, 2023 16:18 Inactive
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 8, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: c93802d
Status: ✅  Deploy successful!
Preview URL: https://69f8e7b8.web3-js-docs.pages.dev
Branch Preview URL: https://5634-alex.web3-js-docs.pages.dev

View logs

@github-actions github-actions bot temporarily deployed to Preview: (5634/alex) February 8, 2023 19:22 Inactive
@github-actions github-actions bot temporarily deployed to Preview: (5634/alex) February 8, 2023 20:20 Inactive
@github-actions github-actions bot temporarily deployed to Preview: (5634/alex) February 9, 2023 19:32 Inactive
@luu-alex
Copy link
Contributor Author

luu-alex commented Feb 9, 2023

Updated changelog for a different issue as well. apologies

@luu-alex luu-alex marked this pull request as ready for review February 9, 2023 19:45
@github-actions github-actions bot temporarily deployed to Preview: (5634/alex) February 9, 2023 19:54 Inactive
@github-actions github-actions bot temporarily deployed to Preview: (5634/alex) February 9, 2023 20:06 Inactive
@github-actions github-actions bot temporarily deployed to Preview: (5634/alex) February 13, 2023 16:46 Inactive
scripts/geth.sh Outdated Show resolved Hide resolved
scripts/geth.sh Outdated Show resolved Hide resolved
scripts/geth_binary.sh Outdated Show resolved Hide resolved
scripts/geth_binary.sh Outdated Show resolved Hide resolved
@github-actions github-actions bot temporarily deployed to Preview: (5634/alex) February 13, 2023 17:52 Inactive
else
echo "Starting geth..."
echo "geth --ipcpath $IPC_PATH --nodiscover --nousb --ws --ws.addr 0.0.0.0 --ws.port $WEB3_SYSTEM_TEST_PORT --http --http.addr 0.0.0.0 --http.port $WEB3_SYSTEM_TEST_PORT --allow-insecure-unlock --http.api personal,web3,eth,admin,debug,txpool,net --ws.api personal,web3,eth,admin,debug,miner,txpool,net --dev --dev.period=0 &>/dev/null &"
${TMP_FOLDER}/geth --ipcpath $IPC_PATH --nodiscover --nousb --ws --ws.addr 0.0.0.0 --ws.port $WEB3_SYSTEM_TEST_PORT --http --http.addr 0.0.0.0 --http.port $WEB3_SYSTEM_TEST_PORT --allow-insecure-unlock --http.api personal,web3,eth,admin,debug,txpool,net --ws.api personal,web3,eth,admin,debug,miner,txpool,net --dev --dev.period=0 &>/dev/null &
echo "geth --ipcpath $IPC_PATH --nodiscover --nousb --ws --ws.addr 0.0.0.0 --ws.port $WEB3_SYSTEM_TEST_PORT --http --http.addr 0.0.0.0 --http.port $WEB3_SYSTEM_TEST_PORT --allow-insecure-unlock --http.api personal,web3,eth,admin,debug,txpool,net --ws.api personal,web3,eth,admin,debug,miner,txpool,net --dev --mine --dev.period=0 &>/dev/null &"
Copy link
Contributor

Choose a reason for hiding this comment

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

we already have insta blocks mining for existing 4.x testing and blocks were created without this flag.
adding mine flag, geth will activate POW algo and do CPU mining. For issue under investigation #5634 the problem was transactions were not mined or new blocks were not created?

@github-actions github-actions bot temporarily deployed to Preview: (5634/alex) February 21, 2023 14:17 Inactive
@jdevcs jdevcs added the 4.x 4.0 related label Feb 21, 2023
@github-actions github-actions bot temporarily deployed to Preview: (5634/alex) February 24, 2023 04:41 Inactive
@luu-alex luu-alex changed the title 5634/alex 5634/alex fix inconsistent event emitter geth ipc tests Feb 24, 2023
@github-actions github-actions bot temporarily deployed to Preview: (5634/alex) February 24, 2023 20:50 Inactive
@github-actions github-actions bot temporarily deployed to Preview: (5634/alex) February 24, 2023 20:54 Inactive
@github-actions github-actions bot temporarily deployed to Preview: (5634/alex) February 26, 2023 04:12 Inactive
@github-actions github-actions bot temporarily deployed to Preview: (5634/alex) February 26, 2023 04:29 Inactive
…ypes-of-currentProvider-' into 5634/alex"

This reverts commit b4f9b52, reversing
changes made to 18d1c1f.
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