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

refactor: change eth-pm using lightnode, filter to now use relay #148

Merged
merged 1 commit into from
Nov 10, 2022

Conversation

danisharora099
Copy link
Contributor

@danisharora099 danisharora099 commented Nov 7, 2022

This PR addresses #88:

  • switch the example from using light node with filter and store to now using relay
  • setup craco as the bundler

TODO/confirm:

  • the number on waku.relay.getPeers() does not return a number more than 1 for some reason

@fryorcraken
Copy link
Collaborator

the number on waku.relay.getPeers() does not return a number more than 1 for some reason

Yep that's expected as we only connect to one peer by default.

We can change that once we have implement Waku peer exchange, did some dog fooding of DNS Discovery and run a second operator trial to ensure there are enough nodes to connect to.

@danisharora099
Copy link
Contributor Author

the number on waku.relay.getPeers() does not return a number more than 1 for some reason

Yep that's expected as we only connect to one peer by default.

We can change that once we have implement Waku peer exchange, did some dog fooding of DNS Discovery and run a second operator trial to ensure there are enough nodes to connect to.

Gotcha ok!

Also, not sure why the CI hasn't executed on these yet 🤔

"start": "react-scripts start",
"build": "react-scripts build",
"eject": "react-scripts eject",
"start": "GENERATE_SOURCEMAP=false PORT=3001 craco start",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Oooh, does this remove all the sourcemap warnings? Interesting. I did do some upstream PR to help with those ChainSafe/js-libp2p-gossipsub#337

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, this doesn't generate sourcemap altogether; don't think we need it in our case.

"@ethersproject/shims": "^5.5.0",
"@types/craco__craco": "^6.4.0",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Where do you use the typing?

Copy link
Contributor Author

@danisharora099 danisharora099 Nov 9, 2022

Choose a reason for hiding this comment

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

I was trying to initiialise craco.config.js in ts instead so installed types, but ended up reverting to js because of some weird bugs and, from what it looked like, the lack of TS support on craco.

Pushed a commit to remove this as a dependency.

@fryorcraken
Copy link
Collaborator

Please confirm you tested locally and it still works.
Also need to sign your commits to merge.

@fryorcraken
Copy link
Collaborator

Not sure what is going with the CI checks. Let's see if they get triggered when you force push after signing

@danisharora099
Copy link
Contributor Author

Not sure why the build on the CI is failing -- it builds fine for me locally 👀

@fryorcraken
Copy link
Collaborator

Not sure why the build on the CI is failing -- it builds fine for me locally eyes

Best to look at the logs to understand the failure:

Run pnpm install --frozen-lockfile
Lockfile is up to date, resolution step is skipped
 ERR_PNPM_OUTDATED_LOCKFILE  Cannot install with "frozen-lockfile" because pnpm-lock.yaml is not up to date with package.json

Note that in CI environments this setting is true by default. If you still need to run install in such cases, use "pnpm install --no-frozen-lockfile"
Error: Process completed with exit code 1.

I am guessing you did not commit changes to the pnpm-lock.file after removing the @types/_craco_craco dependency.
Or maybe did not run pnpm after removing the dependency.

@danisharora099
Copy link
Contributor Author

ok fixed - can merge it now @fryorcraken

@fryorcraken
Copy link
Collaborator

@danisharora099 some commits are not signed and I can't easily resign your commits (I am assuming there's a merge commit in there?). I'd suggest you squash, sign and push.

rm: source map generation for build

rm: unused dependency

sign commmit

add: pnpm-lock

rm: comment

refactor: change eth-pm using lightnode, filter to now use relay
@fryorcraken fryorcraken force-pushed the danisharora/switch-ethpm-relay branch from 98ad43c to 2c3a8af Compare November 10, 2022 10:23
@fryorcraken
Copy link
Collaborator

@danisharora099 some commits are not signed and I can't easily resign your commits (I am assuming there's a merge commit in there?). I'd suggest you squash, sign and push.

Ignore that, I squashed and signed.

@fryorcraken fryorcraken merged commit 985f738 into master Nov 10, 2022
@danisharora099 danisharora099 deleted the danisharora/switch-ethpm-relay branch November 10, 2022 14:42
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.

2 participants