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

Add Documentation for Tangle AVS #51

Merged
merged 9 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
1 change: 1 addition & 0 deletions pages/developers/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"title": "Introduction"
},
"blueprints": "Blueprints",
"eigenlayer": "Eigenlayer Interoperability",
"services": "Actively Validated Services (AVS)",
"usecases": "Use Cases",
"-- specification-developers": {
Expand Down
21 changes: 21 additions & 0 deletions pages/developers/eigenlayer.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: EigenLayer Interoperability
---

# EigenLayer Interoperability

EigenLayer-Tangle interoperability allows seamless interaction between the EigenLayer and Tangle blockchain networks. This document covers the integration using the Tangle AVS, the use of the `eigensdk-rs` SDK for building AVSs in Rust, and the interoperability features provided by the Tangle network's Gadgets and blueprints.

## What is Tangle AVS?

The Tangle AVS is an Actively Validated Service (AVS) for EigenLayer that encapsulates a Tangle Validator Node within it. It allows the Tangle network to be validated through the EigenLayer infrastructure, creating a bridge between the two blockchain networks. This AVS is built using the `eigensdk-rs` SDK, a toolkit for developing AVSs in Rust.
drewstone marked this conversation as resolved.
Show resolved Hide resolved

### Key Features of Tangle AVS

- **Tangle Node Integration:** The Tangle AVS runs a fully operational Tangle Validator Node, enabling validation and interaction with the Tangle network directly from EigenLayer.
- **Rust-Based Development:** Built using the `eigensdk-rs` SDK, ensuring performance, safety, and ease of development for Rust-based applications.
- **Interoperability:** Seamless interoperability between Eigenlayer and Tangle networks, allowing assets, data, and functionality to be shared between them.

## Building Tangle AVS with `eigensdk-rs`

The `eigensdk-rs` SDK is a powerful toolkit for developing AVSs in Rust. It can be used for developing AVSs that run in Tangle or EigenLayer contexts. Below is a brief overview of how to use the SDK to build and deploy a Tangle AVS.
3 changes: 2 additions & 1 deletion pages/operators/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"introduction": "Get Started",
"node-basics": "Node Basics",
"validator": "Running a Validator",
"monitoring": "Node Monitoring"
"monitoring": "Node Monitoring",
"tangle-avs": "Tangle AVS"
}
6 changes: 6 additions & 0 deletions pages/operators/tangle-avs/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"quickstart": "Quickstart",
"cross-chain": "Cross-Chain Restaking",
"eigenlayer": "EigenLayer",
"symbiotic": "Symbiotic"
}
93 changes: 93 additions & 0 deletions pages/operators/tangle-avs/cross-chain.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
---
title: Cross-Chain Orchestration
description: Cross-Chain Orchestration
---

# Overview

Cross-Chain Restaking with Tangle introduces secure and reliable interactions
across different blockchain ecosystems. Our system ensures that cross-chain actions — especially
slashing — are executed seamlessly and consistently, regardless of the network on which they originate or occur.
By enabling cross-chain slashing and communication, Tangle ensures that validators and protocols remain secure
and accountable across a decentralized multi-chain environment.

In this section, we will explore Tangle’s approach to Cross-Chain Restaking, focusing on how slashing events
Tjemmmic marked this conversation as resolved.
Show resolved Hide resolved
are managed across different networks and how we use cross-chain communication protocols to maintain trust and
security between chains.

## Cross-Chain Slashing Mechanism

One of Tangle’s core innovations is the ability to enforce cross-chain slashing across multiple networks. This
capability enhances security and reduces malicious behavior, as validators know that misbehavior on any network can have
consequences across all networks they participate in.

### Key Aspects of Cross-Chain Slashing:

- Slashing Occurs on Tangle:
drewstone marked this conversation as resolved.
Show resolved Hide resolved
When a validator misbehaves on a third-party network, such as EigenLayer or Symbiotic, Tangle enforces the
slashing event. Regardless of which network is hosting the validator’s actions, slashing is performed on Tangle.
Similarly, slashing events that originate on Tangle can be forwarded to non-Tangle networks to be handled accordingly.
This centralized slashing mechanism ensures consistency and accountability.

