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

Migrate from grpc to grpc-js. #2936

Merged
merged 1 commit into from
Feb 4, 2021
Merged

Migrate from grpc to grpc-js. #2936

merged 1 commit into from
Feb 4, 2021

Conversation

jholdstock
Copy link
Member

  • Change app dependency from "grpc" to "@grpc-js".
  • Regenerate all proto files with generate_package_definition flag.
  • Remove unused files annotations_pb.js and http_pb.js, and don't regenerate them regen.sh.
  • In the regen.sh for LN protos, use protoc installed locally in node_modules rather than one provided by the system.

Some nice stats...

Before this PR After
yarn time 248s 20s
yarn package time 14m 41s 8m 43s
decrediton-v1.6.0.tar.gz size 260MB 210MB

@jholdstock jholdstock marked this pull request as draft November 16, 2020 08:53
@jholdstock
Copy link
Member Author

I've converted this to a draft because it should not be merged right now.

  • Retrying mechanism from [LN] Improve connection procedure #2935 should be merged first
  • A change is needed in dcrlnd. A small sleep before shutting down the unlock service prevents grpc-js throwing Error: 14 UNAVAILABLE: Connection dropped

@xaur
Copy link
Contributor

xaur commented Dec 5, 2020

decrediton-v1.6.0.tar.gz size 260MB 210MB

Epic, thank you!

@alexlyp
Copy link
Member

alexlyp commented Jan 28, 2021

@matheusd @jholdstock did the needed changes in dcrlnd happen? Was hoping to get this in soon so we could include in the upcoming patch release

@jholdstock
Copy link
Member Author

Not merged yet decred/dcrlnd#122

- Change app dependency from `"grpc"` to `"@grpc-js"`.
- Regenerate all proto files with `generate_package_definition` flag.
- Remove unused files `annotations_pb.js` and `http_pb.js`, and don't regenerate them `regen.sh`.
- In the `regen.sh` for LN protos, use protoc installed locally in node_modules rather than one provided by the system.
@jholdstock
Copy link
Member Author

Rebased and bumped grpc/grpc-js from 1.2.0 to 1.2.5 (latest)

@matheusd
Copy link
Member

I hadn't merged the dcrlnd one because we weren't going to merge this for 1.6, but since that's now released I'll merge the dcrlnd change

@alexlyp
Copy link
Member

alexlyp commented Jan 29, 2021

Ah great thanks. Aiming to add this to the 1.6.1 patch release I think.

Copy link
Member

@matheusd matheusd left a comment

Choose a reason for hiding this comment

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

Tested with the current master dcrlnd

@jholdstock jholdstock marked this pull request as ready for review January 30, 2021 11:16
@alexlyp alexlyp merged commit e6c5304 into decred:master Feb 4, 2021
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.

4 participants