Skip to content

A repo that Skale node maintainers to push and backup node data on Arweave

License

Notifications You must be signed in to change notification settings

avolabs-io/arweave-skale-bridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Live example

Bridge - Persist data from Skale to Arweave Tweet

Preview image

Need info? Join the Skale Discord | or Create an issue | Built with 💚 by Avo Labs

GitHub issues GitHub pull requests License Contributions welcome Awesome

Summary

The Bridge project is a tool allowing Skale node operators to easily persist 'snapshots' of Skale sub-chains at a specified frequency. The data is uploaded to Arweave, a decentralized solution for eternal storage.

How the bridge works? It Loads data from the skale chain via the RPC snapshot endpoint and pushes it to Arweave at a predetermined interval with simple UI.

Backend

Start the backend via docker-compose: make start-dev

When hasura is in a bad state :) make hard-restart-dev

Hasura

Development

First copy the .example.env file to .env. Change the passwords ports as desired.

Start Hasura:

make start-dev

Print Hasura logs:

make hasura-logs

Restart: (this keeps the database data intact)

make restart-dev

Restart and clear all data:

make hard-restart-dev

Migrations

HASURA_GRAPHQL_ENABLE_CONSOLE=false So that it isn't possible to run migrations via the console.

Install cli: npm install --global hasura-cli

Initialise new hasura project (Not needed for general use, this project is already initialised - ie don't run):

hasura init --directory my-project --endpoint <hasura-endpoint>

Run migrations:

(Please add a space at the beginning of this line so that it doesn't save the password into your bash-history. We will find a better way to handle this when we are more established.)

hasura migrate apply --admin-secret <your password>

Access the hasura console:

hasura console --admin-secret <your password>

Note, you can use an env file to avoid the need for typing passwords in the terminal. You specify the env file using --envfile <path-to-env-file>.

Extra

Config hasura to autocomplete when typing in terminal docs

hasura completion zsh --file=\$HOME/.zprezto/modules/completion/external/src/\_hasura

UI

start ui

cd ui && yarn dev

build scss (needed when creating a new scss file)

cd ui && yarn scss

build ui

cd ui && yarn build

big dev helper for compile time errors

cd ui && re:watch

If and when you ever make changes to the graphql schema you should update the file called graphql_schema.json which is autogenerated via cd ui && yarn update-schema. This file should be commited to git.

Under the hood / Behind the scenes

About

A repo that Skale node maintainers to push and backup node data on Arweave

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •