app

package module
v0.37.1-0...-14cb8ee Latest Latest
Warning

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

Go to latest
Published: May 13, 2020 License: Apache-2.0 Imports: 22 Imported by: 0

README

DataHop Project (Team-34) for Diffusion'19 Hackathon

This projects contains 3 main modules:

  • An Android app allowing users to exchange content using Bluetooth Low Energy and WiFi Direct.
  • A Cosmos-based blockchain implementation using Proof of Prestige reward scheme.
  • Visualisation module reading data from the blockchain and presenting them in a user-friendly way.

User exchange content they're interested in. After each p2p transfer, the sender can submti an acknowledgment to the blockchain and collect rewards. All the modules communicate using interoperable REST/JSON allowing for easy integration.

Tasks for the Hackathon

  • Add a UserInfo structure keeping user's coins and their prestige. Similar to the WhoIs structure defined in types.go (this includes implementing setters/getters)
  • Update prestige values of users with every block (using BeginBlock)
  • Accept file transfer acknowledgments, verify them and update user prestige (DeliverTx())
  • Make Tendermint to use prestige values instead of stake (where to store user’s prestige? Bank? Or custom structures? - need to consult Cosmos guys on that)
State Modification Messages
  • RegisterTransfer - register a transfer between 2 peers specifying sender, receiver, filename and an amount of exchanged prestige

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// default home directories for the application CLI
	DefaultCLIHome = os.ExpandEnv("$HOME/.nscli")

	// DefaultNodeHome sets the folder where the applcation data and configuration will be stored
	DefaultNodeHome = os.ExpandEnv("$HOME/.nsd")

	// NewBasicManager is in charge of setting up basic module elemnets
	ModuleBasics = module.NewBasicManager(
		genaccounts.AppModuleBasic{},
		genutil.AppModuleBasic{},
		auth.AppModuleBasic{},
		bank.AppModuleBasic{},
		staking.AppModuleBasic{},
		distr.AppModuleBasic{},
		params.AppModuleBasic{},
		slashing.AppModuleBasic{},
		supply.AppModuleBasic{},

		nameservice.AppModule{},
	)
)

Functions

func MakeCodec

func MakeCodec() *codec.Codec

MakeCodec generates the necessary codecs for Amino

func NewNameServiceApp

func NewNameServiceApp(
	logger log.Logger, db dbm.DB, baseAppOptions ...func(*bam.BaseApp),
) *nameServiceApp

NewNameServiceApp is a constructor function for nameServiceApp

Types

type GenesisState

type GenesisState map[string]json.RawMessage

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

func NewDefaultGenesisState

func NewDefaultGenesisState() GenesisState

Jump to

Keyboard shortcuts

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