Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Release] columbus-3 #307

Merged
merged 93 commits into from
Dec 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
bcc0b99
add chain id check to update endblocker only for columbus-2
Jun 24, 2019
490acea
move chain-id check to update module
Jun 25, 2019
2817876
add chain id check to update endblocker only for columbus-2
Jun 24, 2019
4dc21ea
move chain-id check to update module
Jun 25, 2019
704fdea
Merge branch 'bugfix/update-230000-only-for-columbus-2' into develop
Jun 25, 2019
de63463
add gitattributes to prevent linguist from checking vendor code and d…
Jul 8, 2019
2e3f0c8
newline at the end of file
Jul 8, 2019
bb7dbec
Merge pull request #203 from terra-project/bugfix/repository-language
dokwon Jul 8, 2019
8b39398
Feature/recover-old-hd-path (#193)
Jul 11, 2019
a1fd532
change mock ledger to accept custom coin type from config
Jul 12, 2019
c0dab1c
Merge pull request #211 from terra-project/bugfix/mock-ledger-custom-…
dokwon Jul 15, 2019
c055928
Bugfix/peek epoch seigniorage (#196)
Jul 19, 2019
4f9baea
Bugfix/treasury update target epoch (#198)
Jul 19, 2019
5dcd160
Updated CHANGELOG
hanjukim Jul 19, 2019
94f855e
Changed PR template
hanjukim Jul 19, 2019
1db11ed
Merge pull request #217 from terra-project/198-changelog
Jul 19, 2019
3d8a2f2
update docs hints
etienne-napoleone Aug 7, 2019
5af2f9c
update wording on some hints
etienne-napoleone Aug 7, 2019
6fb88e4
Merge pull request #222 from terra-project/documentation/hints
dokwon Aug 7, 2019
842a87e
correct minor typo in swagger
etienne-napoleone Aug 27, 2019
f0317db
Merge pull request #227 from terra-project/swagger-typo
Aug 30, 2019
a84bb2a
Feature/ Minor goreleaser changes (#223)
etienne-napoleone Sep 2, 2019
23ea272
update to cosmos-v0.37.0
Sep 3, 2019
2929e9f
Merge pull request #231 from terra-project/feature/update-cosmos-sdk-…
dokwon Sep 17, 2019
d5b43d8
runsim update
Sep 10, 2019
5bf7194
distribute oracle rewards to ballot winner immediately after tallying
Sep 19, 2019
f24c6cb
Merge pull request #232 from terra-project/feature/runsim-update
dokwon Sep 23, 2019
bd2705c
Merge pull request #235 from terra-project/feature/oracle-reward-dist…
dokwon Sep 23, 2019
db32666
add goverance module and register treasury tax-rate & reward weight u…
Sep 10, 2019
1272bd6
apply constant product swap
Sep 10, 2019
c276f99
Merge pull request #234 from terra-project/feature/adopt-gov-module
dokwon Sep 24, 2019
0e9e419
fix discord link in readme (#229)
etienne-napoleone Sep 24, 2019
291c66f
merge develop
Sep 24, 2019
e3fb247
change replenish&update pools to update only terra pool and do consta…
Sep 24, 2019
4fc0c31
change swap to do not add min-spared to contant product spread
Sep 24, 2019
7f13b31
fix wrong terracli description
Sep 25, 2019
7a12827
Merge pull request #237 from terra-project/bugfix/fix-wrong-description
dokwon Sep 25, 2019
de9252e
Remove LunaPool from the keeper because it can be retrieved from CP/T…
Sep 26, 2019
5b2ce5e
Remove unnecessary internal swap when computing spread
Sep 26, 2019
fe42a73
* fix market & treasury genesis export import feature
Sep 27, 2019
564fce5
add genesis test to market & treasury module
Sep 27, 2019
b5d0f13
append market query long description
Oct 4, 2019
037bb91
Set new parameter 'PoolRecoveryPeriod'. Blockly replenish Terra&Luna …
Oct 14, 2019
070ad1f
Fix oracle/denoms/actives example in swagger (#251)
etienne-napoleone Oct 15, 2019
4ee0087
Merge branch 'develop' into feature/swap-constant-product
Oct 15, 2019
96c02c9
change base pool can be configured by param change proposal not by lu…
Oct 15, 2019
0d37d05
Merge branch 'feature/swap-constant-product' of https://github.com/te…
Oct 15, 2019
4f9535d
Merge pull request #233 from terra-project/feature/swap-constant-product
dokwon Oct 15, 2019
8042329
[Feature][oracle] Add whitelist and Update reward distribution mechan…
Oct 15, 2019
c4e05a1
Update guide document for columbus-3 (#239)
Oct 15, 2019
a7d2ba0
Feature/remove oracle slashing (#253)
Oct 15, 2019
35c0d3b
[Feature] Update cosmos-sdk to v0.37.2 (#240)
Oct 16, 2019
06daa32
Feature/refactoring (#254)
Oct 18, 2019
2f75b51
updates for goreport (#255)
Oct 18, 2019
492beb6
fix all query response to be bonded with height (#261)
Oct 25, 2019
e8f0dcf
register supply/ModuleAccount to auth ModuleCdc (#258)
Oct 25, 2019
642ee0c
* Append a single end point to query all prevotes of a validator (#256)
Oct 25, 2019
3a25148
fix oracle invalid prevote hash error msg to print byte length not st…
Oct 25, 2019
f5544a3
remove oracle account address from send blacklist (#257)
Oct 25, 2019
18246e3
shortened default oracle voteperiod to 30 seconds. Need to reflect in…
dokwon Nov 4, 2019
9d2feeb
Bump SDK version to v0.37.4 (#266)
Nov 12, 2019
4025cd5
delete tools-stamp (#262)
Nov 12, 2019
157d778
fix treasury comments (#267)
Nov 12, 2019
864756a
change treasury keeper to store only indicators for the each epoch (#…
Nov 17, 2019
543d1d2
[Feature] oracle refactor & add oracle slashing (#265)
Nov 17, 2019
348c089
fix merge err (#271)
Nov 17, 2019
c327590
* change treasury init genesis to use current supply when epoch initi…
Nov 18, 2019
173e276
chore(ci): remove git cache
etienne-napoleone Nov 18, 2019
ac1ec60
Merge pull request #273 from terra-project/feature/ci-remove-git-cache
etienne-napoleone Nov 18, 2019
394850c
fix oracle rest path (#274)
Nov 18, 2019
64cf204
bind height to rest query (#275)
Nov 19, 2019
83aab75
skip oracle slashing for not passed ballot
Nov 19, 2019
57a8e37
[Bugfix] Add features to sync swagger doc (#283)
Nov 20, 2019
b06d0b5
align oracle parameters to units of blocks (#279)
Nov 20, 2019
6bc6f38
[Bug] fix to apply reward spread by multiplication (#281)
Nov 20, 2019
ebdd166
align params stringify (#286)
Nov 21, 2019
64a74ff
allow non-positive exchange-rate vote (#287)
Nov 21, 2019
4352374
create new event manager per tx (#290)
Nov 24, 2019
74e8cda
[Feature] oracle MsgDelegateFeedConsent.Deleagtee to Delegate (#288)
Nov 24, 2019
c0170a3
change log update for columbus-3 release (#268)
Nov 24, 2019
9b5718d
prevent overflow by blocking huge input at handler & querier (#291)
Nov 24, 2019
ca82e4a
go-releaser udpate (#299)
Dec 3, 2019
2862180
reward policy param update (#296)
Dec 3, 2019
e519330
create oracle account at init genesis (#293)
Dec 3, 2019
0ba438d
remove docs from the core repo (#298)
Dec 3, 2019
15fbf9c
fix oracle endpoint to accept voter variable (#295)
Dec 3, 2019
1b35fb8
[Feature] New market params for the high volatility TERRA (#300)
Dec 3, 2019
f09ab19
genesis update script for columbus-3 (wip) (#244)
Dec 3, 2019
1eb8b99
change circle ci for auto gorelease execution (#306)
Dec 10, 2019
2e2ef16
build tx signatures as many as necessary for the msgs (#303)
Dec 10, 2019
4c5ae28
fix banner & changelog version (#301)
Dec 10, 2019
9190a17
swagger update (#305)
Dec 10, 2019
51d6097
[Bugfix] genesis script (#304)
Dec 10, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
452 changes: 298 additions & 154 deletions .circleci/config.yml

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ ignore:
- "docs"
- "*.md"
- "*.rst"
- "**/cli"
- "**/rest"
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
client/lcd/* linguist-vendored=true
docs/* linguist-documentation=true
6 changes: 0 additions & 6 deletions .gitbook.yaml

This file was deleted.

12 changes: 6 additions & 6 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
** Summary of changes **
## Summary of changes

<Describe summary of major changes here>
<Describe summary of major changes here>

** Report of required housekeeping **
## Report of required housekeeping

- [ ] Github issue OR spec proposal link
- [ ] Wrote tests
- [ ] Wrote tests
- [ ] Updated relevant documentation (docs/)
- [ ] Added a relevant changelog entry: clog add [section] [stanza] [message]

======
----

** (FOR ADMIN) Before merging **
## (FOR ADMIN) Before merging

- [ ] Added appropriate labels to PR
- [ ] Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ build
vendor
.vendor-new
build
dist
tools/bin/*
examples/build/*
docs/_build
client/lcd/statik/statik.go
tools-stamp

# Data - ideally these don't exist
examples/basecoin/app/data
Expand All @@ -31,6 +33,7 @@ mytestnet
# Testing
coverage.txt
profile.out
sim_log_file

# Vagrant
.vagrant/
Expand Down
9 changes: 9 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,21 @@ linters:
- ineffassign
- unconvert
- misspell
- govet
# - unused
# - deadcode
- goconst
- gosec
# - staticcheck
linters-settings:
gocyclo:
min-complexity: 11
errcheck:
ignore: fmt:.*,io/ioutil:^Read.*,github.com/spf13/cobra:MarkFlagRequired,github.com/spf13/viper:BindPFlag
golint:
min-confidence: 1.1
issues:
exclude:
- composite
run:
tests: false
71 changes: 26 additions & 45 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,27 @@ project_name: terra

before:
hooks:
- make get_tools
- make tools
- make go-mod-cache

builds:
-
id: 'terracli'
main: cmd/terracli/main.go
binary: terracli
flags:
- -tags=netgo
asmflags:
- all=-trimpath={{.Env.GOPATH}}
gcflags:
- all=-trimpath={{.Env.GOPATH}}
ldflags: |
-s -w
-X github.com/terra-project/core/version.Version={{.Version}}
-X github.com/terra-project/core/version.Commit={{.Commit}}
-X "github.com/terra-project/core/version.BuildTags={{.Env.BUILD_TAGS}}"
-X github.com/terra-project/core/version.GoSumHash={{.Env.GOSUM}}
-X github.com/cosmos/cosmos-sdk/version.Name=terra
-X github.com/cosmos/cosmos-sdk/version.ServerName=terrad
-X github.com/cosmos/cosmos-sdk/version.ClientName=terracli
-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=netgo"
env:
- GO111MODULE=on
- CGO_ENABLED=0
Expand All @@ -35,18 +39,22 @@ builds:
goarch: 386

-
main: cmd/terrad/main.go
id: 'terrad'
main: ./cmd/terrad
binary: terrad
flags:
- -tags=netgo
asmflags:
- all=-trimpath={{.Env.GOPATH}}
gcflags:
- all=-trimpath={{.Env.GOPATH}}
ldflags: |
-s -w
-X github.com/terra-project/core/version.Version={{.Version}}
-X github.com/terra-project/core/version.Commit={{.Commit}}
-X "github.com/terra-project/core/version.BuildTags={{.Env.BUILD_TAGS}}"
-X github.com/terra-project/core/version.GoSumHash={{.Env.GOSUM}}
-X github.com/cosmos/cosmos-sdk/version.Name=terra
-X github.com/cosmos/cosmos-sdk/version.ServerName=terrad
-X github.com/cosmos/cosmos-sdk/version.ClientName=terracli
-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=netgo"
env:
- GO111MODULE=on
- CGO_ENABLED=0
Expand All @@ -62,40 +70,13 @@ builds:
- goos: windows
goarch: 386

archives:
-
main: cmd/terrakeyutil/main.go
binary: terrakeytutil
asmflags:
- all=-trimpath={{.Env.GOPATH}}
gcflags:
- all=-trimpath={{.Env.GOPATH}}
ldflags: |
-s -w
-X github.com/terra-project/core/version.Version={{.Version}}
-X github.com/terra-project/core/version.Commit={{.Commit}}
-X "github.com/terra-project/core/version.BuildTags={{.Env.BUILD_TAGS}}"
-X github.com/terra-project/core/version.GoSumHash={{.Env.GOSUM}}
env:
- GO111MODULE=on
- CGO_ENABLED=0
goos:
- windows
- darwin
- linux
goarch:
- amd64
ignore:
- goos: darwin
goarch: 386
- goos: windows
goarch: 386

archive:
replacements:
darwin: Darwin
linux: Linux
windows: Windows
amd64: x86_64
replacements:
darwin: Darwin
linux: Linux
windows: Windows
amd64: x86_64
checksum:
name_template: 'checksums.txt'
snapshot:
Expand Down
196 changes: 196 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,199 @@
## 0.3.0
### Breaking Changes
#### [\#265](https://github.com/terra-project/core/pull/265) Oracle refactor & Oracle slashing
##### Slashing
A validator get slashed `SlashFraction`% if the one perform any of the following violations in `SlashWindow - minValidPerWindow` voteperiods over a window of `SlashWindow` voteperiods:

1. A vote is missing for any of the denom in the whitelist. Oracle voters looking to abstain must still submit a "vote of no confidence", which has 0 for the luna ExchangeRate field of the prevote.
2. A submitted vote is more than max(`RewardBand`, standard deviation) from the elected median
3. Oracle voters who submit abstain vote with other invalid votes will also get slashed.

##### Codec Changes
* `oracle/MsgDelegateFeederPermission` => `oracle/MsgDelegateFeedConsent`

##### New End Points
* `/oracle/voters/{%s}/miss` return the # of vote periods missed in this oracle slash window.

##### Path Changes
* `/oracle/denoms/{denom}/price` => `/oracle/denoms/{denom}/exchange_rate`

##### Request Body Changes

* POST /oracle/denoms/{denom}/prevotes
* POST /oracle/denoms/{denom}/votes
```
Price sdk.Dec `json:"price"`
```
has been changed to
```
ExchangeRate sdk.Dec `json:"exchange_rate"`
```

#### [\#256](https://github.com/terra-project/core/pull/256) Oracle endpoints improvement
##### New EndPoints
```
/oracle/voters/{validator}/votes
/oracle/voters/{validator}/prevotes
/oracle/denoms/prices
```

#### [\#250](https://github.com/terra-project/core/pull/250) Oracle whitelist & Reward distribution update
* Create a whitelist param that stores an array of denoms that are whitelisted by the protocol.
* Edit the oracle `Reward Pool of a VotePeriod = oracle module account / (n vote periods)`.
* Oracle module account is whitelisted in the bank module such that users can donate funds to the oracle module account

#### [\#234](https://github.com/terra-project/core/pull/234) Adopt gov module
`distribution` module already contains `community-pool-spend` proposal suitable for `budget` so budget module is removed. There are two custom governance proposals from `treasury` module; `tax-rate-update` & `reward-weight-update` proposals.

##### New EndPoints
```
(GET)/gov/proposals
(GET)/gov/proposals/{proposalId}
(GET)/gov/proposals/{proposalId}/proposer
(GET)/gov/proposals/{proposalId}/deposits
(GET)/gov/proposals/{proposalId}/deposits/{depositor}
(GET/POST)/gov/proposals/{proposalId}/votes
(GET)/gov/proposals/{proposalId}/votes/{voter}
(GET)/gov/proposals/{proposalId}/tally
(GET)/gov/parameters/deposit
(GET)/gov/parameters/tallying
(GET)/gov/parameters/voting
(POST)/gov/proposals/tax_rate_update
(POST)/gov/proposals/reward_weight_update
(POST)/gov/proposals/param_change
(POST)/gov/proposals/community_pool_spend
```

#### [\#233](https://github.com/terra-project/core/pull/233) Swap constant product
As proposed [here](https://agora.terra.money/uploads/short-url/92QHxFtEmWUEwf9kWTminuobwpM.pdf), apply constant product to swap feature.

##### Compute Pools
```
// Both LUNA and TERRA pools are using SDR units.
cp = basePool*basePool
terraPool = (basePool + terraDelta)
lunaPool = cp/terraPool
```

##### LUNA to TERRA swap
```
// offerAmt must be SDR units
newLunaPool = lunaPool + offerAmt
newTerraPool = cp / newLunaPool
returnAmt = newTerraPool - terraPool

// Swap return SDR Amt to TERRA
returnLunaAmt = market.swap(returnAmt, "LUNA")
```

##### TERRA to LUNA swap
```
// offerAmt must be SDR units
newTerraPool = terraPool + offerAmt
newLunaPool = cp / newTerraPool
returnAmt = newLunaPool - lunaPool

// Swap return SDR Amt to proper TERRA
returnTerraAmt = market.swap(returnAmt, "TERRA")
```

##### TERRA to TERRA swap

Apply only fixed tobin-tax without computing and changing pools


##### New EndPoints
```
/market/terra_pool_delta
```

#### [\#231](https://github.com/terra-project/core/pull/231) Bump SDK to v0.37.x
##### REST end points, which are changed
All REST responses now wrap the original resource/result. The response
will contain two fields: height and result.
```
/market/params => /market/parameters
/oracle/params => /oracle/parameters
/treasury/tax-rate => /treasury/tax_rate
/treasury/tax-rate/{epoch} => /treasury/tax_rate/{epoch}
/treasury/tax-cap => /treasury/tax_cap
/treasury/tax-cap/{denom} => /treasury/tax_cap/{denom}
/treasury/reward-weight => /treasury/reward_weight
/treasury/reward-weight/{epoch} => /treasury/reward_weight/{epoch}
/treasury/tax-proceeds => /treasury/tax_proceeds
/treasury/tax-proceeds/{epoch} => /treasury/tax_proceeds/{epoch}
/treasury/seigniorage-proceeds => /treasury/seigniorage_proceeds
/treasury/seigniorage-proceeds/{epoch} => /treasury/seigniorage_proceeds/{epoch}
/treasury/current-epoch => /treasury/current_epoch
/treasury/params => /treasury/parameters
```
##### REST end points, which response object key is removed
```
/treasury/current_epoch
/treasury/seigniorage_proceeds/{epoch}
/treasury/seigniorage_proceeds
/treasury/tax_proceeds/{epoch}
/treasury/tax_proceeds
/treasury/reward_weight/{epoch}
/treasury/reward_weight
/treasury/tax_cap/{denom}
/treasury/tax_rate/{epoch}
/treasury/tax_rate
/oracle/denoms/actives
/oracle/denoms/{denom}/price
/oracle/denoms/{denom}/prevotes/{voter}
/oracle/denoms/{denom}/prevotes
/oracle/denoms/{denom}/votes/{voter}
/oracle/denoms/{denom}/votes
```
##### New REST endpoints
```
/supply/total
/supply/total/{denomination}
/market/last_day_issuance
/oracle/voters/{%s}/voting_info
/oracle/voting_infos
/treasury/historical_issuance/{epoch}
```
##### Codec changes
```
auth/Account => core/Account
auth/StdTx => core/StdTx
pay/MsgSend => bank/MsgSend
pay/MsgMultiSend => bank/MsgMultiSend
```
##### Other Changes
* GradedVestingAccount is fully removed
* LazyGradedVestingAccount's vesting_lazy_schedules is changed to vesting_schedules
* Improve the UX of fee and tax. The sender have to specify fees containing tax amount with following methods.
1. Use `/bank/accounts/{address}/transfers` without fees. `terracli` will compute tax amount and fill fees field containing both gas & tax fee.
2. Use `/txs/estimate_fee` to estimate fees of StdTX, and replace StdTx.Fee.Amount to estimated fee
3. Compute tax with `/treasury/tax_rate` & `/treasury/tax_cap` add computed tax with original gas fee

## 0.2.4
### Bug fixes
#### [\#196](https://github.com/terra-project/core/pull/196) peek epoch seigniorage
Change PeekEpochSeigniorage to compute seigniorage by subtracting current issuance from previous issuance

#### [\#198](https://github.com/terra-project/core/pull/198) Use next block for treasury tax and reward update
updateTaxPolicy and updateRewardPolicy are updating new tax-rate and reward-weight with current ctx. The ctx height is the last block of current epoch, but treasury should update next epoch's tax-rate and reward-weight at the last block of current epoch.
In updateTaxPolicy and updateRewardPolicy, change ctx input of keeper setter to ctx with next epoch height.

### Features
#### [\#193](https://github.com/terra-project/core/pull/193) Recover old hd path
Added `--old-hd-path` option to `$terracli keys add` command for recovering old bip44 path(for atom)
##### Example
```
$ terracli keys add tmp --recover --old-hd-path
Enter a passphrase to encrypt your key to disk:
Repeat the passphrase:
> Enter your bip39 mnemonic
candy hint hamster cute inquiry bright industry decide assist wedding carpet fiber arm menu machine lottery type alert fan march argue adapt recycle stomach

NAME: TYPE: ADDRESS: PUBKEY:
tmp local terra1gaczd45crhwfa4x05k9747cuxwfmnduvmtyefs terrapub1addwnpepqv6tse2pyag9ts5vy6dk4h3qh7xc9qhat4jx449n6nrfve3jhzldz3f3l7p
```

## 0.2.3
- [\#187](https://github.com/terra-project/core/pull/187): Change all time instance timezone to UTC to remove gap in time calculation

Expand Down
Loading