# Crucible Hackathon: Opstack interop builder

**URL:** https://collective.flashbots.net/t/crucible-hackathon-opstack-interop-builder/3572
**Category:** SUAVE
**Created:** [June 21, 2024, 7:43pm UTC](https://collective.flashbots.net/t/crucible-hackathon-opstack-interop-builder/3572 "2024-06-21T19:43:36Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![jinsuk](https://collective.flashbots.net/user_avatar/collective.flashbots.net/jinsuk/32/2027_2.png) [@jinsuk](https://collective.flashbots.net/u/jinsuk)
#### Post date: [June 21, 2024, 7:43pm UTC](https://collective.flashbots.net/t/crucible-hackathon-opstack-interop-builder/3572/1 "2024-06-21T19:43:37Z")

</div>

## 👥 Team Information

- **Team Name: The Interoperable Foundation**
- **Team Members:**
  - Jinsuk (@jinsuk)
  - Sarah (@Shana)
  - Tedi (@tedinho)

## 💻 Project Repository

- **GitHub Link:**
  - op-intent service: [GitHub - flashbots/optimism at feat/interop\_builder · GitHub](https://github.com/flashbots/optimism/tree/feat/interop_builder)
  - op-geth with preconfirmation: [GitHub - avalonche/op-geth at interop-preconf · GitHub](https://github.com/avalonche/op-geth/tree/interop-preconf)
  - optimism-package: [GitHub - ethpandaops/optimism-package: A kurtosis package for deploying an optimistic rollup · GitHub](https://github.com/ethpandaops/optimism-package)

## 🎯 Project Goal

- **Project Name: Optimism Interop Builder**
- **Brief Description:**
  - What is the primary goal of your project?
    - Ensure synchronous inclusion of transactions across more than two rollups
    - Design an RPC method and data structure to express user intent at the op-intent backend
    - Block building according to the interop spec
    - Wanted to make an atonic transaction possible across multiple OP rollups. Developed coordinator services across four different sequencers.
    - Coordinator sends a transactions to the preconfirmation RPC endpoint which returns the log index to be parsed and used for the executing message
      - Accepts a graph bundle for sequential execution across multiple rollups

  - What are the non-goals?
    - Atomic inclusion of interop messages.
    - Handling safety of interop messages. We assumes that the rollups fully trust each other.
    - Considering reorg scenario. We work with the happy path only
    - Account abstraction or EIP 3074 AUTH/AUTHCALL enabled contract to facilitate signing of messages in the DAG

## 🔧 Challenges

- **Challenges Faced:**
  - Biggest pain point was that you need a log index from the initiating message to put into the executing message
  - If the destination block has earlier timestamp than the source block, synchronous inclusion is impossible due to [timestamp invariant](https://specs.optimism.io/interop/messaging.html#timestamp-invariant)
  - Adding chains to dependency set was not trivial because a transaction to `addDepndency` method in SystemConfig contract had to be proxied via a Safe contract.

## 🚀 Current State

- **Project Status at the End of Hackathon:**
  - What features are complete?
    - **op-intent:** multi chain intent coordinator service
      - `eth_sendGraphBundle` method to include multi chain bundle encoded in a DAG format.

 ![image](https://collective.flashbots.net/uploads/default/original/2X/e/e40f22c76e4b97472932fa1b26bfaacae83a68e1.png)

```go
        type Message struct {
        	ChainId *big.Int `json:"chainId"`
        	Data hexutil.Bytes `json:"data"`
        	Target common.Address `json:"target"`
        	Value *big.Int `json:"value"`
        }
        
        type GraphBundle struct {
        	Root Message `json:"root"`
        	Nodes []GraphBundle `json:"nodes"`
        }

```

- **op-geth with preconfirmation**
  - `eth_sendInteropBundle` RPC method
    - inserts bundles two blocks ahead
    - can be replaced by a bundle with higher gas fees
    - returns the logs emitted by transaction.

- What is still a work in progress?
  - Canceling the preconfirmed bundles

- Are there any known bugs or issues?
  - The synchronous transaction is impossible when destination block’s timestamp is lower than source block’s timestamp. If op labs want to pursue this path seriously, they need to rethink their spec on the timestamp invariant

## 📦 How to Run

- Prerequisites (e.g., software versions, dependencies)

- Step-by-step installation and setup guide

## 📝 Additional Notes

- Future plans for the project
  - Atomic inclusion of transactions
  - Handling large DAG (graph with more than 20 nodes across 4 rollups) inclusion by op-intent

- Acknowledgments
  - kurtosis team for providing us a easy way to launch multiple l2 devnets on our local machine

# ❓ Questions:

- You are using the OP interop spec?
- Is it atomic (i.e. all or nothing) or is it synchronous?
  - technically synchronous
