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

chore: added disclaimer in frontend #77

Merged
merged 3 commits into from
Jun 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions bolt-web-demo/frontend/public/chainbound-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
61 changes: 50 additions & 11 deletions bolt-web-demo/frontend/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,11 @@ export default function Home() {
// If the event is a preconfirmation, extract the tx hash and slot number
// and display a message with the explorer URL
if (
event.message
.toLowerCase()
.includes("verified merkle proof for tx_hash")
event.message.toLowerCase().includes("verified merkle proof for tx")
) {
setPreconfIncluded(true);
dispatchEvent({
message: `Preconfirmation included`,
message: `Preconfirmed transaction included at slot ${preconfSlot}`,
link: `${explorerUrl}/slot/${preconfSlot}`,
timestamp: new Date().toISOString(),
});
Expand Down Expand Up @@ -144,10 +142,29 @@ export default function Home() {

return (
<main className="flex min-h-screen flex-col items-center p-24">
<div className="w-full max-w-5xl items-center justify-between lg:flex">
<div className="w-full max-w-6xl items-center justify-between lg:flex">
<Image src="/bolt-logo.png" alt="BOLT" width={100} height={100} />

<p>Your friendly preconfirmation companion.</p>
<div className="flex items-center gap-2.5 mt-2">
<p>
Powered by{" "}
<a
href="https://www.chainbound.io"
target="_blank"
rel="noreferrer"
className="underline underline-offset-1 decoration-dotted decoration-slate-700 cursor-pointer"
>
Chainbound
</a>
</p>
<Image
src="/chainbound-logo.svg"
alt="chainbound"
width={20}
height={20}
/>
<p>– v0.1.0</p>
</div>
</div>

{newSlotNumber < 128 ? (
Expand All @@ -173,16 +190,17 @@ export default function Home() {
)}
</>
) : (
<div className="w-full max-w-5xl pt-4">
<div className="w-full max-w-6xl pt-4">
{beaconClientUrl && providerUrl ? (
<div className="w-full">
<div className="grid gap-3 border p-4 border-gray-800">
<p className="text-lg">Step 1: send a transaction</p>
<small className="text-sm max-w-3xl">
<small className="text-sm">
By clicking this button you will create a transaction and send
it as a preconfirmation request to the BOLT sidecar of the
next proposer in line. This transaction is crafted from a
pre-funded account in the devnet for demo purposes.
next proposer in line. <br />
This transaction is crafted from a pre-funded account in the
devnet for demo purposes.
</small>

<div className="flex flex-col items-center">
Expand Down Expand Up @@ -244,7 +262,7 @@ export default function Home() {
</div>
</div>
) : (
<div className="w-full max-w-5xl pt-4">
<div className="w-full max-w-6xl pt-4">
<div className="grid gap-3 border p-4 border-gray-800">
<p className="text-lg">
Waiting for the devnet servers to start...
Expand All @@ -267,6 +285,27 @@ export default function Home() {
)}
</div>
)}

<div className="w-full max-w-6xl pt-4">
<div className="grid gap-3 p-4 border border-gray-800">
<p className="text-lg">Disclaimer</p>
<small className="text-sm">
This demo application showcases the BOLT protocol happy-case.
<br />
Real-world deployments should consider the following missing
components and features (which are under development):
<ul className="list-disc list-inside ml-3 mt-1">
<li>Automatic safety & liveness fault detection</li>
<li>On-chain dispute logic to verifiably attribute faults</li>
<li>BOLT RPC server proxy integration</li>
<li>
High network participation (at least 1 proposer opted-in in the
lookahead window)
</li>
</ul>
</small>
</div>
</div>
</main>
);
}
Expand Down
2 changes: 1 addition & 1 deletion mev-boost/server/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ func (m *BoostService) verifyConstraintProofs(responsePayload *BidWithInclusionP
log.Info(fmt.Sprintf("[BOLT]: Merkle proof verified for tx hash %s in %s", proof.TxHash.String(), elapsed))

// BOLT: send event to web demo
message := fmt.Sprintf("verified merkle proof for tx_hash %s in %v", proof.TxHash.String(), elapsed)
message := fmt.Sprintf("verified merkle proof for tx: %s in %v", proof.TxHash.String(), elapsed)
EmitBoltDemoEvent(message)
}
}
Expand Down