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

feat(sender): support web3signer #1524

Merged
merged 16 commits into from
Oct 3, 2024
Merged

Conversation

NazariiDenha
Copy link
Contributor

@NazariiDenha NazariiDenha commented Sep 26, 2024

Purpose or design rationale of this PR

Instead of storing a private key in config.json (major risk of leaking secrets), we initialize a secure wallet(web3signer) as a standalone service. rollup-relayer will then send signing requests to this service.

This PR adds desired functionality into rollup-relayer, specifically to sender

Currently web3signer doesn't support BlobTx, so CommitSender still need sign txs ad before. Changed configuration relayer, so now type of signing may be changed (PrivateKey or RemoteSigner)

task

PR title

Your PR title must follow conventional commits (as we are doing squash merge for each PR), so it must start with one of the following types:

  • build: Changes that affect the build system or external dependencies (example scopes: yarn, eslint, typescript)
  • ci: Changes to our CI configuration files and scripts (example scopes: vercel, github, cypress)
  • docs: Documentation-only changes
  • feat: A new feature
  • fix: A bug fix
  • perf: A code change that improves performance
  • refactor: A code change that doesn't fix a bug, or add a feature, or improves performance
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
  • test: Adding missing tests or correcting existing tests

Deployment tag versioning

Has tag in common/version.go been updated or have you added bump-version label to this PR?

  • No, this PR doesn't involve a new deployment, git tag, docker image tag
  • Yes

Breaking change label

Does this PR have the breaking-change label?

  • No, this PR is not a breaking change
  • Yes

@codecov-commenter
Copy link

codecov-commenter commented Sep 26, 2024

Codecov Report

Attention: Patch coverage is 63.72093% with 78 lines in your changes missing coverage. Please review.

Project coverage is 52.01%. Comparing base (a1d1cbc) to head (9a0dd93).

Files with missing lines Patch % Lines
...p/internal/controller/sender/transaction_signer.go 69.56% 21 Missing and 7 partials ⚠️
rollup/internal/controller/relayer/l2_relayer.go 40.00% 20 Missing and 4 partials ⚠️
common/testcontainers/testcontainers.go 71.73% 9 Missing and 4 partials ⚠️
rollup/internal/controller/sender/sender.go 55.55% 12 Missing ⚠️
rollup/internal/controller/relayer/l1_relayer.go 66.66% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1524      +/-   ##
===========================================
+ Coverage    51.81%   52.01%   +0.20%     
===========================================
  Files          155      156       +1     
  Lines        12835    12974     +139     
===========================================
+ Hits          6651     6749      +98     
- Misses        5610     5641      +31     
- Partials       574      584      +10     
Flag Coverage Δ
common 44.60% <71.73%> (+1.62%) ⬆️
coordinator 17.22% <ø> (ø)
database 42.48% <ø> (ø)
rollup 56.21% <61.53%> (+0.28%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Thegaram
Thegaram previously approved these changes Sep 27, 2024
rollup/internal/controller/sender/sender.go Outdated Show resolved Hide resolved
rollup/internal/controller/sender/transaction_signer.go Outdated Show resolved Hide resolved
rollup/internal/controller/sender/transaction_signer.go Outdated Show resolved Hide resolved
colinlyguo
colinlyguo previously approved these changes Sep 27, 2024
Copy link
Member

@colinlyguo colinlyguo left a comment

Choose a reason for hiding this comment

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

great work and lgtm. just some very small nitpicks.

rollup/internal/controller/sender/transaction_signer.go Outdated Show resolved Hide resolved
rollup/internal/controller/sender/transaction_signer.go Outdated Show resolved Hide resolved
rollup/internal/config/relayer.go Outdated Show resolved Hide resolved
rollup/internal/config/relayer.go Outdated Show resolved Hide resolved
Thegaram
Thegaram previously approved these changes Sep 30, 2024
colinlyguo
colinlyguo previously approved these changes Sep 30, 2024
Copy link
Member

@colinlyguo colinlyguo left a comment

Choose a reason for hiding this comment

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

lgtm.

@colinlyguo colinlyguo changed the title Feat/support web3signer feat(sender): support web3signer Sep 30, 2024
@NazariiDenha NazariiDenha merged commit e3c87e6 into develop Oct 3, 2024
14 checks passed
@NazariiDenha NazariiDenha deleted the feat/support-web3signer branch October 3, 2024 10:49
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.

5 participants