- Slashing is Communicated Back to the Source Network:
Tjemmmic marked this conversation as resolved.
Show resolved Hide resolved
After a slashing event is executed on Tangle, a message is dispatched back to the source protocol (EigenLayer,
Symbiotic, etc.), informing the network of the penalty. This ensures that validators and protocols are properly
updated across ecosystems, reflecting the consequence of any misbehavior in both the slashing network and the original protocol.

## Cross-Chain Communication Protocols

To ensure that slashing events and other cross-chain actions are communicated efficiently between networks, Tangle
integrates several cross-chain communication protocols. These protocols are essential for message dispatching and help
maintain synchronization between different blockchains.

### Supported Protocols for Message Dispatching:

Bridges:
Bridges allow for secure and reliable cross-chain transfers of tokens, data, and messages. In the context of
Tangle, bridges serve as a critical infrastructure layer, enabling the delivery of slashing messages across networks.

Hyperlane:
Hyperlane is a protocol designed for general-purpose cross-chain messaging, which we use to facilitate secure
and efficient communication between Tangle and other networks. Hyperlane’s messaging layer helps Tangle dispatch slashing
messages quickly and with a high degree of trustlessness.

Sygma:
Sygma provides an additional layer of security for cross-chain message delivery. Tangle utilizes Sygma to ensure
that messages are delivered safely and that data remains intact throughout the cross-chain communication process.
Sygma’s focus on security helps us guarantee that slashing messages reach their destination reliably.

## Workflow: How It Works

Here’s an overview of how Tangle’s Cross-Chain Slashing operates:

1. Validator Misbehavior Detection:
A validator participating in both a Tangle Network and a non-Tangle network (e.g., EigenLayer, Symbiotic) is found guilty of some sort of misbehavior.

2. Slashing Event Triggered on Tangle:
Based on the infraction, a slashing event is initiated within the Tangle protocol. This is done by listening for relevant messages on said non-Tangle
network, then forwarding that to Tangle.

3. Message Dispatching:
After the slashing is executed, Tangle dispatches a message containing details of the slashing event back to the source network.
The message is transmitted using one of the supported cross-chain communication protocols (bridges, Hyperlane, Sygma).

4. Source Network Synchronization:
Upon receiving the message, the source network (e.g., EigenLayer) updates its own state to reflect the slashing event, ensuring consistency across chains.
This includes penalizing the validator within the original protocol, if necessary, and synchronizing with Tangle’s slashing record.

## Why Cross-Chain Interoperability is Essential

As decentralized finance and blockchain ecosystems continue to evolve, cross-chain interoperability becomes increasingly critical.
Validators often operate on multiple networks simultaneously, which increases both the complexity and risk of misbehavior.
With Tangle’s Cross-Chain Restaking functionalities, we provide the following benefits:

Universal Accountability:
Validators know that their actions on one network can lead to consequences across multiple chains, which deters malicious activity.

Security and Consistency:
Cross-chain slashing ensures that all protocols are kept in sync, enhancing security and trust across interconnected blockchain ecosystems.

Efficient and Reliable Communication:
By utilizing multiple communication protocols (Bridges, Hyperlane, Sygma), Tangle ensures that cross-chain messages are delivered efficiently and securely.

For more information on development, please check out our relevant [Developer Section](../../developers/cross-chain/quickstart.mdx).
115 changes: 115 additions & 0 deletions pages/operators/tangle-avs/eigenlayer.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
---
title: Tangle EigenLayer AVS
description: Integrating EigenLayer AVSs into Tangle
---

# Overview: Incorporating EigenLayer AVSs into Tangle

We have built a powerful integration with EigenLayer through their Actively Validated Services (AVS).
We have enabled the ability for Validators to extend their functionality across both Tangle and EigenLayer's Networks. Users and developers can
leverage AVSs that operate simultaneously on both the EigenLayer and Tangle networks, creating new opportunities for
cross-chain functionalities.

This page provides an overview of how Tangle incorporates EigenLayer AVSs, including the creation of the Tangle AVS — an
EigenLayer AVS that runs a Tangle Validator — as well as the tools we provide for building AVSs in Rust. By combining
the strengths of EigenLayer’s decentralized security infrastructure with Tangle’s advanced validation and cross-chain
capabilities, users can interact with both networks via a single AVS.

## What is an EigenLayer AVS?

An Actively Validated Service (AVS) in EigenLayer allows Operators to provide services beyond traditional staking,
participating in security and decentralized services across multiple protocols.

More information on AVSs can be found [here](https://docs.eigenlayer.xyz/eigenlayer/avs-guides/avs-developer-guide)

### How AVS Integrates with Tangle

Tangle takes the EigenLayer AVS model further by enabling validators to interact with both EigenLayer and Tangle at the
same time. This dual-functionality AVS leverages EigenLayer's re-staking capabilities while engaging with Tangle's
specialized cross-chain slashing, validator management, and orchestration features.

## The Tangle AVS: Dual-Functionality with EigenLayer

### What is the Tangle AVS?

The Tangle AVS is an EigenLayer-compatible AVS that runs a Tangle Validator, allowing participants to interact with
both the EigenLayer and Tangle networks through a single AVS. This unified AVS provides significant benefits for validators,
offering enhanced cross-network functionality while maintaining security and scalability.

### Key Features of the Tangle AVS:

1. Seamless EigenLayer and Tangle Integration:
The Tangle AVS is designed to fully integrate with EigenLayer’s re-staking mechanism, allowing validators to
increase security for both networks while re-staking assets. The AVS serves both EigenLayer and Tangle simultaneously,
optimizing cross-network interactions.

2. Dual-Network Participation:
Through the Tangle AVS, validators contribute to both Tangle's cross-chain slashing system and EigenLayer's
decentralized validation services. This means validators operate in both ecosystems, providing security to EigenLayer
protocols while benefiting from Tangle’s validator orchestration features.

3. Cross-Network Security Enforcement:
Validators using the Tangle AVS benefit from Tangle's cross-chain slashing and message dispatching, ensuring security
across all the protocols they are involved with. Misbehavior on one network results in penalties and updates across
both Tangle and EigenLayer, providing comprehensive validator accountability.

4. Unified Validator Management:
The Tangle AVS simplifies validator management, as users can run and manage their validators across both EigenLayer
and Tangle via a single AVS. This significantly reduces operational overhead, while allowing for robust cross-chain services.

## Building AVSs in Rust: High-Performance Development Tools

We offer support for building AVSs in Rust, a modern programming language known for its performance, safety, and scalability.
Rust’s concurrency model makes it an excellent choice for developing Actively Validated Services that require high efficiency
and cross-network interaction.

### Why Choose Rust for AVS Development?

Rust is an ideal language for AVS development because it ensures memory safety, prevents common bugs like data races, and
can handle complex network interactions efficiently. When developing AVSs that run across both EigenLayer and Tangle, Rust
provides the necessary performance and reliability required to support scalable validator operations.

### Tools for Developing AVSs in Rust:

1. Rust-Based AVS Implementations:
At Tangle, we have developed EigenLayer’s Incredible Squaring AVS in Rust, which serves as a model for building
efficient AVSs. This implementation highlights the potential of Rust in delivering high-performance
Actively Validated Services that operate seamlessly across decentralized networks.

2. Custom AVS Development:
Developers can utilize our provided tools for creating their own AVSs in Rust. You can find the EigenSDK-RS
[here](https://github.com/webb-tools/eigensdk-rs). Whether you want to add custom logic or integrate unique services,
our Rust tools give developers the flexibility to innovate within the EigenLayer-Tangle ecosystem.

## The Intersection of Tangle and EigenLayer: Unified AVS Functionality

The integration between Tangle and EigenLayer through a single AVS offers a unique opportunity for validators to
participate in both networks while leveraging the best features of each ecosystem. This cross-network functionality
opens up new avenues for enhancing security, scaling decentralized services, and managing validator operations efficiently.

### Advantages of a Unified AVS:

1. Cross-Network Validation and Security:
Validators using the Tangle AVS actively participate in EigenLayer’s re-staking mechanism, providing security
for EigenLayer protocols while engaging in Tangle’s cross-chain orchestration. This ensures that security
efforts extend across both networks, reducing risks and increasing validator accountability.

2. Efficient Resource Management:
By running a single AVS across EigenLayer and Tangle, validators can manage resources more efficiently. This
not only simplifies validator operations but also reduces the overhead of maintaining multiple services across
decentralized ecosystems.

3. Advanced Cross-Chain Slashing:
The Tangle AVS enables cross-chain slashing, ensuring that any misbehavior by validators is enforced across
both EigenLayer and Tangle. This cross-network enforcement deters malicious actions and upholds the integrity
of the validator system across multiple chains.

4. Developer Empowerment through Rust:
With the tools and blueprints provided for developing AVSs in Rust, developers can easily build custom services
and validators that take advantage of both EigenLayer’s and Tangle’s capabilities. This fosters innovation and
opens up new possibilities for integrating decentralized services.

---

For more details on getting started with the Tangle AVS or developing custom AVSs in Rust, please check out our
[Developer Section](../../developers/blueprints.mdx). You can also find information on Blueprints [here](../../developers/blueprints.mdx).
94 changes: 94 additions & 0 deletions pages/operators/tangle-avs/quickstart.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
---
title: Quickstart
description: Setting up Tangle AVS with cross-chain functionalities.
---

import Callout from "../../../components/Callout";

# Tangle AVS: Cross-Chain Quickstart Guide

The following is a guide outlining the steps to set up and utilize **Tangle AVS** (Actively Validated Services),
allowing you to run a Tangle Validator on **EigenLayer**'s network. If you do not have a Tangle node set up yet,
please review the **How to run a Tangle node** setup guide [here](../node-basics/quickstart.mdx).

This guide will help you get started with deploying the AVS and enabling cross-chain functionalities across multiple
blockchain protocols, specifically EigenLayer.

Here is how our final configuration will look at the end of this guide:

- **Tangle AVS** operates as an EigenLayer-compatible validator and supports cross-chain slashing.
- **EigenLayer** integration allows validators to re-stake and enhance security while also participating in Tangle’s
validator ecosystem.
- **Symbiotic** will be integrated in the future, allowing cross-chain collaboration.
- **Message dispatching** between networks using **bridges**, **Hyperlane**, or **Sygma**.
- Optional **AVS and Blueprint Development tools in Rust** for developers who want to create their own AVSs or
Blueprints to interact with the Tangle and/or EigenLayer network(s).

<Callout type="info">
Ensure that you have everything necessary for running a Tangle node and have access to the necessary network
configurations for EigenLayer or any other network you plan to connect to.
</Callout>

## Docker usage

---- INCLUDES PLACEHOLDER TEXT ----

The quickest way to set up the Tangle AVS with cross-chain functionalities is to use our provided scripts.

### Prerequisites

Before starting, ensure that the following is configured:

- Access to a running **EigenLayer node** and correct port exposure for cross-network communication.
- Set up necessary configurations for **bridges**, **Hyperlane**, or **Sygma** for message dispatching across networks.

### Usage

**To start the Tangle AVS, run:**

```sh filename="compose up" copy
cd avs-setup
./placeholder_setup_script.sh
```

## Cross-Chain Functionality Configuration

The Tangle AVS requires the registration of an Operator through both EigenLayer and Tangle - you must have the
configurations for both Operators accessible. For more information on cross-chain functionalities you can see
our [Cross-Chain Orchestration](cross-chain.mdx) section.

### EigenLayer Integration

Ensure that the Tangle Validator is registered within the EigenLayer AVS and that the node is actively listening for cross-chain messages.
Set up cross-chain slashing to be enforced across both Tangle and EigenLayer by dispatching slashing messages via Hyperlane or another communication protocol.

### Symbiotic Integration (Future)

[Placeholder] Symbiotic integration is under development. Once available, you will be able to configure cross-chain slashing and collaborative consensus mechanisms across both Tangle and Symbiotic.

### Other Network Configurations

For non-Tangle networks, configure Hyperlane or Sygma to handle cross-chain message dispatching and validator state updates across networks.

## Monitoring and Alerts

To monitor your Tangle AVS and its interactions across networks like EigenLayer, set up Prometheus and Grafana for
real-time tracking of your validator’s performance and cross-chain activities.

```sh filename="compose up" copy
cd monitoring
docker compose up -d
```

Navigate to http://localhost:3000 to view real-time metrics such as:

Validator performance across EigenLayer and other networks.
Cross-chain message dispatch status.
Slashing events and validator health.

## Next Steps

You’ve successfully set up and configured your Tangle AVS with cross-chain functionalities! You can now participate in
EigenLayer’s re-staking mechanism while benefiting from Tangle’s cross-chain validator management.

Stay tuned for updates on Symbiotic and additional network integrations.
Loading
Loading