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

web3 middleware #6951

Merged
merged 16 commits into from
Apr 18, 2024
Merged

web3 middleware #6951

merged 16 commits into from
Apr 18, 2024

Conversation

jdevcs
Copy link
Contributor

@jdevcs jdevcs commented Apr 3, 2024

Description

#6864
#6963

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:

  • 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 lint with success and extended the tests and types if necessary.
  • I ran npm run test:unit with success.
  • I ran npm run test:coverage and my test cases cover all the lines and branches of the added code.
  • I ran npm run build and tested 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.
  • I have linked Issue(s) with this PR in "Linked Issues" menu.

@jdevcs jdevcs added the 4.x 4.0 related label Apr 3, 2024
Copy link

github-actions bot commented Apr 3, 2024

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

Files count Total bundle size % Changed
10 619.77 kB → 620.86 kB (+1.1 kB) +0.18%
Changeset
File Δ Size
../web3-eth-contract/lib/commonjs/contract.js 📈 +3.52 kB (+8.87%) 39.7 kB → 43.22 kB
../web3-eth-contract/lib/commonjs/encoding.js 📈 +504 B (+8.38%) 5.87 kB → 6.36 kB
../web3-core/lib/commonjs/web3_request_manager.js 📈 +593 B (+3.78%) 15.32 kB → 15.9 kB
../web3-core/lib/commonjs/web3_context.js 📈 +186 B (+1.39%) 13.08 kB → 13.26 kB
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

Asset File Size % Changed
web3.min.js 600.7 kB → 601.8 kB (+1.1 kB) +0.18%

Smaller

No assets were smaller

Unchanged

Asset File Size % Changed
../lib/commonjs/index.d.ts 8.69 kB 0%
../lib/commonjs/accounts.d.ts 3.89 kB 0%
../lib/commonjs/types.d.ts 2.45 kB 0%
../lib/commonjs/web3.d.ts 1.35 kB 0%
../lib/commonjs/web3_eip6963.d.ts 1.2 kB 0%
../lib/commonjs/abi.d.ts 999 B 0%
../lib/commonjs/eth.exports.d.ts 280 B 0%
../lib/commonjs/providers.exports.d.ts 183 B 0%
../lib/commonjs/version.d.ts 60 B 0%

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Benchmark

Benchmark suite Current: 87294d1 Previous: 6c075db Ratio
processingTx 8828 ops/sec (±4.82%) 9301 ops/sec (±4.81%) 1.05
processingContractDeploy 39328 ops/sec (±5.18%) 39129 ops/sec (±7.62%) 0.99
processingContractMethodSend 18771 ops/sec (±9.50%) 19443 ops/sec (±5.19%) 1.04
processingContractMethodCall 39649 ops/sec (±6.16%) 38971 ops/sec (±6.34%) 0.98
abiEncode 43277 ops/sec (±6.71%) 44252 ops/sec (±6.92%) 1.02
abiDecode 30120 ops/sec (±7.66%) 30419 ops/sec (±8.89%) 1.01
sign 1529 ops/sec (±3.13%) 1656 ops/sec (±4.08%) 1.08
verify 377 ops/sec (±0.69%) 373 ops/sec (±0.78%) 0.99

This comment was automatically generated by workflow using github-action-benchmark.

@jdevcs jdevcs marked this pull request as ready for review April 4, 2024 11:08
Copy link

codecov bot commented Apr 4, 2024

Codecov Report

Merging #6951 (87294d1) into 4.x (4358140) will increase coverage by 4.58%.
Report is 215 commits behind head on 4.x.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##              4.x    #6951      +/-   ##
==========================================
+ Coverage   87.37%   91.96%   +4.58%     
==========================================
  Files         197      215      +18     
  Lines        7548     8223     +675     
  Branches     2059     2217     +158     
==========================================
+ Hits         6595     7562     +967     
+ Misses        953      661     -292     
Flag Coverage Δ
UnitTests 91.96% <100.00%> (+4.58%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
web3 ∅ <ø> (∅)
web3-core ∅ <ø> (∅)
web3-errors ∅ <ø> (∅)
web3-eth ∅ <ø> (∅)
web3-eth-abi ∅ <ø> (∅)
web3-eth-accounts ∅ <ø> (∅)
web3-eth-contract ∅ <ø> (∅)
web3-eth-ens ∅ <ø> (∅)
web3-eth-iban ∅ <ø> (∅)
web3-eth-personal ∅ <ø> (∅)
web3-net ∅ <ø> (∅)
web3-providers-http ∅ <ø> (∅)
web3-providers-ipc ∅ <ø> (∅)
web3-providers-ws ∅ <ø> (∅)
web3-rpc-methods ∅ <ø> (∅)
web3-utils ∅ <ø> (∅)
web3-validator ∅ <ø> (∅)

Copy link
Contributor

@Muhammad-Altabba Muhammad-Altabba left a comment

Choose a reason for hiding this comment

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

Seems great! beside Oleksii's points.

However, I think it would be the best to use this feature in a plugin before we make it available in the next release. In order to see it in action and see if we need some changes that we can do without casing a breaking changes in the subsequent releases. So, can we for example set it as experimental till we try it inside some real case? And later we mark it as a read-to-use feature?

@jdevcs
Copy link
Contributor Author

jdevcs commented Apr 8, 2024

Seems great! beside Oleksii's points.

However, I think it would be the best to use this feature in a plugin before we make it available in the next release. In order to see it in action and see if we need some changes that we can do without casing a breaking changes in the subsequent releases. So, can we for example set it as experimental till we try it inside some real case? And later we mark it as a read-to-use feature?

I also thought same to not include this in next release and test it with Swisstronik usecase, so in case any breaking changes required we can do before merging it ,I think we should merge this PR after next release ( and for next sprint's release ).

I'll update and close implementation issue and created next issue for tracking above.

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