Giter Club home page Giter Club logo

soroban-versioning's Introduction

Soroban Versioning logo: representation of a planet with a circle and two 45 degrees parallel lines cutting it in the middle. Two small circles at the intersection between the circle and the lines. This represent Git with branches and merge commits

Soroban Versioning

- or SVN if you want to make some people angry

Rational

Version control systems like Git are by design decentralized. The reality is that we heavily rely on tools like GitHub. While GitHub is great for collaborating, it's a strongly centralized system, bearing all its caveats.

One of the biggest issues being that maintainers can force push code, effectively rewriting the commit history.

The core idea of this project is to offer an on-chain hash traceability. The code itself is still versioned using Git and it is still hosted on any platform, but you keep on-chain a hash history. What it provides is an independent and distributed way to prove the integrity of a repository.

Usage

The first step is to register a project.

soroban contract invoke \
    --source-account maintainer \
    --network testnet \
    --id CAHCQFBMZIY6Y6QPHPN2N64QVKIA6CTGTWBS3SNNIRCATRBANAV3NHWK \
    -- \
    register \
    --maintainer maintainer \
    --name ... \
    --maintainers '{ "vec": [{ "address": ... }] }' \
    --url ... \
    --hash ...

Contract on-chain

Then maintainers can commit changes on-chain as they push new commits.

soroban contract invoke \
    --source-account maintainer \
    --network testnet \
    --id CAHCQFBMZIY6Y6QPHPN2N64QVKIA6CTGTWBS3SNNIRCATRBANAV3NHWK \
    -- \
    commit \
    --maintainer maintainer \
    --project_key ... \
    --hash ...

Contract on-chain

There is a convenient pre-push hook which can be used. This ensures that a commit is only pushed if the hash is sent properly on-chain first.

pre-commit install -t pre-push

soroban-versioning's People

Contributors

tupui avatar

Stargazers

Tomiță Militaru avatar Aleksandar Vucenovic avatar

Watchers

Tomiță Militaru avatar  avatar

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.