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

Implement mithril client wasm in explorer #1426

Merged
merged 12 commits into from Jan 12, 2024

Conversation

dlachaume
Copy link
Collaborator

@dlachaume dlachaume commented Jan 9, 2024

Content

This PR includes the implementation of mithril-client-wasm library in the Mithril explorer. It adds a new feature to verify certificates using the WASM library.

Pre-submit checklist

  • Branch
    • Tests are provided (if possible)
    • Crates versions are updated (if relevant)
    • Commit sequence broadly makes sense
    • Key commits have useful messages
  • PR
    • No clippy warnings in the CI
    • Self-reviewed the diff
    • Useful pull request description
    • Reviewer requested
  • Documentation
    • Update README file (if relevant)
    • Update documentation website (if relevant)
    • Add dev blog post (if relevant)

Comments

  • wasm-pack build command in the Makefile of the mithril-client-wasm lib had to be modified to add the --target web option. This greatly simplifies the configuration for Next.js projects. Commands executed to build the library in the CI have also been updated.
  • The CI's actions had to be reworked. The contents of the file docs.yml have been moved to the file ci.yml. This has been done to handle the yarn install step in the build-test-explorer job.
    This job needs mithril-client-wasm to be built and the artifact published to install the dependency in the mithril-explorer project.

Issue(s)

Closes #1409

@dlachaume dlachaume self-assigned this Jan 9, 2024
Copy link

github-actions bot commented Jan 9, 2024

Test Results

  3 files  ±0   32 suites  ±0   8m 31s ⏱️ - 1m 18s
739 tests ±0  739 ✅ ±0  0 💤 ±0  0 ❌ ±0 
812 runs  ±0  812 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 32f6442. ± Comparison against base commit d34c487.

♻️ This comment has been updated with latest results.

error: `experiments.layers` must be enabled

error: webpack import WASM file fail
This seems to be a known behaviour.
@dlachaume dlachaume force-pushed the damien/1409/implement-mithril-client-wasm-in-explorer branch from d31fa69 to 96aad37 Compare January 10, 2024 07:59
Copy link
Member

@jpraynaud jpraynaud left a comment

Choose a reason for hiding this comment

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

LGTM 👍

I left few comments below

mithril-client-wasm/Makefile Outdated Show resolved Hide resolved
mithril-client-wasm/www/index.js Outdated Show resolved Hide resolved
mithril-client-wasm/www/index.js Outdated Show resolved Hide resolved
mithril-explorer/src/components/VerifyCertificate/index.js Outdated Show resolved Hide resolved
mithril-explorer/src/components/VerifyCertificate/index.js Outdated Show resolved Hide resolved
mithril-explorer/src/utils.js Outdated Show resolved Hide resolved
mithril-explorer/src/utils.js Outdated Show resolved Hide resolved
@dlachaume dlachaume force-pushed the damien/1409/implement-mithril-client-wasm-in-explorer branch from e7a888f to 0b2d1af Compare January 10, 2024 10:26
@dlachaume dlachaume force-pushed the damien/1409/implement-mithril-client-wasm-in-explorer branch 2 times, most recently from bee74b8 to 5aaf4f2 Compare January 10, 2024 12:58
@dlachaume dlachaume force-pushed the damien/1409/implement-mithril-client-wasm-in-explorer branch 2 times, most recently from e193566 to 7a2398a Compare January 10, 2024 17:10
@dlachaume dlachaume force-pushed the damien/1409/implement-mithril-client-wasm-in-explorer branch 2 times, most recently from 917e39c to 8331a8a Compare January 10, 2024 17:31
@dlachaume dlachaume force-pushed the damien/1409/implement-mithril-client-wasm-in-explorer branch 2 times, most recently from f67a58a to a03ddcb Compare January 10, 2024 17:45
@dlachaume dlachaume force-pushed the damien/1409/implement-mithril-client-wasm-in-explorer branch 2 times, most recently from f135c1a to 137b1e9 Compare January 10, 2024 18:02
@dlachaume dlachaume force-pushed the damien/1409/implement-mithril-client-wasm-in-explorer branch from 137b1e9 to baf3a9c Compare January 10, 2024 18:13
@dlachaume dlachaume force-pushed the damien/1409/implement-mithril-client-wasm-in-explorer branch from baf3a9c to 7c24c46 Compare January 11, 2024 08:52
@dlachaume dlachaume force-pushed the damien/1409/implement-mithril-client-wasm-in-explorer branch 2 times, most recently from 265df91 to 0875c39 Compare January 11, 2024 09:28
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@dlachaume dlachaume force-pushed the damien/1409/implement-mithril-client-wasm-in-explorer branch 2 times, most recently from 19d3ff0 to 7c056eb Compare January 11, 2024 09:42
@dlachaume dlachaume force-pushed the damien/1409/implement-mithril-client-wasm-in-explorer branch from 7c056eb to c8d2aec Compare January 11, 2024 09:52
@dlachaume dlachaume force-pushed the damien/1409/implement-mithril-client-wasm-in-explorer branch from c8d2aec to 53e7d53 Compare January 11, 2024 10:28
- Move function that handles calculation of processing time
- Move function that retrieves aggregator network from its url
- Rename `init` to `initMithrilClient`
By running 'npm update'
This was done this way to handle the `yarn install` step in the build-test-explorer job.
It needs mithril-client-wasm library to be compiled to install the dependency.
@dlachaume dlachaume force-pushed the damien/1409/implement-mithril-client-wasm-in-explorer branch from f9286b2 to ff3fb20 Compare January 11, 2024 13:19
- Add build command with make dev
- Add 'mithril-client-wasm' compilation in Readme
@dlachaume dlachaume force-pushed the damien/1409/implement-mithril-client-wasm-in-explorer branch from 70d11cf to 32f6442 Compare January 11, 2024 15:18
@dlachaume dlachaume merged commit 5ec585a into main Jan 12, 2024
35 checks passed
@dlachaume dlachaume deleted the damien/1409/implement-mithril-client-wasm-in-explorer branch January 12, 2024 09:08
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.

Light Wallet: Implement the mithril client WASM package in the explorer
3 participants