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

Marketplace builder in tests #1903

Merged
merged 10 commits into from
Aug 27, 2024
Merged

Marketplace builder in tests #1903

merged 10 commits into from
Aug 27, 2024

Conversation

QuentinI
Copy link
Contributor

@QuentinI QuentinI commented Aug 24, 2024

Closes #<ISSUE_NUMBER>

This PR:

  • Adds marketplace builder based on marketplace-builder-core to be run in TestNetwork
  • Adds config option to specify the builder's URL
  • Builder is started if we either start with or upgrade to MarketplaceVersion
  • Changes builder API hooks not to block transaction submission
  • As a drive-by, fixes solver client version in auction implementation

This PR does not:

  • Add any explicit tests targeting marketplace behaviour

Key places to review:

@QuentinI QuentinI marked this pull request as ready for review August 26, 2024 16:17
@QuentinI QuentinI marked this pull request as draft August 26, 2024 17:06
@QuentinI QuentinI marked this pull request as ready for review August 26, 2024 21:26
tracing::info!("Running builder against hotshot events API at {events_api_url}",);

let stream =
marketplace_builder_core::utils::EventServiceStream::<SeqTypes, V0_1>::connect(
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of V0_1, this should take in SequencerApiVersion

async-compatibility-layer = { workspace = true }
async-lock = "3.4.0"
async-lock = "2.2"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why don't we update async-lock to 3.4 in all deps?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can, but we should start with HotShot, otherwise we run into incompatibilities

if <V as Versions>::Upgrade::VERSION >= MarketplaceVersion::VERSION {
println!("Running marketplace builder!");
let (task, url) = run_marketplace_builder::<{ NUM_NODES }>(
cfg.network_config.builder_port(),
Copy link
Contributor

Choose a reason for hiding this comment

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

we can run both builders simultaneously so different ports?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, for example in case we upgrade from 0.2 -> 0.3

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah, but both of these builders are taking the same port i.e cfg.network_config.builder_port(),

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, I misinterpreted your comment. Fixed!

let mut legacy_builder_url = "http://example.com".parse().unwrap();
let mut marketplace_builder_url = "http://example.com".parse().unwrap();

if <V as Versions>::Base::VERSION <= MarketplaceVersion::VERSION {
Copy link
Contributor

@tbro tbro Aug 27, 2024

Choose a reason for hiding this comment

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

should this be just <, since we want to get marketplace builder when version == marketplace_version?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, I'll fix that, thanks

@QuentinI QuentinI changed the title [WIP] Marketplace builder in tests Marketplace builder in tests Aug 27, 2024
@tbro tbro merged commit e0ebc7a into main Aug 27, 2024
16 checks passed
@tbro tbro deleted the ag/real-builder-in-tests branch August 27, 2024 17:04
let events_url = hotshot_events_api_url.clone();
tracing::info!("Running permissionless builder against hotshot events API at {events_url}",);
// Start builder event loop
builder_state.event_loop();
Copy link
Member

Choose a reason for hiding this comment

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

Why do we no longer need the async_spawn(async move { ... }) wrap?

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