Skip to content

Commit

Permalink
Update loggings to make sure builders are run correctly (#1867)
Browse files Browse the repository at this point in the history
Closes
EspressoSystems/marketplace-builder-core#42.

### This PR:
* Updates loggings to make sure we are running fallback and/or reserve
builders correctly.

### This PR does not:
* Change any logic.

### How to test this PR:
* Run the two builders on demo-native and observe the different
loggings.

<!-- ### Things tested -->
<!-- Anything that was manually tested (that is not tested in CI). -->
<!-- E.g. building/running of docker containers. Changes to docker demo,
... -->
<!-- Especially mention anything untested, with reasoning and link an
issue to resolve this. -->

<!-- Complete the following items before creating this PR -->
<!-- [ ] Issue linked or PR description mentions why this change is
necessary. -->
<!-- [ ] PR description is clear enough for reviewers. -->
<!-- [ ] Documentation for changes (additions) has been updated (added).
-->
<!-- [ ] If this is a draft it is marked as "draft".  -->

<!-- To make changes to this template edit
https://github.com/EspressoSystems/.github/blob/main/PULL_REQUEST_TEMPLATE.md
-->
  • Loading branch information
shenkeyao authored Aug 14, 2024
2 parents 036d0a9 + 7ba5f0e commit a712190
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion data/genesis/demo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fee_contract = '0xa15bb66138824a1c7167f5e85b957d04dd34e468'
timestamp = "1970-01-01T00:00:00Z"

[[upgrade]]
version = "0.2"
version = "0.3"
start_proposing_view = 5
stop_proposing_view = 15

Expand Down
13 changes: 8 additions & 5 deletions marketplace-builder/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,26 +206,29 @@ impl BuilderConfig {
let res =
run_non_permissioned_standalone_builder_service(hooks, senders, events_url)
.await;
tracing::error!(?res, "builder service exited");
tracing::error!(?res, "Reserve builder service exited");
if res.is_err() {
panic!("Builder should restart.");
panic!("Reserve builder should restart.");
}
});

tracing::info!("Reserve builder init finished");
} else {
let hooks = hooks::EspressoFallbackHooks { solver_api_url };

async_spawn(async move {
let res =
run_non_permissioned_standalone_builder_service(hooks, senders, events_url)
.await;
tracing::error!(?res, "builder service exited");
tracing::error!(?res, "Fallback builder service exited");
if res.is_err() {
panic!("Builder should restart.");
panic!("Fallback builder should restart.");
}
});

tracing::info!("Fallback builder init finished");
}

tracing::info!("Builder init finished");
Ok(Self {
global_state,
hotshot_events_api_url,
Expand Down
8 changes: 4 additions & 4 deletions process-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,7 @@ processes:
path: /healthcheck
failure_threshold: 100


# We use KeyDB (a Redis variant) to maintain consistency between
# We use KeyDB (a Redis variant) to maintain consistency between
# different parts of the CDN
# Cheating a bit here too, but KeyDB is not available as a Nix package.
# Could do local (SQLite) discovery, but removes some of the spirit
Expand Down Expand Up @@ -491,7 +490,7 @@ processes:
failure_threshold: 100

marketplace-reserve-builder:
disabled: true
# disabled: true
command: marketplace-builder
ports:
- "$ESPRESSO_BUILDER_SERVER_PORT:$ESPRESSO_BUILDER_SERVER_PORT"
Expand All @@ -516,7 +515,7 @@ processes:
failure_threshold: 100

marketplace-fallback-builder:
disabled: true
# disabled: true
command: marketplace-builder
ports:
- "$ESPRESSO_FALLBACK_BUILDER_SERVER_PORT:$ESPRESSO_FALLBACK_BUILDER_SERVER_PORT"
Expand All @@ -542,6 +541,7 @@ processes:
failure_threshold: 100

permissionless-builder:
disabled: true
command: permissionless-builder
ports:
- "$ESPRESSO_BUILDER_SERVER_PORT:$ESPRESSO_BUILDER_SERVER_PORT"
Expand Down
2 changes: 1 addition & 1 deletion types/src/v0/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ impl NodeType for SeqTypes {
type Membership = GeneralStaticCommittee<Self, PubKey>;
type BuilderSignatureKey = FeeAccount;
type Base = StaticVersion<0, 1>;
type Upgrade = StaticVersion<0, 2>;
type Upgrade = StaticVersion<0, 3>;
type AuctionResult = SolverAuctionResults;
const UPGRADE_HASH: [u8; 32] = [
1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
Expand Down

0 comments on commit a712190

Please sign in to comment.