Skip to content

Commit

Permalink
Merge pull request #67 from provenance-io/rc/v0.1.3
Browse files Browse the repository at this point in the history
Rc/v0.1.3
  • Loading branch information
iramiller committed Feb 13, 2021
2 parents 32afa50 + e6cf42a commit 3982081
Show file tree
Hide file tree
Showing 114 changed files with 36,754 additions and 605 deletions.
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Expand Up @@ -18,9 +18,9 @@ Before we can merge this PR, please make sure that all the following items have
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

- [ ] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/provenance-io/provenance/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/provenance-io/provenance/blob/main/CONTRIBUTING.md#pr-targeting))
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Wrote unit and integration [tests](https://github.com/provenance-io/provenance/blob/master/CONTRIBUTING.md#testing)
- [ ] Wrote unit and integration [tests](https://github.com/provenance-io/provenance/blob/main/CONTRIBUTING.md#testing)
- [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [ ] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md`
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Expand Up @@ -22,7 +22,7 @@ jobs:
- uses: golangci/golangci-lint-action@master
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.32
version: v1.35
args: --timeout 10m
github-token: ${{ secrets.github_token }}
if: env.GIT_DIFF
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -39,3 +39,6 @@ profile.iws
tools-stamp
tmp-swagger-gen
proto-tools-stamp

#emacs tmp files
.#*
2 changes: 1 addition & 1 deletion .golangci.yml
Expand Up @@ -22,7 +22,7 @@ linters:
- gosimple
- govet
- ineffassign
- interfacer
# - interfacer / disabled until 1.36 is available due to bugs for binarymarshaller that can't be muted with nolintlint
# - lll
- maligned
- misspell
Expand Down
17 changes: 16 additions & 1 deletion CHANGELOG.md
Expand Up @@ -34,7 +34,22 @@ Ref: https://keepachangelog.com/en/1.0.0/

## Unreleased

## [v0.1.2](https://github.com/provenance-io/provenance/releases/tag/v0.1.1) - 2021-01-27

## [v0.1.3](https://github.com/provenance-io/provenance/releases/tag/v0.1.3) - 2021-02-12

* Add support for Scope objects to Metadata module #53
* Denom Metadata config for nhash in testnet #42
* Denom Metadata support for marker module #47
* WASM support for Marker module #28
### Bug Fixes

* Name service allows uuids as segments despite length restrictions #48
* Protogen breaks on marker uint64 equals #38
* Fix for marker module beginblock wiring #34
* Fix for marker get cli command
* Updated the links in PULL_REQUEST_TEMPLATE.md to use correct 'main' branch

## [v0.1.2](https://github.com/provenance-io/provenance/releases/tag/v0.1.2) - 2021-01-27

### Bug Fixes

Expand Down
52 changes: 49 additions & 3 deletions README.md
@@ -1,3 +1,49 @@
# Provenance Blockchain App (provenanced)
The Provenance Blockchain is based on the [Cosmos SDK](https://github.com/cosmos/cosmos-sdk) and a private blockchain
launched by [Figure Technologies](https://figure.com) in 2018.
<div align="center">
<img src="./docs/logo.svg" alt="Provenance"/>
</div>
<br/><br/>

# Provenance Blockchain

[Provenance] is a distributed, proof of stake blockchain designed for the financial services industry.

For more information about [Provenance Inc](https://provenance.io) visit https://provenance.io


The Provenance app is the core blockchain application for running a node on the Provenance Network. The node
software is based on the open source [Tendermint](https://tendermint.com) consensus engine combined with the
[Cosmos SDK](https://cosmos.network) and custom modules to support apis for financial services. [Figure](https://figure.com)
is the first and primary user of the Provenance Blockchain.

## Status

[![Latest Release][release-badge]][release-latest]
[![Apache 2.0 License][license-badge]][license-url]
[![Go Report][goreport-badge]][goreport-url]
[![Code Coverage][cover-badge]][cover-report]
[![LOC][loc-badge]][loc-report]
![Lint Status][lint-badge]


[license-badge]: https://img.shields.io/github/license/provenance-io/provenance.svg
[license-url]: https://github.com/provenance-io/provenance/blob/main/LICENSE
[release-badge]: https://img.shields.io/github/tag/provenance-io/provenance.svg
[release-latest]: https://github.com/provenance-io/provenance/releases/latest
[goreport-badge]: https://goreportcard.com/badge/github.com/provenance-io/provenance
[goreport-url]: https://goreportcard.com/report/github.com/provenance-io/provenance
[cover-badge]: https://codecov.io/gh/provenance-io/provenance/branch/main/graph/badge.svg
[cover-report]: https://codecov.io/gh/provenance-io/provenance
[loc-badge]: https://tokei.rs/b1/github/provenance-io/provenance
[loc-report]: https://github.com/provenance-io/provenance
[lint-badge]: https://github.com/provenance-io/provenance/workflows/Lint/badge.svg
[provenance]: https://provenance.io/#overview

The Public Provenance blockchain is under heavy development with an expected mainnet launch at the end of Q1 2021. The
upcoming public blockchain is the evolution of the private Provenance network blockchain started in 2018.
Current development is being supported by [Figure Technologies](https://figure.com).

## Upcoming Milestones

- **January 2021** - Launch of alpha testnet including three of the four core blockchain modules (attributes, name, and marker)
- **February 2021** - General testnet launch
- **Q1 2021** - Migration of private Provenance Blockchain to public mainnet.
12 changes: 10 additions & 2 deletions RELEASE_CHANGELOG.md
@@ -1,6 +1,14 @@

## [v0.1.2](https://github.com/provenance-io/provenance/releases/tag/v0.1.1) - 2021-01-27
## [v0.1.3](https://github.com/provenance-io/provenance/releases/tag/v0.1.3) - 2021-02-12

* Add support for Scope objects to Metadata module #53
* Denom Metadata config for nhash in testnet #42
* Denom Metadata support for marker module #47
* WASM support for Marker module #28
### Bug Fixes

* Update goreleaser configuration to match `provenance` repository name
* Name service allows uuids as segments despite length restrictions #48
* Protogen breaks on marker uint64 equals #38
* Fix for marker module beginblock wiring #34
* Fix for marker get cli command
* Updated the links in PULL_REQUEST_TEMPLATE.md to use correct 'main' branch
39 changes: 34 additions & 5 deletions app/app.go
Expand Up @@ -91,6 +91,7 @@ import (
"github.com/provenance-io/provenance/x/marker"
markerkeeper "github.com/provenance-io/provenance/x/marker/keeper"
markertypes "github.com/provenance-io/provenance/x/marker/types"
markerwasm "github.com/provenance-io/provenance/x/marker/wasm"

"github.com/provenance-io/provenance/x/attribute"
attributekeeper "github.com/provenance-io/provenance/x/attribute/keeper"
Expand All @@ -102,6 +103,10 @@ import (
nametypes "github.com/provenance-io/provenance/x/name/types"
namewasm "github.com/provenance-io/provenance/x/name/wasm"

"github.com/provenance-io/provenance/x/metadata"
metadatakeeper "github.com/provenance-io/provenance/x/metadata/keeper"
metadatatypes "github.com/provenance-io/provenance/x/metadata/types"

"github.com/CosmWasm/wasmd/x/wasm"
wasmclient "github.com/CosmWasm/wasmd/x/wasm/client"

Expand Down Expand Up @@ -157,6 +162,7 @@ var (
marker.AppModuleBasic{},
attribute.AppModuleBasic{},
name.AppModuleBasic{},
metadata.AppModuleBasic{},
wasm.AppModuleBasic{},
)

Expand Down Expand Up @@ -225,6 +231,7 @@ type App struct {
TransferKeeper ibctransferkeeper.Keeper

MarkerKeeper markerkeeper.Keeper
MetadataKeeper metadatakeeper.Keeper
AttributeKeeper attributekeeper.Keeper
NameKeeper namekeeper.Keeper
WasmKeeper wasm.Keeper
Expand Down Expand Up @@ -262,6 +269,7 @@ func New(
govtypes.StoreKey, paramstypes.StoreKey, ibchost.StoreKey, upgradetypes.StoreKey,
evidencetypes.StoreKey, ibctransfertypes.StoreKey, capabilitytypes.StoreKey,

metadatatypes.StoreKey,
markertypes.StoreKey,
attributetypes.StoreKey,
nametypes.StoreKey,
Expand Down Expand Up @@ -326,6 +334,10 @@ func New(
stakingtypes.NewMultiStakingHooks(app.DistrKeeper.Hooks(), app.SlashingKeeper.Hooks()),
)

app.MetadataKeeper = metadatakeeper.NewKeeper(
appCodec, keys[metadatatypes.StoreKey], app.GetSubspace(metadatatypes.ModuleName), app.AccountKeeper,
)

app.MarkerKeeper = markerkeeper.NewKeeper(
appCodec, keys[markertypes.StoreKey], app.GetSubspace(markertypes.ModuleName), app.AccountKeeper, app.BankKeeper,
)
Expand Down Expand Up @@ -353,11 +365,13 @@ func New(
encoderRegistry := provwasm.NewEncoderRegistry()
encoderRegistry.RegisterEncoder(nametypes.RouterKey, namewasm.Encoder)
encoderRegistry.RegisterEncoder(attributetypes.RouterKey, attributewasm.Encoder)
encoderRegistry.RegisterEncoder(markertypes.RouterKey, markerwasm.Encoder)

// Init CosmWasm query integrations
querierRegistry := provwasm.NewQuerierRegistry()
querierRegistry.RegisterQuerier(nametypes.RouterKey, namewasm.Querier(app.NameKeeper))
querierRegistry.RegisterQuerier(attributetypes.RouterKey, attributewasm.Querier(app.AttributeKeeper))
querierRegistry.RegisterQuerier(markertypes.RouterKey, markerwasm.Querier(app.MarkerKeeper))

// Add the staking feature and indicate that provwasm contracts can be run on this chain.
supportedFeatures := "staking,provenance"
Expand Down Expand Up @@ -443,10 +457,11 @@ func New(
distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper),
staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper),

metadata.NewAppModule(appCodec, app.MetadataKeeper, app.AccountKeeper),
marker.NewAppModule(appCodec, app.MarkerKeeper, app.AccountKeeper, app.BankKeeper),
name.NewAppModule(appCodec, app.NameKeeper, app.AccountKeeper),
attribute.NewAppModule(app.AttributeKeeper),
wasm.NewAppModule(&app.WasmKeeper),
wasm.NewAppModule(&app.WasmKeeper, app.StakingKeeper),

upgrade.NewAppModule(app.UpgradeKeeper),
evidence.NewAppModule(app.EvidenceKeeper),
Expand All @@ -460,11 +475,21 @@ func New(
// CanWithdrawInvariant invariant.
// NOTE: staking module is required if HistoricalEntries param > 0
app.mm.SetOrderBeginBlockers(
upgradetypes.ModuleName, minttypes.ModuleName, distrtypes.ModuleName, slashingtypes.ModuleName,
evidencetypes.ModuleName, stakingtypes.ModuleName, ibchost.ModuleName,
upgradetypes.ModuleName,
minttypes.ModuleName,
distrtypes.ModuleName,
slashingtypes.ModuleName,
evidencetypes.ModuleName,
stakingtypes.ModuleName,
ibchost.ModuleName,
markertypes.ModuleName,
)

app.mm.SetOrderEndBlockers(crisistypes.ModuleName, govtypes.ModuleName, stakingtypes.ModuleName)
app.mm.SetOrderEndBlockers(
crisistypes.ModuleName,
govtypes.ModuleName,
stakingtypes.ModuleName,
)

// NOTE: The genutils module must occur after staking so that pools are
// properly initialized with tokens from genesis accounts.
Expand All @@ -484,6 +509,7 @@ func New(
markertypes.ModuleName,
nametypes.ModuleName,
attributetypes.ModuleName,
metadatatypes.ModuleName,
wasm.ModuleName,
ibchost.ModuleName,
genutiltypes.ModuleName,
Expand All @@ -505,11 +531,13 @@ func New(
distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper),
slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper),

// TODO -- add simulation to metadata module
// metadata.NewAppModule(appCodec, app.MarkerKeeper, app.AccountKeeper),
// TODO -- add simulation to marker module
// marker.NewAppModule(appCodec, app.MarkerKeeper, app.AccountKeeper, app.BankKeeper),
name.NewAppModule(appCodec, app.NameKeeper, app.AccountKeeper),
attribute.NewAppModule(app.AttributeKeeper),
wasm.NewAppModule(&app.WasmKeeper),
wasm.NewAppModule(&app.WasmKeeper, app.StakingKeeper),

params.NewAppModule(app.ParamsKeeper),
evidence.NewAppModule(app.EvidenceKeeper),
Expand Down Expand Up @@ -725,6 +753,7 @@ func initParamsKeeper(appCodec codec.BinaryMarshaler, legacyAmino *codec.LegacyA
paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(govtypes.ParamKeyTable())
paramsKeeper.Subspace(crisistypes.ModuleName)

paramsKeeper.Subspace(metadatatypes.ModuleName)
paramsKeeper.Subspace(markertypes.ModuleName)
paramsKeeper.Subspace(nametypes.ModuleName)
paramsKeeper.Subspace(attributetypes.ModuleName)
Expand Down
26 changes: 23 additions & 3 deletions cmd/provenanced/cmd/testnet.go
Expand Up @@ -305,16 +305,36 @@ func initGenFiles(
authGenState.Accounts = accounts
appGenState[authtypes.ModuleName] = clientCtx.JSONMarshaler.MustMarshalJSON(&authGenState)

// PROVENANCE SPECIFIC CONFIG
// ----------------------------------------

// set the balances in the genesis state
var bankGenState banktypes.GenesisState
clientCtx.JSONMarshaler.MustUnmarshalJSON(appGenState[banktypes.ModuleName], &bankGenState)

bankGenState.Balances = genBalances
nhashDenomUnit := banktypes.DenomUnit{
Exponent: 0,
Denom: "nhash",
Aliases: []string{"nanohash"},
}
hashDenomUnit := banktypes.DenomUnit{
Exponent: 9,
Denom: "hash",
}
denomUnits := []*banktypes.DenomUnit{
&hashDenomUnit,
&nhashDenomUnit,
}
denomMetadata := banktypes.Metadata{
Description: "The native staking token of the Provenance Blockchain.",
Display: "hash",
Base: "nhash",
DenomUnits: denomUnits,
}
bankGenState.DenomMetadata = []banktypes.Metadata{denomMetadata}
appGenState[banktypes.ModuleName] = clientCtx.JSONMarshaler.MustMarshalJSON(&bankGenState)

// PROVENANCE SPECIFIC CONFIG
// ----------------------------------------

// Set the staking denom
var stakeGenState stakingtypes.GenesisState
clientCtx.JSONMarshaler.MustUnmarshalJSON(appGenState[stakingtypes.ModuleName], &stakeGenState)
Expand Down
3 changes: 3 additions & 0 deletions docs/logo.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 7 additions & 3 deletions go.mod
Expand Up @@ -3,9 +3,10 @@ module github.com/provenance-io/provenance
go 1.15

require (
github.com/CosmWasm/wasmd v0.14.0
github.com/CosmWasm/wasmd v0.15.0
github.com/armon/go-metrics v0.3.6
github.com/cosmos/cosmos-sdk v0.40.1
github.com/btcsuite/btcd v0.21.0-beta
github.com/cosmos/cosmos-sdk v0.41.0
github.com/cosmos/go-bip39 v1.0.0
github.com/gogo/protobuf v1.3.3
github.com/golang/protobuf v1.4.3
Expand All @@ -25,8 +26,11 @@ require (
github.com/tendermint/tm-db v0.6.3
google.golang.org/genproto v0.0.0-20210114201628-6edceaf6022f
google.golang.org/grpc v1.35.0
google.golang.org/protobuf v1.25.0
gopkg.in/yaml.v2 v2.4.0

)

replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.2-alpha.regen.4
replace google.golang.org/grpc => google.golang.org/grpc v1.33.2

replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1

0 comments on commit 3982081

Please sign in to comment.