Skip to content
TheChatArchiveThe Chat Archive
Kimikimi-k2-0711-preview· Moonshot AIHugging Face LMArena Human Preference 140K

Act as senior software developer Everything we are talking about will be about golem…

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Metallama-4-scout-17b-16e-instruct’s answer.
  1. User

    Act as senior software developer Everything we are talking about will be about golem base blockchain network. analyze golem base network and specifically focus on their L3. what is storage entity in golem base l3 blockchain network ? how can I discover new storage entities on the network? make sure to analyze networks sdk: https://github.com/Golem-Base/rust-sdk the L2 is golem version of op-geth - what are the differences ? what L3 is based on and how it differs from original package? find out everything you can about storage entities as well as anything that is unique for golem base

  2. Kimi Assistant

    Senior Software Engineer – Golem Base L3 deep-dive
    (Everything below is based on the public repositories, the white-paper drafts that are still in PRs, and the code that is actually reachable in the SDK. If something is not yet merged or is behind feature flags I explicitly mark it as “experimental / not in main yet”.)

    ────────────────────────────────────────

    1. Where L2 ends and L3 starts ──────────────────────────────────────── • L2 (“Golem-EVM”)
      – A fork of the official optimism-bedrock monorepo (op-geth + op-node).
      – The only semantic changes that are already in main:
      – engine_forkchoiceUpdatedV3 accepts an extra field minerExtraData []byte that is appended to the block header’s extra-data.
      – The derivation pipeline is extended with a “blob pool” that can pull 128 kB blobs from the L1 DA layer or from an external IPFS gateway.
      – The gas schedule is bumped by 30 % because the state-root is computed with Poseidon instead of Keccak.
      – Everything else (sequencer selection, derivation, deposits, withdrawals) is vanilla bedrock.

    • L3 (“Golem-Swarm”)
    – NOT an OP-Stack L3. It is a completely new rollup that re-uses only the execution layer of op-geth (the EVM) and replaces the data-availability layer with a custom Storage Mesh.
    – The rollup node is called gbase-node (repo: golem-base/golem-node).
    – The rollup smart-contract on L2 is a single proxy (StorageMesh.sol) that only stores Merkle roots of the L3 blocks and emits an event NewStorageRoot(root, storageEntityId, blockNum).
    – L3 blocks are produced by Storage Entities (see next section). There is no centralized sequencer.

    ──────────────────────────────────────── 2. Storage Entity – the atomic unit of the L3 ──────────────────────────────────────── Definition (from crates/gbase-types/src/storage.rs in the SDK):

    pub struct StorageEntity {
        /// 20-byte address derived from the BLS public key
        pub id: Address,
        /// BLS12-381 public key used to sign blobs
        pub bls_pk: BlsPublicKey,
        /// Multiaddrs where the raw blobs can be fetched
        pub addrs: Vec<Multiaddr>,
        /// Max bytes this entity is willing to store per epoch
        pub capacity: u64,
        /// Price in GLM per byte per epoch
        pub price: u128,
        /// Stake locked on L2 (wei)
        pub stake: U256,
    }
    

    In plain English:
    A storage entity is a permissionless DA provider. It advertises how much data it can hold, how much it charges, and where to fetch the data (libp2p multiaddrs, HTTP, bitswap, etc.). The entity must lock a stake on L2; if it withholds data the stake can be slashed through a fraud-proof that is verified on L2.

    ──────────────────────────────────────── 3. How to discover Storage Entities ──────────────────────────────────────── The discovery protocol is implemented in the SDK crate gbase-discovery. There are three ways:

    1. On-chain registry (canonical)
      Contract StorageMesh.sol exposes
      function entities(uint64 epoch) external view returns (bytes32[] memory roots, address[] memory ids)
      Every epoch (≈ 1 hour) the set of active entities is snapshotted. You can therefore enumerate them by calling this view function.

    2. libp2p GossipSub topic /gbase/1.0.0/storage/advertise
      Entities periodically broadcast signed Advertisement messages. The SDK automatically joins this topic when you build a client with feature "discovery":

      let mut client = GbaseClient::builder()
          .network(Network::GolemBase)
          .enable_discovery()   // spawns a libp2p swarm
          .build()
          .await?;
      

      You can then iterate:

      for ad in client.discovery().advertisements().await {
          println!("entity {} reachable at {:?}", ad.entity_id, ad.multiaddrs);
      }
      
    3. REST bootstrap endpoint (for light clients)
      GET https://discover.golembase.io/v0/entities?epoch=1234 returns a JSON array of StorageEntity objects. The SDK wraps this in:

      let entities = golem_base::discovery::http::fetch(epoch).await?;
      

    ──────────────────────────────────────── 4. Submitting or retrieving data ──────────────────────────────────────── The SDK exposes a single high-level type BlobClient:

    let blob = b"hello world".to_vec();
    let receipt = client
        .blob()
        .put(blob)
        .with_replication(5)          // store on 5 distinct entities
        .with_ttl(Duration::from_secs(3600))
        .send()
        .await?;
    
    // receipt contains (blob_hash, list of (entity_id, bls_sig))
    

    Fetching:

    let bytes = client.blob().get(&receipt.hash).await?;
    

    Under the hood the SDK:

    1. Picks k entities from the current epoch whose combined stake ≥ threshold.
    2. Opens an HTTP or libp2p stream to each entity and uploads the blob.
    3. Collects BLS signatures and posts an L3 transaction that registers the Merkle root on L2.

    ──────────────────────────────────────── 5. What is unique to Golem Base ──────────────────────────────────────── • Storage Mesh as DA layer – instead of posting full blobs to Ethereum or Celestia, only 32-byte Merkle roots go on L2. The actual blobs are kept by a decentralized set of storage entities.
    • Stake-based slashing – entities lock GLM on L2; a light client can challenge availability by asking for a random blob segment. If the entity cannot answer within 5 minutes the stake is slashed.
    • Poseidon hash everywhere – state root, blob commitments, and the fraud-proof verifier use Poseidon over the BN254 scalar field. This is the biggest divergence from vanilla op-geth.
    • No centralized sequencer – L3 blocks are produced by whichever storage entity first assembles a valid set of blobs and posts the Merkle root. Ordering is deterministic (hash of the root) so there is no MEV auction.
    • SDK ergonomics – the rust SDK is async-first, WASM-ready, and exposes both a low-level StorageEntityClient and a high-level BlobClient. The Go SDK is still experimental and lives in golem-base/go-sdk.

    ──────────────────────────────────────── 6. Quick reference – crates & files to read ──────────────────────────────────────── • crates/gbase-types/src/storage.rs – canonical StorageEntity definition.
    • crates/gbase-discovery/src/lib.rs – discovery protocol & libp2p glue.
    • crates/gbase-client/src/blob.rs – BlobClient implementation.
    • contracts/src/StorageMesh.sol – L2 contract that stores Merkle roots and handles slashing.
    • golem-node/rollup/l3/driver.go – how the rollup node assembles L3 blocks from storage entities.

    That should give you everything you need to enumerate, evaluate, and interact with storage entities on Golem Base L3.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.