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

Backport deps updates, refactorings and fixes from master #3101

Merged
merged 75 commits into from
Apr 20, 2022

Conversation

andrevmatos
Copy link
Contributor

Fixes #3100

Short description
In order to keep stable aka v2 maintained, we need to backport the updates and refactorings (code quality) from the work done for Arbitrum into the stable branch. This includes the fix for the linked bug, which is also currently affecting Goerli. Keeping dependencies up to date is also important for security, in order to ensure we're not hit by fixed security flaws.

This doesn't pull the schema and contracts changes, which remain in master for arbitrum only, but keep the rest of the codebase somehow closer to master in order to facilitate any later bugfix and updates.

Most of these commits were already reviewed as part of Arbitrum work (sans conflict fixes). Otherwise, just the last 6 commits should require independent review.

Definition of Done

  • Steps to manually test the change have been documented
  • Acceptance criteria are met
  • Change has been manually tested by the reviewer (dApp)

Steps to manually test the change (dApp)

renovate-bot and others added 30 commits January 6, 2022 08:52
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.3 to 1.14.7.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](follow-redirects/follow-redirects@v1.14.3...v1.14.7)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [shelljs](https://github.com/shelljs/shelljs) from 0.8.4 to 0.8.5.
- [Release notes](https://github.com/shelljs/shelljs/releases)
- [Changelog](https://github.com/shelljs/shelljs/blob/master/CHANGELOG.md)
- [Commits](shelljs/shelljs@v0.8.4...v0.8.5)

---
updated-dependencies:
- dependency-name: shelljs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.2 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Commits](node-fetch/node-fetch@v2.6.2...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.2 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Commits](node-fetch/node-fetch@v2.6.2...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [cached-path-relative](https://github.com/ashaffer/cached-path-relative) from 1.0.2 to 1.1.0.
- [Release notes](https://github.com/ashaffer/cached-path-relative/releases)
- [Commits](https://github.com/ashaffer/cached-path-relative/commits)

---
updated-dependencies:
- dependency-name: cached-path-relative
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.7 to 1.14.8.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](follow-redirects/follow-redirects@v1.14.7...v1.14.8)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [simple-get](https://github.com/feross/simple-get) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/feross/simple-get/releases)
- [Commits](feross/simple-get@v3.1.0...v3.1.1)

---
updated-dependencies:
- dependency-name: simple-get
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.3 to 1.5.7.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](unshiftio/url-parse@1.5.3...1.5.7)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
First of all, Bespin is not the most recent version name for the Python client
anymore. Nevertheless it is no more necessary to reference its implementation
anymore here. Especially as the next major release of the contracts will be only
supported by the Light Client.
Bumps [prismjs](https://github.com/PrismJS/prism) from 1.25.0 to 1.27.0.
- [Release notes](https://github.com/PrismJS/prism/releases)
- [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md)
- [Commits](PrismJS/prism@v1.25.0...v1.27.0)

---
updated-dependencies:
- dependency-name: prismjs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.7 to 1.5.10.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](unshiftio/url-parse@1.5.7...1.5.10)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Also, emit *processed events even in case of messageId collision
This prevents trying to fetch events from negative blocks when
fromBlock=1
The former is a cached getter function to fetch the timestamp (in
millis) for a specific blockNumber, and the later is a cold cached
(shareReplay'd) observable to fetch the contract's constant
settleTimeout
…Epic

blockTimeEpic can now assume deps.getBlockTimestamp is cached, instead
of its own internal cache; we still need a queue to ensure we try first
past fetched blocks.
renovate-bot and others added 6 commits April 12, 2022 18:26
Arbitrum has a different (and variable per amount) gasLimit for
ETH transfers (usually around 410k gas). We remove the hardcoding of
this here, and estimate to get the exact limit needed, in order to
deplete account (when value is default or bigger than current balance).
`transferOnchainTokens` tx is performed directly in the method body, and
could fail with parallel calls (with `nonce` errors, as already handled
and retried on the epics). Adds retry logic to this method.
Additionally, planUDCWithdraw didn't have an easy way to withdraw whole
deposit (as `transferOnchain[Tokens|Balance]` have), so we add it here.
Besides `/mint`ing, `/tokens/:address` now allows to fetch balance
(`GET /`) and to `POST /transfer` (body.to, body.value), and also
`/balance` for on-chain ETH.
A new `POST /exit` endpoint allows to close and settle all channels,
plan and withdraw from UDC, and then (optionally) transfer all known
tokens to a `beneficiary` address and finally all (possible) ETH.
@andrevmatos andrevmatos added enhancement New feature or request sdk 🖥 refactor dependencies Pull requests that update a dependency file cli 🔤 Command-line SDK-based Node.js Client issues labels Apr 13, 2022
@andrevmatos andrevmatos requested a review from weilbith April 13, 2022 00:27
@andrevmatos andrevmatos self-assigned this Apr 13, 2022
@codecov
Copy link

codecov bot commented Apr 13, 2022

Codecov Report

Merging #3101 (2198674) into stable (99a3f0a) will increase coverage by 0.07%.
The diff coverage is 90.35%.

@@            Coverage Diff             @@
##           stable    #3101      +/-   ##
==========================================
+ Coverage   93.06%   93.14%   +0.07%     
==========================================
  Files         213      213              
  Lines        8513     8591      +78     
  Branches     1362     1473     +111     
==========================================
+ Hits         7923     8002      +79     
- Misses        483      530      +47     
+ Partials      107       59      -48     
Flag Coverage Δ
dapp 88.83% <ø> (+0.70%) ⬆️
dapp.unit 88.83% <ø> (+0.70%) ⬆️
sdk 95.43% <90.35%> (-0.34%) ⬇️
sdk.e2e 72.57% <67.51%> (-0.31%) ⬇️
sdk.integration 79.49% <63.95%> (-0.80%) ⬇️
sdk.unit 49.38% <44.67%> (+0.09%) ⬆️

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

Impacted Files Coverage Δ
raiden-ts/src/epics.ts 98.94% <ø> (ø)
raiden-ts/src/services/types.ts 100.00% <ø> (ø)
raiden-ts/src/channels/epics/close.ts 91.80% <50.00%> (-1.42%) ⬇️
raiden-ts/src/utils/types.ts 94.50% <50.00%> (-2.13%) ⬇️
raiden-ts/src/db/utils.ts 90.52% <75.00%> (+0.05%) ⬆️
raiden-ts/src/utils/ethers.ts 89.47% <77.27%> (-1.96%) ⬇️
raiden-ts/src/helpers.ts 87.50% <86.84%> (-0.95%) ⬇️
raiden-ts/src/services/utils.ts 96.29% <89.74%> (-1.98%) ⬇️
raiden-ts/src/channels/epics/block.ts 100.00% <100.00%> (ø)
raiden-ts/src/config.ts 94.59% <100.00%> (ø)
... and 69 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 99a3f0a...2198674. Read the comment docs.

@weilbith
Copy link
Contributor

To merge this, we need to locally serve the current gh-pages version, install it, create some state etc. Then deploy locally this version and see if it works.

@andrevmatos
Copy link
Contributor Author

andrevmatos commented Apr 13, 2022

I've tested locally with old state (CLI, channels and udc deposits) in goerli, and this version worked fine; performed some direct transfers, everything working as expected.

@weilbith
Copy link
Contributor

So just the dApp is missing. :)

@andrevmatos
Copy link
Contributor Author

The changes merged only touch SDK and CLI. dApp's state (which is quite small) wasn't touched. Feel free to test it if you require it for approval =)

andrevmatos and others added 5 commits April 20, 2022 07:22
This index was causing a hanging on state.spec.ts, and isn't needed for
normal SDK usage.
Replace cli's raiden .sh with node script, and ensure CI's
publish_workspace_on_npm_registry depends on build_cli
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli 🔤 Command-line SDK-based Node.js Client issues dependencies Pull requests that update a dependency file enhancement New feature or request refactor sdk 🖥
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants