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 8 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: 0 additions & 1 deletion ask-cookbook.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
declare module "@cookbookdev/docsbot/react" {
export { default } from "@cookbookdev/docsbot/dist/react/index.d.ts";
}

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"
}
75 changes: 40 additions & 35 deletions pages/operators/node-basics/systemd.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -162,53 +162,58 @@ rustup target add wasm32-unknown-unknown --toolchain nightly

**Account Keys**

```sh filename="Acco" copy
./target/release/tangle key insert --base-path <BASE_PATH> \
--chain tangle-mainnet \
--scheme Sr25519 \
--suri <"12-MNEMONIC-PHARSE"> \
--key-type acco
```
```sh filename="Acco" copy

./target/release/tangle key insert --base-path <BASE_PATH> \
--chain tangle-mainnet \
--scheme Sr25519 \
--suri <"12-MNEMONIC-PHRASE"> \
--key-type acco
```

**Babe Keys**

```sh filename="Babe" copy
./target/release/tangle key insert --base-path <BASE_PATH> \
--chain tangle-mainnet \
--scheme Sr25519 \
--suri <"12-MNEMONIC-PHARSE"> \
--key-type babe
```
```sh filename="Babe" copy

./target/release/tangle key insert --base-path <BASE_PATH> \
--chain tangle-mainnet \
--scheme Sr25519 \
--suri <"12-MNEMONIC-PHRASE"> \
--key-type babe
```

**Im-online Keys** - **these keys are optional**

```sh filename="Imonline" copy
./target/release/tangle key insert --base-path <BASE_PATH> \
--chain tangle-mainnet \
--scheme Sr25519 \
--suri <"12-MNEMONIC-PHARSE"> \
--key-type imon
```
```sh filename="Imonline" copy

./target/release/tangle key insert --base-path <BASE_PATH> \
--chain tangle-mainnet \
--scheme Sr25519 \
--suri <"12-MNEMONIC-PHRASE"> \
--key-type imon
```

**Role Keys**

```sh filename="Role" copy
./target/release/tangle key insert --base-path <BASE_PATH> \
--chain tangle-mainnet \
--scheme Ecdsa \
--suri <"12-MNEMONIC-PHARSE"> \
--key-type role
```
```sh filename="Role" copy

./target/release/tangle key insert --base-path <BASE_PATH> \
--chain tangle-mainnet \
--scheme Ecdsa \
--suri <"12-MNEMONIC-PHRASE"> \
--key-type role
```

**Grandpa Keys**

```sh filename="Grandpa" copy
./target/release/tangle key insert --base-path <BASE_PATH> \
--chain tangle-mainnet \
--scheme Ed25519 \
--suri <"12-MNEMONIC-PHARSE"> \
--key-type gran
```
```sh filename="Grandpa" copy

./target/release/tangle key insert --base-path <BASE_PATH> \
--chain tangle-mainnet \
--scheme Ed25519 \
--suri <"12-MNEMONIC-PHRASE"> \
--key-type gran
```

**Node key**

Expand Down
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"
}
91 changes: 91 additions & 0 deletions pages/operators/tangle-avs/cross-chain.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
---
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 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:
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:
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).
109 changes: 109 additions & 0 deletions pages/operators/tangle-avs/eigenlayer.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
---
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:

Developing AVSs in Rust is straightforward with the help of our [Blueprints](../../developers/blueprints.mdx). We have
both a Blueprint template and ready-made examples for creating AVSs, as well as other software formats. Regardless of the
specific goals of your AVS, our tools enable you to achieve more with less code, streamlining the development process.

## 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).
Loading
Loading