diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 9af0415..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,53 +0,0 @@ -# This workflow is useful if you want to automate the process of: -# -# a) Creating a new prelease when you push a new tag with a "v" prefix (version). -# -# This type of prerelease is meant to be used for production: alpha, beta, rc, etc. types of releases. -# After the prerelease is created, you need to make your changes on the release page at the relevant -# Github page and publish your release. -# -# b) Creating/updating the "latest" prerelease when you push to your default branch. -# -# This type of prelease is useful to make your bleeding-edge binaries available to advanced users. -# -# The workflow will not run if there is no tag pushed with a "v" prefix and no change pushed to your -# default branch. -on: push - -jobs: - might_release: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Prepare Release Variables - id: vars - uses: tendermint/starport/actions/release/vars@develop - - - name: Issue Release Assets - uses: tendermint/starport/actions/cli@develop - if: ${{ steps.vars.outputs.should_release == 'true' }} - with: - args: chain build --release --release.prefix ${{ steps.vars.outputs.tarball_prefix }} -t linux:amd64 -t darwin:amd64 - - - name: Delete the "latest" Release - uses: dev-drprasad/delete-tag-and-release@v0.2.0 - if: ${{ steps.vars.outputs.is_release_type_latest == 'true' }} - with: - tag_name: ${{ steps.vars.outputs.tag_name }} - delete_release: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Publish the Release - uses: softprops/action-gh-release@v1 - if: ${{ steps.vars.outputs.should_release == 'true' }} - with: - tag_name: ${{ steps.vars.outputs.tag_name }} - files: release/* - prerelease: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 78810a8..3e1ab42 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ vue release/ .idea/ +build \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9c90d24 --- /dev/null +++ b/Makefile @@ -0,0 +1,104 @@ +#!/usr/bin/make -f + +BRANCH := $(shell git rev-parse --abbrev-ref HEAD) +COMMIT := $(shell git log -1 --format='%H') + +# don't override user values +ifeq (,$(VERSION)) + VERSION := $(shell git describe --tags | sed 's/^v//') + # if VERSION is empty, then populate it with branch's name and raw commit hash + ifeq (,$(VERSION)) + VERSION := $(BRANCH)-$(COMMIT) + endif +endif +PACKAGES_SIMTEST=$(shell go list ./... | grep '/simulation') +LEDGER_ENABLED ?= true +SDK_PACK := $(shell go list -m github.com/cosmos/cosmos-sdk | sed 's/ /\@/g') +TM_VERSION := $(shell go list -m github.com/tendermint/tendermint | sed 's:.* ::') # grab everything after the space in "github.com/tendermint/tendermint v0.34.7" +DOCKER := $(shell which docker) +BUILDDIR ?= $(CURDIR)/build +TEST_DOCKER_REPO=jackzampolin/gaiatest + +export GO111MODULE = on + +# process build tags + +build_tags = netgo +ifeq ($(LEDGER_ENABLED),true) + ifeq ($(OS),Windows_NT) + GCCEXE = $(shell where gcc.exe 2> NUL) + ifeq ($(GCCEXE),) + $(error gcc.exe not installed for ledger support, please install or set LEDGER_ENABLED=false) + else + build_tags += ledger + endif + else + UNAME_S = $(shell uname -s) + ifeq ($(UNAME_S),OpenBSD) + $(warning OpenBSD detected, disabling ledger support (https://github.com/cosmos/cosmos-sdk/issues/1988)) + else + GCC = $(shell command -v gcc 2> /dev/null) + ifeq ($(GCC),) + $(error gcc not installed for ledger support, please install or set LEDGER_ENABLED=false) + else + build_tags += ledger + endif + endif + endif +endif + +ifeq (cleveldb,$(findstring cleveldb,$(GAIA_BUILD_OPTIONS))) + build_tags += gcc cleveldb +endif +build_tags += $(BUILD_TAGS) +build_tags := $(strip $(build_tags)) + +whitespace := +whitespace += $(whitespace) +comma := , +build_tags_comma_sep := $(subst $(whitespace),$(comma),$(build_tags)) + +# process linker flags + +ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=bcna \ + -X github.com/cosmos/cosmos-sdk/version.AppName=dewebd \ + -X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \ + -X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT) \ + -X "github.com/cosmos/cosmos-sdk/version.BuildTags=$(build_tags_comma_sep)" \ + -X github.com/tendermint/tendermint/version.TMCoreSemVer=$(TM_VERSION) + +ifeq (cleveldb,$(findstring cleveldb,$(GAIA_BUILD_OPTIONS))) + ldflags += -X github.com/cosmos/cosmos-sdk/types.DBBackend=cleveldb +endif +ifeq (,$(findstring nostrip,$(GAIA_BUILD_OPTIONS))) + ldflags += -w -s +endif +ldflags += $(LDFLAGS) +ldflags := $(strip $(ldflags)) + +BUILD_FLAGS := -tags "$(build_tags)" -ldflags '$(ldflags)' +# check for nostrip option +ifeq (,$(findstring nostrip,$(GAIA_BUILD_OPTIONS))) + BUILD_FLAGS += -trimpath +endif + +#$(info $$BUILD_FLAGS is [$(BUILD_FLAGS)]) + +# The below include contains the tools target. +include contrib/devtools/Makefile + +############################################################################### +### Documentation ### +############################################################################### +all: install lint test + +BUILD_TARGETS := build install + +build: BUILD_ARGS=-o $(BUILDDIR)/ + +$(BUILD_TARGETS): go.sum $(BUILDDIR)/ + #go $@ -mod=readonly $(BUILD_FLAGS) $(BUILD_ARGS) ./... Don't overwrite go.sum + go $@ $(BUILD_FLAGS) $(BUILD_ARGS) ./... + +$(BUILDDIR)/: + mkdir -p $(BUILDDIR)/ \ No newline at end of file diff --git a/config.yml b/config.yml index ee3fb8c..187dc10 100644 --- a/config.yml +++ b/config.yml @@ -1,13 +1,13 @@ accounts: - name: alice - coins: ["2000000000000udws", "1000000wsc"] + coins: ["100000000000000udws"] - name: bob - coins: ["100000000udws"] + coins: ["1000000000udws", "10000000000000000000000000000000uwsc", "1000000000000uwhns"] build: binary: "dewebd" validator: - name: alice - staked: "100000000udws" + name: bob + staked: "10000000udws" client: openapi: path: "docs/static/openapi.yml" @@ -28,7 +28,13 @@ genesis: - amount: "10000000" denom: "udws" mint: + minter: + inflation: "0.000000000000000000" params: + blocks_per_year: "5256000" + inflation_max: "0.000000000000000000" + inflation_min: "0.000000000000000000" + inflation_rate_change: "0.000000000000000000" mint_denom: "udws" token: params: diff --git a/contrib/devtools/Makefile b/contrib/devtools/Makefile new file mode 100644 index 0000000..1ed058d --- /dev/null +++ b/contrib/devtools/Makefile @@ -0,0 +1,114 @@ +### +# Find OS and Go environment +# GO contains the Go binary +# FS contains the OS file separator +### +ifeq ($(OS),Windows_NT) + GO := $(shell where go.exe 2> NUL) + FS := \\ +else + GO := $(shell command -v go 2> /dev/null) + FS := / +endif + +ifeq ($(GO),) + $(error could not find go. Is it in PATH? $(GO)) +endif + +GOPATH ?= $(shell $(GO) env GOPATH) +GITHUBDIR := $(GOPATH)$(FS)src$(FS)github.com + +### +# Functions +### + +go_get = $(if $(findstring Windows_NT,$(OS)),\ +IF NOT EXIST $(GITHUBDIR)$(FS)$(1)$(FS) ( mkdir $(GITHUBDIR)$(FS)$(1) ) else (cd .) &\ +IF NOT EXIST $(GITHUBDIR)$(FS)$(1)$(FS)$(2)$(FS) ( cd $(GITHUBDIR)$(FS)$(1) && git clone https://github.com/$(1)/$(2) ) else (cd .) &\ +,\ +mkdir -p $(GITHUBDIR)$(FS)$(1) &&\ +(test ! -d $(GITHUBDIR)$(FS)$(1)$(FS)$(2) && cd $(GITHUBDIR)$(FS)$(1) && git clone https://github.com/$(1)/$(2)) || true &&\ +)\ +cd $(GITHUBDIR)$(FS)$(1)$(FS)$(2) && git fetch origin && git checkout -q $(3) + +go_install = $(call go_get,$(1),$(2),$(3)) && cd $(GITHUBDIR)$(FS)$(1)$(FS)$(2) && $(GO) install + +mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) +mkfile_dir := $(shell cd $(shell dirname $(mkfile_path)); pwd) + +############################################################################### +### Tools ### +############################################################################### + +BIN ?= /usr/local/bin +UNAME_S ?= $(shell uname -s) +UNAME_M ?= $(shell uname -m) + +TOOLS_DESTDIR ?= $(GOPATH)/bin +RUNSIM = $(TOOLS_DESTDIR)/runsim + +BUF_VERSION ?= 0.7.0 +PROTOC_VERSION ?= 3.11.2 + +ifeq ($(UNAME_S),Linux) + PROTOC_ZIP ?= protoc-3.11.2-linux-x86_64.zip +endif +ifeq ($(UNAME_S),Darwin) + PROTOC_ZIP ?= protoc-3.11.2-osx-x86_64.zip +endif + +all: tools + +tools: tools-stamp + +tools-stamp: $(RUNSIM) + touch $@ + +# Install the runsim binary with a temporary workaround of entering an outside +# directory as the "go get" command ignores the -mod option and will polute the +# go.{mod, sum} files. +# +# ref: https://github.com/golang/go/issues/30515 +runsim: $(RUNSIM) +$(RUNSIM): + @echo "Installing runsim..." + @(cd /tmp && go get github.com/cosmos/tools/cmd/runsim@v1.0.0) + +protoc: + @echo "Installing protoc compiler..." + @(cd /tmp; \ + curl -sSOL "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/${PROTOC_ZIP}"; \ + unzip -o ${PROTOC_ZIP} -d /usr/local bin/protoc; \ + unzip -o ${PROTOC_ZIP} -d /usr/local 'include/*'; \ + rm -f ${PROTOC_ZIP}) + +protoc-gen-gocosmos: + @echo "Installing protoc-gen-gocosmos..." + @go install github.com/regen-network/cosmos-proto/protoc-gen-gocosmos + +buf: protoc-gen-buf-check-breaking protoc-gen-buf-check-lint + @echo "Installing buf..." + @(cd /tmp; \ + curl -sSOL "https://github.com/bufbuild/buf/releases/download/v${BUF_VERSION}/buf-${UNAME_S}-${UNAME_M}"; \ + mv buf-${UNAME_S}-${UNAME_M} "${BIN}/buf"; \ + chmod +x "${BIN}/buf") + +protoc-gen-buf-check-breaking: + @echo "Installing protoc-gen-buf-check-breaking..." + @(cd /tmp; \ + curl -sSOL "https://github.com/bufbuild/buf/releases/download/v${BUF_VERSION}/protoc-gen-buf-check-breaking-${UNAME_S}-${UNAME_M}"; \ + mv protoc-gen-buf-check-breaking-${UNAME_S}-${UNAME_M} "${BIN}/protoc-gen-buf-check-breaking"; \ + chmod +x "${BIN}/protoc-gen-buf-check-breaking") + +protoc-gen-buf-check-lint: + @echo "Installing protoc-gen-buf-check-lint..." + @(cd /tmp; \ + curl -sSOL "https://github.com/bufbuild/buf/releases/download/v${BUF_VERSION}/protoc-gen-buf-check-lint-${UNAME_S}-${UNAME_M}"; \ + mv protoc-gen-buf-check-lint-${UNAME_S}-${UNAME_M} "${BIN}/protoc-gen-buf-check-lint"; \ + chmod +x "${BIN}/protoc-gen-buf-check-lint") + +tools-clean: + rm -f $(RUNSIM) + rm -f tools-stamp + +.PHONY: all tools tools-clean protoc buf protoc-gen-buf-check-breaking protoc-gen-buf-check-lint protoc-gen-gocosmos \ No newline at end of file diff --git a/genesis.json b/genesis.json new file mode 100644 index 0000000..aef3117 --- /dev/null +++ b/genesis.json @@ -0,0 +1,306 @@ +{ + "genesis_time": "2022-01-12T09:00:00.762226Z", + "chain_id": "deweb-testnet-0", + "initial_height": "1", + "consensus_params": { + "block": { + "max_bytes": "22020096", + "max_gas": "-1", + "time_iota_ms": "1000" + }, + "evidence": { + "max_age_num_blocks": "100000", + "max_age_duration": "172800000000000", + "max_bytes": "1048576" + }, + "validator": { + "pub_key_types": [ + "ed25519" + ] + }, + "version": {} + }, + "app_hash": "", + "app_state": { + "auth": { + "params": { + "max_memo_characters": "256", + "tx_sig_limit": "7", + "tx_size_cost_per_byte": "10", + "sig_verify_cost_ed25519": "590", + "sig_verify_cost_secp256k1": "1000" + }, + "accounts": [ + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "address": "deweb18gx4z38yxgnjvxt7l5774s96rghqwqwwuafv6v", + "pub_key": null, + "account_number": "0", + "sequence": "0" + }, + { + "@type": "/cosmos.auth.v1beta1.BaseAccount", + "address": "deweb1yvzaauz5snaaykpgfynjtyz5yhwu3dz9zj38tg", + "pub_key": null, + "account_number": "0", + "sequence": "0" + } + ] + }, + "bank": { + "params": { + "send_enabled": [], + "default_send_enabled": true + }, + "balances": [ + { + "address": "deweb1yvzaauz5snaaykpgfynjtyz5yhwu3dz9zj38tg", + "coins": [ + { + "denom": "udws", + "amount": "1000000000" + }, + { + "denom": "uwhns", + "amount": "1000000000000" + }, + { + "denom": "uwsc", + "amount": "10000000000000000000000000000000" + } + ] + }, + { + "address": "deweb18gx4z38yxgnjvxt7l5774s96rghqwqwwuafv6v", + "coins": [ + { + "denom": "udws", + "amount": "100000000000000" + } + ] + } + ], + "supply": [], + "denom_metadata": [] + }, + "capability": { + "index": "1", + "owners": [] + }, + "crisis": { + "constant_fee": { + "amount": "100000000", + "denom": "udws" + } + }, + "deweb": {}, + "distribution": { + "delegator_starting_infos": [], + "delegator_withdraw_infos": [], + "fee_pool": { + "community_pool": [] + }, + "outstanding_rewards": [], + "params": { + "base_proposer_reward": "0.000000000000000000", + "bonus_proposer_reward": "0.000000000000000000", + "community_tax": "0.000000000000000000", + "withdraw_addr_enabled": true + }, + "previous_proposer": "", + "validator_accumulated_commissions": [], + "validator_current_rewards": [], + "validator_historical_rewards": [], + "validator_slash_events": [] + }, + "evidence": { + "evidence": [] + }, + "feegrant": { + "allowances": [] + }, + "genutil": { + "gen_txs": [ + { + "body": { + "messages": [ + { + "@type": "/cosmos.staking.v1beta1.MsgCreateValidator", + "description": { + "moniker": "deweb.services", + "identity": "", + "website": "", + "security_contact": "", + "details": "" + }, + "commission": { + "rate": "0.100000000000000000", + "max_rate": "0.200000000000000000", + "max_change_rate": "0.010000000000000000" + }, + "min_self_delegation": "1", + "delegator_address": "deweb1yvzaauz5snaaykpgfynjtyz5yhwu3dz9zj38tg", + "validator_address": "dewebvaloper1yvzaauz5snaaykpgfynjtyz5yhwu3dz93hq6ft", + "pubkey": { + "@type": "/cosmos.crypto.ed25519.PubKey", + "key": "J4B6mVkCuBA6y58orWl+GTssLl7hb2Zbu9HLX8WSBys=" + }, + "value": { + "denom": "udws", + "amount": "10000000" + } + } + ], + "memo": "60a8d7e7e373eef18d966d15cd6c9962f54b501c@192.168.1.40:26656", + "timeout_height": "0", + "extension_options": [], + "non_critical_extension_options": [] + }, + "auth_info": { + "signer_infos": [ + { + "public_key": { + "@type": "/cosmos.crypto.secp256k1.PubKey", + "key": "Az0I5+3JAeKkUlol5lGM7bd1MrPeNy7mXS3SLfgNdTM2" + }, + "mode_info": { + "single": { + "mode": "SIGN_MODE_DIRECT" + } + }, + "sequence": "0" + } + ], + "fee": { + "amount": [], + "gas_limit": "200000", + "payer": "", + "granter": "" + } + }, + "signatures": [ + "bwnT54aCQuG/I0DsznplAFJ4Yc5EOmCEYrUhPeAljYpcUyL2lJvVdFXUKDwx6/GFAimfO2S+oUlacnhySE/ihQ==" + ] + } + ] + }, + "gov": { + "deposit_params": { + "max_deposit_period": "172800s", + "min_deposit": [ + { + "amount": "10000000", + "denom": "udws" + } + ] + }, + "deposits": [], + "proposals": [], + "starting_proposal_id": "1", + "tally_params": { + "quorum": "0.334000000000000000", + "threshold": "0.500000000000000000", + "veto_threshold": "0.334000000000000000" + }, + "votes": [], + "voting_params": { + "voting_period": "172800s" + } + }, + "ibc": { + "channel_genesis": { + "ack_sequences": [], + "acknowledgements": [], + "channels": [], + "commitments": [], + "next_channel_sequence": "0", + "receipts": [], + "recv_sequences": [], + "send_sequences": [] + }, + "client_genesis": { + "clients": [], + "clients_consensus": [], + "clients_metadata": [], + "create_localhost": false, + "next_client_sequence": "0", + "params": { + "allowed_clients": [ + "06-solomachine", + "07-tendermint" + ] + } + }, + "connection_genesis": { + "client_connection_paths": [], + "connections": [], + "next_connection_sequence": "0", + "params": { + "max_expected_time_per_block": "30000000000" + } + } + }, + "mint": { + "minter": { + "annual_provisions": "0.000000000000000000", + "inflation": "0.000000000000000000" + }, + "params": { + "blocks_per_year": "5256000", + "goal_bonded": "0.670000000000000000", + "inflation_max": "0.000000000000000000", + "inflation_min": "0.000000000000000000", + "inflation_rate_change": "0.000000000000000000", + "mint_denom": "udws" + } + }, + "params": null, + "slashing": { + "missed_blocks": [], + "params": { + "downtime_jail_duration": "600s", + "min_signed_per_window": "0.500000000000000000", + "signed_blocks_window": "100", + "slash_fraction_double_sign": "0.050000000000000000", + "slash_fraction_downtime": "0.010000000000000000" + }, + "signing_infos": [] + }, + "staking": { + "delegations": [], + "exported": false, + "last_total_power": "0", + "last_validator_powers": [], + "params": { + "bond_denom": "udws", + "historical_entries": 10000, + "max_entries": 7, + "max_validators": 100, + "unbonding_time": "1814400s" + }, + "redelegations": [], + "unbonding_delegations": [], + "validators": [] + }, + "token": { + "params": { + "issue_token_base_fee": { + "amount": "1000", + "denom": "dws" + }, + "mint_token_fee_ratio": "0.100000000000000000", + "token_tax_rate": "0.400000000000000000" + } + }, + "transfer": { + "denom_traces": [], + "params": { + "receive_enabled": true, + "send_enabled": true + }, + "port_id": "transfer" + }, + "upgrade": {}, + "vesting": {} + } +} \ No newline at end of file diff --git a/readme.md b/readme.md index 651d65b..80451c6 100644 --- a/readme.md +++ b/readme.md @@ -1,243 +1,65 @@ -# deweb -**deweb** is a blockchain built using Cosmos SDK and Tendermint and created with [Starport](https://github.com/tendermint/starport). +# Decentralized Web Services (DWS) Blockchain +# Hardware Requirements +Here are the minimal hardware configs required for running a validator/sentry node -## Initialize chain -``` -starport scaffold chain gitlab.com/deweb-services/deweb-chain -``` - -Create messages -``` -starport scaffold message save_wallet private_key chain --module deweb -starport scaffold message delete_wallet address --module deweb -``` - -Create queries -``` -starport scaffold query filter_user_key_records owner address chain deleted limit offset --response uuids --module deweb -``` +* 8GB RAM +* 4vCPUs +* 200GB Disk space -## API -``` -/deweb/external_wallets/v1beta1/list -?owner=deweb1z3z7lgfawp22mktkhxav5nr8g35m20ddpc4txj // фильтр по овнеру, мандатори -&address=deweb1z3z7lgfawp22mktkhxav5nr8g35m20ddpc4txj // это фильтр по полю address, может быть адресом любой сети, optional -&chain=cosmos // optional, default: return all chains -&deleted=true // optional, default: false -&limit=1000 // optional, default: 10 -&offset=1 // optional, default: 1 -``` - -Response: -``` -{ - "records": [ - { - "owner": "", - "address": "", - "encrypted_key": "", - "chain": "", - "deleted": true - } - ] -} +# Software Requirements +Install deps +``` +sudo apt-get install build-essential jq ``` -## Commands -Create record (transaction): -``` -dewebd tx deweb save-wallet [address] [encrypted_key] [chain] [flags] -``` -- address - address for which private key to store -- encrypted_key - message with key to store -- chain - from which chain is that address -- flags - cosmos SDK flags +# Compile instructions: install GoLang -After execution will set owner for this record - who sent transaction. - -Mark address removed (transaction): -``` -dewebd tx deweb delete-wallet [address] [flags] -``` -- address - address for which private key to store -On execution check that this record owner sent transaction +Install Go 1.17.x +The official instructions can be found here: https://golang.org/doc/install -Filter for records: -``` -dewebd query deweb filter-user-wallet-records [owner] [address] [chain] [deleted] [limit] [offset] [flags] +First remove any existing old Go installation as root ``` -Mandatory attribute os only owner. To leave string attribute empty set "" on position -- owner - address of owner for which to list records -- address - get record for selected address -- chain - filter addresses from chain -- deleted - add removed records to list (default: false) -- limit - limit for result -- offset - offset of results list - -## Test cases from console - -**Initial configuration for Cosmos SDK located in folder: cosmos_sdk_config in current repository** +sudo rm -rf /usr/local/go +``` -You must scaffold chain and then replace files in config and data home folder (by default located in ~/.deweb). -And then replace generate files of blockchain with files in this repo. -Or you can try to clone this repo, build binary and then set config hole folder via flag --home - -First build binary: -``` -starport chain build -``` -Initialize blockchain -``` -starport chain init +Download the software: ``` - -Test commands - -Created account "alice" with address "cosmos1r5xmpu03ne6pg262qy3ds0y7ujnvkpe9lsh9cz" - -Created account "bob" with address "cosmos1z8yef05j2d3h6qzewdl68t48007xrmurztz7wy" - -Creating test records: +curl https://dl.google.com/go/go1.17.6.linux-amd64.tar.gz | sudo tar -C/usr/local -zxvf - ``` -~/go/bin/dewebd tx deweb save-wallet cosmosaddress private_cosmos_key cosmos --from alice --chain-id deweb -~/go/bin/dewebd tx deweb save-wallet siaaddress private_sia_key sia --from alice --chain-id deweb -~/go/bin/dewebd tx deweb save-wallet bobaddress private_bob_key sia --from bob --chain-id deweb +Update environment variables to include go (copy everything and paste) ``` - -Get records by owner address +cat <<'EOF' >>$HOME/.profile +export GOROOT=/usr/local/go +export GOPATH=$HOME/go +export GO111MODULE=on +export GOBIN=$HOME/go/bin +export PATH=$PATH:/usr/local/go/bin:$GOBIN +EOF +source $HOME/.profile ``` -~/go/bin/dewebd q deweb filter-user-wallet-records cosmos1z8yef05j2d3h6qzewdl68t48007xrmurztz7wy -records: -- address: bobaddress - chain: sia - deleted: false - encrypted_key: private_bob_key - owner: cosmos1z8yef05j2d3h6qzewdl68t48007xrmurztz7wy - -~/go/bin/dewebd q deweb filter-user-wallet-records cosmos1r5xmpu03ne6pg262qy3ds0y7ujnvkpe9lsh9cz -records: -- address: cosmosaddress - chain: cosmos - deleted: false - encrypted_key: private_cosmos_key - owner: cosmos1r5xmpu03ne6pg262qy3ds0y7ujnvkpe9lsh9cz -- address: siaaddress - chain: sia - deleted: false - encrypted_key: private_sia_key - owner: cosmos1r5xmpu03ne6pg262qy3ds0y7ujnvkpe9lsh9cz +To verify that Go is installed: +``` +go version ``` +Should return go version go1.17.6 linux/amd64 -Get records for chain cosmos: +# Compile `dewebd` source code by yourself +## Download source code and compile ``` -~/go/bin/dewebd q deweb filter-user-wallet-records cosmos1r5xmpu03ne6pg262qy3ds0y7ujnvkpe9lsh9cz "" cosmos -records: -- address: cosmosaddress - chain: cosmos - deleted: false - encrypted_key: private_cosmos_key - owner: cosmos1r5xmpu03ne6pg262qy3ds0y7ujnvkpe9lsh9cz -``` - -Remove records: +git clone https://github.com/deweb-services/deweb.git +cd deweb +git checkout v1.0 +make build #it build the binary in build/ folder ``` -~/go/bin/dewebd tx deweb delete-wallet siaaddress --from alice --chain-id deweb -``` - -Check that records marked as removed: -``` -~/go/bin/dewebd q deweb filter-user-wallet-records cosmos1r5xmpu03ne6pg262qy3ds0y7ujnvkpe9lsh9cz -records: -- address: cosmosaddress - chain: cosmos - deleted: false - encrypted_key: private_cosmos_key - owner: cosmos1r5xmpu03ne6pg262qy3ds0y7ujnvkpe9lsh9cz - -~/go/bin/dewebd q deweb filter-user-wallet-records cosmos1r5xmpu03ne6pg262qy3ds0y7ujnvkpe9lsh9cz "" "" true -records: -- address: cosmosaddress - chain: cosmos - deleted: false - encrypted_key: private_cosmos_key - owner: cosmos1r5xmpu03ne6pg262qy3ds0y7ujnvkpe9lsh9cz -- address: siaaddress - chain: sia - deleted: true - encrypted_key: private_sia_key - owner: cosmos1r5xmpu03ne6pg262qy3ds0y7ujnvkpe9lsh9cz -``` - -Limits and offsets: -``` -~/go/bin/dewebd q deweb filter-user-wallet-records cosmos1r5xmpu03ne6pg262qy3ds0y7ujnvkpe9lsh9cz "" "" true 1 -records: -- address: cosmosaddress - chain: cosmos - deleted: false - encrypted_key: private_cosmos_key - owner: cosmos1r5xmpu03ne6pg262qy3ds0y7ujnvkpe9lsh9cz - -~/go/bin/dewebd q deweb filter-user-wallet-records cosmos1r5xmpu03ne6pg262qy3ds0y7ujnvkpe9lsh9cz "" "" true 1 1 -records: -- address: siaaddress - chain: sia - deleted: true - encrypted_key: private_sia_key - owner: cosmos1r5xmpu03ne6pg262qy3ds0y7ujnvkpe9lsh9cz - ``` - - -## Get started - -``` -starport chain serve -``` - -`serve` command installs dependencies, builds, initializes, and starts your blockchain in development. - -### Configure - -Your blockchain in development can be configured with `config.yml`. To learn more, see the [Starport docs](https://docs.starport.network). - -### Launch - -To launch your blockchain live on multiple nodes, use `starport network` commands. Learn more about [Starport Network](https://github.com/tendermint/spn). - -### Web Frontend - -Starport has scaffolded a Vue.js-based web app in the `vue` directory. Run the following commands to install dependencies and start the app: - -``` -cd vue -npm install -npm run serve -``` - -The frontend app is built using the `@starport/vue` and `@starport/vuex` packages. For details, see the [monorepo for Starport front-end development](https://github.com/tendermint/vue). - -## Release -To release a new version of your blockchain, create and push a new tag with `v` prefix. A new draft release with the configured targets will be created. - -``` -git tag v0.1 -git push origin v0.1 -``` - -After a draft release is created, make your final changes from the release page and publish it. - -### Install -To install the latest version of your blockchain node's binary, execute the following command on your machine: - +To know the version: ``` -curl https://get.starport.network/deweb-services/deweb@latest! | sudo bash +build/dewebd version ``` -`deweb-services/deweb` should match the `username` and `repo_name` of the Github repository to which the source code was pushed. Learn more about [the install process](https://github.com/allinbits/starport-installer). +The output must be `1.0` -## Learn more +Is the version match, now you have two options +* Move the binary to the /usr/local/bin path with: `sudo mv build/dewebd /usr/local/bin/` +* Compile and install the binary in the $GOPATH path: `make install` -- [Starport](https://github.com/tendermint/starport) -- [Starport Docs](https://docs.starport.network) -- [Cosmos SDK documentation](https://docs.cosmos.network) -- [Cosmos SDK Tutorials](https://tutorials.cosmos.network) -- [Discord](https://discord.gg/cosmosnetwork) +# Join our Andromeda Testnet: `deweb-testnet-0` +* [Instructions](https://docs.deweb.services/guides/validator-setup-guide)