app

package module
v0.0.0-...-d74d48c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 14, 2019 License: MIT Imports: 12 Imported by: 2

README

onchain-git

A Git remote helper and underlying Cosmos/Tendermint app for synchronizing with remote repositories on our Cosmos/Tendermint based blockchain.

Structure

cmd/git-remote-joystream

Git remote helper, not functional as of now, but should be trivial to wire up against gitservicecli which does the real work.

cmd/gitservicecli

Cosmos/Tendermint client app that mainly supports pushing references to a repository on the blockchain. It's implemented as a standard Tendermint app, so it will function by sending messages to corresponding servers (gitserviced).

cmd/gitserviced

Cosmos/Tendermint server app that supports the following:

  • Listing of references (required by the Git remote helper)
  • Querying of advertised references (required in conjunction with pushing of references)
  • Pushing of references
  • Removal of repositories

A server instance will respond to queries (for reference listing or advertised references) and messages to push references to repositories or remove repositories.

Pushing references

A message for pushing of references will cause updates to references in the corresponding repository to be stored in a blockchain transaction. This information will basically consist of a list of commands to update the references and a packfile containing Git data (commits/trees/blobs).

When a server processes such a message, it will also update the corresponding repository in app storage. If the repository isn't already there it will be initialized.

cmd/gogitclient

This is a test application to study the behaviour of go-git when it comes to serving pushing of updates. It's basically a simplified Git client that supports the push command and will use our replacement for git-receive-pack, gogit-receive-pack when using the debugf protocol, which basically is for pushing to a remote in the local filesystem but using our own back-end (gogit-receive-pack).

cmd/gogit-receive-pack

This is a re-implementation of git-receive-pack using the go-git library that's instrumented through debug logging, so that we can understand how go-git serves pushing of updates.

References

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeCodec

func MakeCodec() *codec.Codec

MakeCodec generates the necessary codecs for Amino

Types

type GenesisState

type GenesisState struct {
	Accounts []*auth.BaseAccount `json:"accounts"`
}

GenesisState represents chain state at the start of the chain. Any initial state (account balances) are stored here.

type GitServiceApp

type GitServiceApp struct {
	*bam.BaseApp
	// contains filtered or unexported fields
}

GitServiceApp is the main type

func NewGitServiceApp

func NewGitServiceApp(logger log.Logger, db dbm.DB) *GitServiceApp

NewGitServiceApp instantiates GitServiceApp

func (*GitServiceApp) ExportAppStateAndValidators

func (app *GitServiceApp) ExportAppStateAndValidators() (appState json.RawMessage,
	validators []types.GenesisValidator, err error)

ExportAppStateAndValidators does the things

Directories

Path Synopsis
cmd
gitservicecli command
gitserviced command
gogit-receive-pack command
Go-git implementation of git-receive-pack
Go-git implementation of git-receive-pack
gogitclient command
Git client that can push references to a go-git server (protocol: "debugf").
Git client that can push references to a go-git server (protocol: "debugf").
x

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL