Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ import { SdsLink } from "@/components/SdsLink";
import { TabView } from "@/components/TabView";
import { InfoFieldItem } from "@/components/InfoFieldItem";
import { NoInfoLoadedView } from "@/components/NoInfoLoadedView";
import { BuildVerifiedBadge } from "@/components/BuildVerifiedBadge";
import {
BuildVerifiedBadge,
VerifiedBuildMessage,
} from "@/components/BuildVerifiedBadge";

import { formatEpochToDate } from "@/helpers/formatEpochToDate";
import { formatNumber } from "@/helpers/formatNumber";
Expand Down Expand Up @@ -310,6 +313,8 @@ export const ContractInfo = ({
);
};

const isSourceFromAttestation = !isSacType && wasmData && sourceRepo;

return (
<Box gap="lg">
<Card>
Expand Down Expand Up @@ -350,23 +355,25 @@ export const ContractInfo = ({
)}
</Box>

{!isSacType && wasmData && sourceRepo && (
<Notification
variant="warning"
title="Verified Build ≠ Source Code Verified"
>
The source code below comes from the GitHub repo at the specific
commit referenced in the contract’s build attestation. It’s a
point-in-time snapshot of what the GitHub Actions runner claims it
compiled to produce the Wasm. The attestation only proves the
deployed Wasm was generated by that specific Github Action run,
but it does not vouch that one can reproducibly build the Wasm
using the same source code.{" "}
{!isSacType && wasmData && (
<Notification variant="primary" title="Verified Build">
<VerifiedBuildMessage />
</Notification>
)}

{activeTab === "contract-source-code" && isSourceFromAttestation ? (
<Notification variant="warning" title="About this source code">
This source code comes from the GitHub repo at the specific commit
referenced in the contract’s build attestation — a point-in-time
snapshot of what the GitHub Actions runner claims it compiled to
produce the Wasm. It does not prove that rebuilding this source
produces the same Wasm.{" "}
<Link href="https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0055.md">
Learn more about SEP-55 Contract Build Verification
</Link>
</Notification>
)}
) : null}

<TabView
tab1={{
id: "contract-contract-spec",
Expand Down
40 changes: 24 additions & 16 deletions src/components/BuildVerifiedBadge.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,32 @@
"use client";

import { useCallback, useLayoutEffect, useRef, useState } from "react";
import { Badge, Icon, Link, Tooltip } from "@stellar/design-system";
import { Badge, Icon, Link, Tooltip, Text } from "@stellar/design-system";

import { BuildVerificationStatus } from "@/types/types";

/**
* Copy explaining what a SEP-55 verified build does and does not prove.
* Shared between the badge tooltip and the persistent banner in the Contract
* Explorer so the two cannot drift apart.
*/
export const VerifiedBuildMessage = () => (
<>
This contract’s deployed Wasm matches a GitHub Actions build attestation
from the source repository the contract declares, as described in{" "}
<Link
variant="primary"
href="https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0055.md"
>
SEP-55
</Link>
.{" "}
<Text as="span" size="sm" weight="medium">
It confirms build provenance, not source code correctness or safety.
</Text>
</>
);

export const BuildVerifiedBadge = ({
status,
disableMessage = false,
Expand Down Expand Up @@ -65,21 +87,7 @@ export const BuildVerifiedBadge = ({
Verified Build
</Badge>
),
message: (
<>
In{" "}
<Link
variant="primary"
href="https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0055.md"
>
SEP-55
</Link>{" "}
contract build verification proves a deployed smart contract’s binary
(Wasm) was produced by a specific, verifiable build process (e.g.,
GitHub + CI). It confirms build provenance, not source code
correctness or safety.
</>
),
message: <VerifiedBuildMessage />,
},
unverified_build: {
badge: (
Expand Down
180 changes: 90 additions & 90 deletions src/constants/networkLimits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,36 +87,36 @@ export const MAINNET_LIMITS: NetworkLimits = {
"persistent_rent_rate_denominator": "1215",
"temp_rent_rate_denominator": "2430",
"live_soroban_state_size_window": [
"1382170210",
"1382711686",
"1383187538",
"1383521170",
"1383585118",
"1383780366",
"1384035426",
"1384561042",
"1385212738",
"1385620246",
"1385763978",
"1386491415",
"1386797287",
"1387413867",
"1388164219",
"1388526483",
"1388620635",
"1389028751",
"1389267451",
"1389983687",
"1390612103",
"1390879279",
"1391030855",
"1391328663",
"1391679203",
"1392418995",
"1392965011",
"1393243355",
"1393569399",
"1393841599"
"1544831410",
Comment thread
jeesunikim marked this conversation as resolved.
"1545965906",
"1549257314",
"1550151674",
"1550953238",
"1551509566",
"1552235198",
"1553023674",
"1556616696",
"1557055460",
"1557836172",
"1558628120",
"1559229220",
"1562278345",
"1562966501",
"1566507270",
"1566601118",
"1567414174",
"1568298750",
"1569058146",
"1569707722",
"1570828246",
"1571479314",
"1571796730",
"1572377962",
"1573174606",
"1573734830",
"1574097486",
"1575426462",
"1576212302"
],
"state_target_size_bytes": "3000000000",
"rent_fee_1kb_state_size_low": "-17000",
Expand Down Expand Up @@ -157,36 +157,36 @@ export const TESTNET_LIMITS: NetworkLimits = {
"persistent_rent_rate_denominator": "1215",
"temp_rent_rate_denominator": "2430",
"live_soroban_state_size_window": [
"2579727827",
"2579795127",
"2579916793",
"2582176787",
"2582721447",
"2582899189",
"2582932649",
"2582965145",
"2582152325",
"2582507517",
"2581371251",
"2581598183",
"2581627179",
"2581745655",
"2581774355",
"2581821835",
"2582379121",
"2583350546",
"2583383742",
"2583415470",
"2583468702",
"2583512962",
"2584060797",
"2584093233",
"2584129785",
"2585389406",
"2585580383",
"2585838975",
"2585912907",
"2588466663"
"2638445196",
"2638481512",
"2638526673",
"2638512861",
"2637644489",
"2636945681",
"2620261914",
"2620313882",
"2620369174",
"2620401934",
"2620448262",
"2621456461",
"2622406005",
"2622439877",
"2622472417",
"2622549925",
"2622598493",
"2622631617",
"2624314486",
"2625425919",
"2625396049",
"2625247690",
"2625308966",
"2625377698",
"2625441638",
"2625874697",
"2625901505",
"2625980587",
"2625982467",
"2626005567"
],
"state_target_size_bytes": "4000000000",
"rent_fee_1kb_state_size_low": "-17000",
Expand Down Expand Up @@ -227,36 +227,36 @@ export const FUTURENET_LIMITS: NetworkLimits = {
"persistent_rent_rate_denominator": "1215",
"temp_rent_rate_denominator": "2430",
"live_soroban_state_size_window": [
"1370772",
"1370772",
"1370772",
"1370772",
"1370772",
"1370772",
"1370772",
"1370772",
"1370772",
"1370772",
"1370772",
"1370772",
"1370772",
"1370772",
"1370772",
"1370772",
"1370772",
"1370772",
"1370772",
"1370772",
"1370772",
"1370772",
"1370772",
"1370772",
"1370772",
"1370772",
"1370772",
"1370772",
"1370772",
"1370772"
"3759701",
"3759701",
"3759701",
"3759701",
"3759701",
"3759701",
"3759701",
"3759701",
"3759701",
"3759701",
"3759701",
"3759701",
"3759701",
"3759701",
"3759701",
"3759701",
"3759701",
"3759701",
"3759701",
"3759701",
"3759701",
"3759701",
"3759701",
"3759701",
"3759701",
"3759701",
"3759701",
"3759701",
"3759701",
"3759701"
],
"state_target_size_bytes": "4000000000",
"rent_fee_1kb_state_size_low": "-17000",
Expand Down
Loading