npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mynftswan88

v1.1.1

Published

[![Build](https://github.com/EspressoSystems/espresso-sequencer/actions/workflows/build.yml/badge.svg)](https://github.com/EspressoSystems/espresso-sequencer/actions/workflows/build.yml) [![Contracts](https://github.com/EspressoSystems/espresso-sequencer/

Downloads

12

Readme

Espresso Sequencer

Build Contracts Lint Audit Ubuntu Coverage Status

The Espresso Sequencer offers rollups credible neutrality and enhanced interoperability, without compromising on scale. Consisting of a data availability solution and a decentralized network of nodes that sequences transactions, layer-2 rollups can leverage the Espresso Sequencer to give developers and end users fast confirmations, low (and fair) fees, and robust infrastructure.

Documentation

Architecture diagram

Running the demo

Refer to sequencer-example-l2 for instructions on how to run a dockerized Espresso Sequencer network with an example Layer 2 rollup application.

Development

  • Obtain code: git clone [email protected]:EspressoSystems/espresso-sequencer.
  • Make sure nix is installed.
  • Activate the environment with nix-shell, or nix develop, or direnv allow if using direnv.
  • For installation without nix please see ubuntu.md.

Run the tests

just pull # to pull docker images
just test

Building figures

make doc

Building and running

Docker images and the docker-compose-demo.yaml file are provided for convenience. The Docker-based demo fetches the images from the ghcr repository, where they are updated with every push to main on GitHub. For testing uncommitted changes, you can also run the binaries by manually building and running the services.

Build all executables with cargo build --release. You may then start a sequencer network. First, start an orchestrator. Choose a port $PORT to run it on and decide how many sequencer nodes $N you will use, then run target/release/orchestrator -p $PORT -n $N.

The sequencer will distribute a HotShot configuration to all the nodes which connect to it, which specifies consensus parameters like view timers. There is a default config, but you can override any parameters you want by passing additional options to the orchestrator executable. Run target/release/orchestrator --help to see a list of available options. Next, you must launch a cdn instance, which are necessary to facilitate consensus.

target/release/dev-cdn -p 1738

Once you have started the orchestrator and the web servers, you must connect $N sequencer nodes to them, after which the network will start up automatically. To start one node, run

target/release/sequencer \
    --orchestrator-url http://localhost:$PORT \
    --cdn-endpoint "127.0.0.1:1738"  \
    -- http --port 8083 -- query --storage-path storage -- submit

A useful Bash snippet for running $N nodes simultaneously in the background of your shell is:

for i in `seq $N`; do
    target/release/sequencer \
        --orchestrator-url http://localhost:$PORT \
        --cdn-endpoint "127.0.0.1:1738"  \
done

For running a full demo natively run just demo-native.

Contracts

Development

A foundry project for the contracts specific to HotShot can be found in the directory contracts.

To compile

forge build

To run the tests

forge test

In order to avoid constant warnings about checksum mismatches with svm-rs managed solc we set FOUNDRY_SRC to solc installed via flake.nix.

  • To use the contracts from rust generate the rust contracts bindings: just gen-bindings.
  • Bindings are only generated for contracts in the contracts/src folder

To generate documentation in ./docs for solidity code run

forge doc

Deployment

To deploy the contracts to a local testnet, first run a dev chain (e.g. anvil), then run

forge script DeployHotShot --broadcast --rpc-url local

To deploy to sepolia set SEPOLIA_RPC_URL and MNEMONIC env vars and run

forge script DeployHotShot --broadcast --rpc-url sepolia

To additionally verify the contact on etherscan set the ETHERSCAN_API_KEY env var and run

forge script DeployHotShot --broadcast --rpc-url sepolia --verify

Running the script will save a file with details about the deployment in contracts/broadcast/$CHAIN_ID.

Folder Structure Rationale

  • code for demo purposes goes into the contracts/demo folder
  • code that eventually ends up in production goes into the contracts/src folder

Misc

Authenticate with GitHub container registry

This is only necessary to fetch private images.

  • Go to your github profile
  • Developer Settings > Personal access tokens > Personal access tokens (classic)
  • Generate a new token
    • for the scope options of the token, tick the repo box.
  • Run docker login ghcr.io --username <you_github_id> --password <your_personal_access_token>

License

Copyright

(c) 2022 Espresso Systems espresso-sequencer was developed by Espresso Systems. While we plan to adopt an open source license, we have not yet selected one. As such, all rights are reserved for the time being. Please reach out to us if you have thoughts on licensing.

Disclaimer

DISCLAIMER: This software is provided "as is" and its security has not been externally audited. Use at your own risk.