Giter Site home page Giter Site logo

rollapp's Introduction

Dymension Rollapp

Rollappd - A template RollApp chain

This repository hosts rollappd, a template implementation of a dymension rollapp.

rollappd is an example of a working RollApp using dymension-RDK and dymint.

It uses Cosmos-SDK's simapp as a reference, but with the following changes:

  • minimal app setup
  • wired IBC for ICS 20 Fungible Token Transfers
  • Uses dymint for block sequencing and replacing tendermint
  • Uses modules from dymension-RDK to sync with dymint and provide RollApp custom logic

Overview

Note: Requires Go 1.19

Quick guide

Get started with building RollApps

Installing / Getting started

Build and install the rollappd binary:

make install

Initial configuration

export the following variables:

export ROLLAPP_CHAIN_ID="demo-dymension-rollapp"
export KEY_NAME_ROLLAPP="rol-user"
export DENOM="urax"
export MONIKER="$ROLLAPP_CHAIN_ID-sequencer"

And initialize the rollapp:

sh scripts/init.sh

Run rollapp

rollappd start

You should have a running local rollapp!

Run a rollapp with local settlement node

Run local dymension hub node

Follow the instructions on Dymension Hub docs to run local dymension hub node

Create sequencer keys

create sequencer key using dymd

dymd keys add sequencer --keyring-dir ~/.rollapp/sequencer_keys --keyring-backend test
SEQUENCER_ADDR=`dymd keys show sequencer --address --keyring-backend test --keyring-dir ~/.rollapp/sequencer_keys`

fund the sequencer account

dymd tx bank send local-user $SEQUENCER_ADDR 10000000000000000000000udym --keyring-backend test --broadcast-mode block

Register rollapp on settlement

sh scripts/settlement/register_rollapp_to_hub.sh

Register sequencer for rollapp on settlement

sh scripts/settlement/register_sequencer_to_hub.sh

Configure the rollapp

Modify dymint.toml in the chain directory (~/.rollapp/config) set:

settlement_layer = "dymension"

Run rollapp locally

rollappd start

Setup IBC between rollapp and local dymension hub node

Install dymension relayer

git clone https://github.com/dymensionxyz/go-relayer.git --branch v0.2.0-v2.3.1-relayer
cd relayer && make install

Establish IBC channel

while the rollapp and the local dymension hub node running, run:

sh scripts/ibc/setup_ibc.sh

After successful run, the new established channels will be shown

run the relayer

rly start hub-rollapp

Developers guide

TODO

rollapp's People

Contributors

dependabot[bot] avatar itaylevyofficial avatar mtsitrin avatar omritoptix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

rollapp's Issues

change the relayer repo to our forked one

Currently we would like to use the standard relayer but until they don't support a custom MaxClockDrift, and due to our custom EBP mechanism we need to use a fork

panic: invalid height: 70651; expected: 70664 .

Describe the bug

invalid height on the rollapp logs

then i try:

systemctl stop sequencer
sed -i 's/^aggregator *=.*/aggregator = "false"/' $HOME/.roller/rollapp/config/dymint.toml
systemctl restart sequencer

but the blocks just stuck forever, it won't increase

~# roller version

๐Ÿ’ˆ Roller version v0.1.21-beta
๐Ÿ’ˆ Build time: 2023-11-12T13:35:58+0000"
๐Ÿ’ˆ Git commit: 91828b8725e8bd40831083fd6800a3894e059edc

cmd/rollappd/cmd: startInProcess leaks a database handle if an error occurs or if the app doesn't close the database

Describe the bug
A clear and concise description of what the bug is.
Noticed while auditing that this code

func startInProcess(ctx *server.Context, clientCtx client.Context, nodeConfig *dymintconf.NodeConfig, appCreator types.AppCreator) error {
cfg := ctx.Config
home := cfg.RootDir
db, err := utils.OpenDB(home)
if err != nil {
return err
}
will leak the database handle on an error, leaving it open and on platforms like Windows that could cause problems if the database handle is retried but even crazier is the fact that a clever attacker can take advantage of an interesting UNIX (possibly POSIX) system flaw to hang onto a database handle and cause corruption later on per https://cyber.orijtech.com/scsec/unix-file-handle-perms

Expected behavior
Please use Go named returns to gracefully handle this closing
image

Duplicate `gentx` command

Describe the bug
There are two gentx commands in the application on rollappd command

To Reproduce
Steps to reproduce the behavior:

  1. Make install rollapp template repo
  2. Input rollappd in terminal

Expected behavior
One gentx command

Screen Shot 2023-08-06 at 1 57 29 PM

Configure matrix e2e tests

e2e tests should run as a matrix with matrix params being:

DA (e.g Avail, Celestia, Near)
Relayer (currently only go-relayer supported)
operating system
etc.

Revert back to vanilla cometbft

The change to forked cometbft was made to accomodate for the fix of the halted froopyland chain.
Once enough rollapps upgrade they can revert back to using the vanilla cometbft.

Add protogen scripts

to support custom x/module develeopment, we should add proto buf generation scripts

init scripts for rollapp registration need to be updated including gas prices in the transaction

Describe the bug

The following error raw_log: 'no fees provided: insufficient fee' is received when running scripts/settlement/register_rollapp_to_hub.sh or scripts/settlement/register_sequencer_to_hub.sh scripts

To Reproduce
Steps to reproduce the behavior:
Follow readme instructions to register roll app in localhub
https://github.com/dymensionxyz/rollapp/tree/main#run-a-rollapp-with-local-settlement-node

Expected behavior
Tx completion

It is necessary to set --gas-prices when running the dymd tx commands

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.