Pure Rust implementation of Arbitrum sequencer feed reader with built-in transaction decoding and MEV features

Overview

Sequencer-Client (WIP 🚧 )

Pure Rust implementation of Arbitrum sequencer feed reader with built-in transaction decoding and MEV features

Design Goal

This Rust implementation is designed for a high number of concurrent connections and faster performance than the original Go implementation, with MEV-specific features.

Quick Start

To use this sequencer-client, you'll need Tokio as your main runtime.

Here is a basic example.

use crossbeam_channel::unbounded;
use sequencer_client::feed_clients::RelayClients;
use std::sync::Arc;

#[tokio::main]
async fn main() {
    // Create a channel to receive messages from the feed client
    let (sender, receiver) = unbounded();

    // Create a new relay client and start reader + connection maintainer
    let relay_client = RelayClients::new("wss://nova.arbitrum.io/feed", 42170, 2, 1, sender)
        .expect("Failed to create relay client");
    RelayClients::start_reader(Arc::new(relay_client));

    // To prevent duplicate messages
    let mut highest_seq_number: i64 = 0;

    loop {
        let data = receiver.recv().expect("Failed to receive data from feed client");

        if highest_seq_number >= data.seq_num {
            continue;
        }

        highest_seq_number = data.seq_num;
        let elapsed_time = data.time.elapsed();
        info!("Received message, sequencer_number: {} | Took {:?}", data.seq_num, elapsed_time);
    }
}

Status

Currently, the sequencer-reader does not have full transaction decoding and only includes the MEV specific parts

License

This repo is licensed under the MIT license.

You might also like...
A prototype of a high-performance KV database built with Rust.
A prototype of a high-performance KV database built with Rust.

async-redis A prototype of a high-performance KV database built with Rust. Author: 3andero 11/10/2021 Overview The project starts as a fork of mini-re

X-Engine: A SQL Engine built from scratch in Rust.

XNGIN (pronounced "X Engine") This is a personal project to build a SQL engine from scratch. The project name is inspired by Nginx, which is a very po

A tiny embedded database built in Rust.
A tiny embedded database built in Rust.

TinyBase TinyBase is an in-memory database built with Rust, based on the sled embedded key-value store. It supports indexing and constraints, allowing

A Modern Real-Time Data Processing & Analytics DBMS with Cloud-Native Architecture, built to make the Data Cloud easy
A Modern Real-Time Data Processing & Analytics DBMS with Cloud-Native Architecture, built to make the Data Cloud easy

A Modern Real-Time Data Processing & Analytics DBMS with Cloud-Native Architecture, built to make the Data Cloud easy

The spatial message broker and database for real-time multiplayer experiences. Official Rust implementation.

WorldQL Server Rust implementation of WorldQL, the spatial message broker and database for real-time multiplayer experiences Setup Instructions ⚠️ Thi

Simple and flexible queue implementation for Rust with support for multiple backends (Redis, RabbitMQ, SQS, etc.)

Omniqueue Omniqueue is an abstraction layer over queue backends for Rust. It includes support for RabbitMQ, Redis streams, and SQS out of the box. The

Ratchet is a fast, robust, lightweight and fully asynchronous implementation of RFC6455 (The WebSocket protocol).

Ratchet 🚧 Ratchet is a fast, robust, lightweight and fully asynchronous implementation of RFC6455 (The WebSocket protocol). Complete with an optional

Incomplete Redis client and server implementation using Tokio - for learning purposes only

mini-redis mini-redis is an incomplete, idiomatic implementation of a Redis client and server built with Tokio. The intent of this project is to provi

Rust implementation of Hyperswarm, a networking stack for connecting peers

hyperswarm-rs Peer to peer networking stack API Docs | Contributing NOTE: This is still in early stages. See the roadmap below. Please feel free to op

Owner
duoxehyon
duoxehyon
postgres-ical - a PostgreSQL extension that adds features related to parsing RFC-5545 « iCalendar » data from within a PostgreSQL database

postgres-ical - a PostgreSQL extension that adds features related to parsing RFC-5545 « iCalendar » data from within a PostgreSQL database

Edgar Onghena 1 Feb 23, 2022
This code features a viper-client, which can connect to a viper-server, a custom interface made for Comelit devices.

Viper Client ?? (WIP) This is code for my intercom; specifically for the Comelit Mini Wi-Fi MSFV. This features a ViperClient which can talk to the Co

Gerard 4 Feb 20, 2023
A pure Rust database implementation using an append-only B-Tree file format.

nebari nebari - noun - the surface roots that flare out from the base of a bonsai tree Warning: This crate is early in development. The format of the

Khonsu Labs 194 Jan 3, 2023
🧰 The Rust SQL Toolkit. An async, pure Rust SQL crate featuring compile-time checked queries without a DSL. Supports PostgreSQL, MySQL, SQLite, and MSSQL.

SQLx ?? The Rust SQL Toolkit Install | Usage | Docs Built with ❤️ by The LaunchBadge team SQLx is an async, pure Rust† SQL crate featuring compile-tim

launchbadge 7.6k Dec 31, 2022
AgateDB is an embeddable, persistent and fast key-value (KV) database written in pure Rust

AgateDB is an embeddable, persistent and fast key-value (KV) database written in pure Rust. It is designed as an experimental engine for the TiKV project, and will bring aggressive optimizations for TiKV specifically.

TiKV Project 535 Jan 9, 2023
Lightweight async Redis client with connection pooling written in pure Rust and 100% memory safe

redi-rs (or redirs) redi-rs is a Lightweight Redis client with connection pooling written in Rust and 100% memory safe redi-rs is a Redis client writt

Oğuz Türkay 4 May 20, 2023
Klickhouse is a pure Rust SDK for working with Clickhouse

Klickhouse is a pure Rust SDK for working with Clickhouse with the native protocol in async environments with minimal boilerplate and maximal performance.

Max Bruce 44 Dec 27, 2022
Pure rust embeddable key-value store database.

MHdb is a pure Rust database implementation, based on dbm. See crate documentation. Changelog v1.0.3 Update Cargo.toml v1.0.2 Update Cargo.toml v1.0.1

Magnus Hirth 7 Dec 10, 2022
A pure-Rust library to interact with systemd DBus services

A pure-Rust library to interact with systemd DBus services

Luca Bruno 10 Nov 23, 2022
rinflux is Rust based influx client implementation that have been inspired from influx other language implementation, developed with 💖

Unofficial InfluxDB Driver for Rust This library is a work in progress. This means a feature you might need is not implemented yet or could be handled

Workfoxes 1 Apr 7, 2022