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: multiple executors #138

Merged
merged 6 commits into from
Dec 18, 2023
Merged

feat: multiple executors #138

merged 6 commits into from
Dec 18, 2023

Conversation

0xSulpiride
Copy link
Member

Description

  • feat: added relayers config which accepts an array of private keys of relayers
  • retained relayer config for backwards compatiblity
  • made beneficiary config optional, if it's not set, a relayer will always be a beneficiary

Tested on Mumbai with 2 relayers and 2 userops at once
https://mumbai.polygonscan.com/tx/0xced5180faa7ec629a37bfd2b008a8d139f0112ecb3e777694a3f0eb58ee557f0
https://mumbai.polygonscan.com/tx/0xe230ab3fde49e0348f5bdc34dfa72e3458ae052926510dfb90bd6b97783d69d4

When sent another userop and all relayers are busy:
image

After some time, when one of the relayers is released:
image

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Other (please describe):

Further comments (optional)

@0xSulpiride 0xSulpiride changed the title Multiple executors feat: multiple executors Dec 15, 2023
@@ -4,8 +4,9 @@
"entryPoints": [
"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789"
],
"relayer": "0xprivateKey",
"beneficiary": "0x690b9a9e9aa1c9db991c7721a92d351db4fac990",
"relayers": [
Copy link
Member

Choose a reason for hiding this comment

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

Should we consider an option of using a seed phrase and specify the list of relayers as well?

if (privKey.startsWith("0x")) {
wallets.push(new Wallet(privKey, provider));
} else {
wallets.push(Wallet.fromMnemonic(privKey).connect(provider));
Copy link
Member

Choose a reason for hiding this comment

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

Does this mean we can also use a mnemonic? If so we need to document that in README.md

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, we can use mnemonics. Added it in README

Copy link
Member

@ch4r10t33r ch4r10t33r left a comment

Choose a reason for hiding this comment

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

LGTM. Please ask Taylor to update our documentation.

@0xSulpiride 0xSulpiride merged commit a16360c into master Dec 18, 2023
3 of 4 checks passed
@0xSulpiride 0xSulpiride deleted the multiple-executors branch December 18, 2023 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants