8000 Separate out AggregationStrategy by voltrevo · Pull Request #153 · getwax/bls-wallet · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Nov 5, 2023. It is now read-only.

Separate out AggregationStrategy #153

Merged
merged 2 commits into from
Mar 8, 2022
Merged

Separate out AggregationStrategy #153

merged 2 commits into from
Mar 8, 2022

Conversation

voltrevo
Copy link
Collaborator
@voltrevo voltrevo commented Mar 7, 2022

What is this PR doing?

Separates AggregationStrategy from BundleService so that all the logic for converting a known set of eligible bundles into a concrete aggregate bundle for submitting is in one place. (Basically just cut and paste half of BundleService and then fix some imports.)

This will make it easier eg to implement mev and other more complex strategies.

It also makes BundleService more focused on the admin side of receiving bundles and deciding when to try to submit things on chain.

How can these changes be manually tested?

Run the premerge script.

Does this PR resolve or contribute to any issues?

Resolves #152.

Checklist

  • I have manually tested these changes
  • Post a link to the PR in the group chat

Guidelines

  • If your PR is not ready, mark it as a draft
  • The resolve conversation button is for reviewers, not authors
    • (But add a 'done' comment or similar)

@github-actions github-actions bot added the aggregator Aggregator backend related label Mar 7, 2022
Comment on lines +1 to +3
export default function plus(a: number, b: number) {
return a + b;
}
Copy link
Collaborator
@jacque006 jacque006 Mar 7, 2022

Choose a reason for hiding this comment

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

Must've missed this last round, seems like overkill to have this separated out when something like (acc: number, numActions: number) => acc + numActions would do and be more descriptive.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah I missed the second usage, makes a little more sense now.

@voltrevo voltrevo merged commit bde49c6 into main Mar 8, 2022
@voltrevo voltrevo deleted the bw-152-modular-agg-logic branch March 8, 2022 05:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
aggregator Aggregator backend related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make aggregation logic more modular
2 participants
0