Skip to content

Commit e819fcd

Browse files
authored
Merge pull request #439 from tendermint/develop
Release liquidity v1.3.0 based sdk 0.43.0
2 parents 5ffc15d + 02644bb commit e819fcd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+1778
-601
lines changed

.github/workflows/test.yml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,41 @@ jobs:
9090
with:
9191
file: ./coverage.txt
9292

93-
test-simulation:
93+
test-sim-nondeterminism:
9494
runs-on: ubuntu-latest
9595
timeout-minutes: 15
9696
steps:
9797
- uses: actions/checkout@v2
9898
- uses: actions/[email protected]
9999
with:
100-
go-version: 1.15
100+
go-version: 1.16
101101
- name: Display go version
102102
run: go version
103103
- name: Testing simulation
104104
run: make test-sim-nondeterminism
105+
106+
test-sim-after-import:
107+
runs-on: ubuntu-latest
108+
timeout-minutes: 15
109+
steps:
110+
- uses: actions/checkout@v2
111+
- uses: actions/[email protected]
112+
with:
113+
go-version: 1.16
114+
- name: Display go version
115+
run: go version
116+
- name: Testing simulation
117+
run: make test-sim-after-import
118+
119+
test-sim-import-export:
120+
runs-on: ubuntu-latest
121+
timeout-minutes: 15
122+
steps:
123+
- uses: actions/checkout@v2
124+
- uses: actions/[email protected]
125+
with:
126+
go-version: 1.16
127+
- name: Display go version
128+
run: go version
129+
- name: Testing simulation
130+
run: make test-sim-import-export

CHANGELOG.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<!--
2+
Guiding Principles:
3+
4+
Changelogs are for humans, not machines.
5+
There should be an entry for every single version.
6+
The same types of changes should be grouped.
7+
Versions and sections should be linkable.
8+
The latest version comes first.
9+
The release date of each version is displayed.
10+
Mention whether you follow Semantic Versioning.
11+
12+
Usage:
13+
14+
Change log entries are to be added to the Unreleased section under the
15+
appropriate stanza (see below). Each entry should ideally include a tag and
16+
the Github issue reference in the following format:
17+
18+
* (<tag>) \#<issue-number> message
19+
20+
The issue numbers will later be link-ified during the release process so you do
21+
not have to worry about including a link manually, but you can if you wish.
22+
23+
Types of changes (Stanzas):
24+
25+
"Features" for new features.
26+
"Improvements" for changes in existing functionality.
27+
"Deprecated" for soon-to-be removed features.
28+
"Bug Fixes" for any bug fixes.
29+
"Client Breaking" for breaking Protobuf, gRPC and REST routes used by end-users.
30+
"CLI Breaking" for breaking CLI commands.
31+
"API Breaking" for breaking exported APIs used by developers building on SDK.
32+
"State Machine Breaking" for any changes that result in a different AppState given same genesisState and txList.
33+
Ref: https://keepachangelog.com/en/1.0.0/
34+
-->
35+
36+
# Changelog
37+
38+
## [Unreleased]
39+
40+
## [v1.3.0](https://github.com/tendermint/liquidity/releases/tag/v1.3.0) - 2021-08-31
41+
42+
### State Machine Breaking
43+
44+
* [\#433](https://github.com/tendermint/liquidity/pull/433) (sdk) Bump SDK version to [v0.43.0](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.43.0).
45+
46+
* [\#436](https://github.com/tendermint/liquidity/pull/436) Validation `MsgSwapWithinBatch` and `OfferCoinFee` ceiling
47+
* When calculating `OfferCoinFee`, the decimal points are rounded up.
48+
- before (v1.2.x): `MsgSwapWithinBatch.OfferCoinFee` should be `OfferCoin` * `params.SwapFeeRate/2` with Truncate or 0
49+
- after (v1.3.x): `MsgSwapWithinBatch.OfferCoinFee` should be `OfferCoin` * `params.SwapFeeRate/2` with Ceil
50+
* Fix reserveOfferCoinFee residual Issue due to decimal error
51+
52+
* [\#438](https://github.com/tendermint/liquidity/pull/438) Fix PoolBatch index, beginHeight issues and genesis logic
53+
* Remove `PoolBatchIndex`
54+
* Fix `PoolBatch.Index` duplicated bug
55+
* Fix `PoolBatch.BeginHeight` consistency issue on genesis init logic
56+
57+
## [v1.2.9](https://github.com/tendermint/liquidity/releases/tag/v1.2.9) - 2021-06-26
58+
* Liquidity module version 1 for Gravity-DEX
59+
* (sdk) Bump SDK version to [v0.42.9](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.42.9).

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,11 @@ test-sim-nondeterminism:
161161

162162
test-sim-import-export: runsim
163163
@echo "Running application import/export simulation. This may take several minutes..."
164-
@$(BINDIR)/runsim -Jobs=1 -SimAppPkg=$(SIMAPP) -ExitOnFail 50 5 TestAppImportExport
164+
@$(BINDIR)/runsim -Jobs=4 -SimAppPkg=$(SIMAPP) -ExitOnFail 10 5 TestAppImportExport
165165

166166
test-sim-after-import: runsim
167167
@echo "Running application simulation-after-import. This may take several minutes..."
168-
@$(BINDIR)/runsim -Jobs=4 -SimAppPkg=$(SIMAPP) -ExitOnFail 1 1 TestAppSimulationAfterImport
168+
@$(BINDIR)/runsim -Jobs=4 -SimAppPkg=$(SIMAPP) -ExitOnFail 10 5 TestAppSimulationAfterImport
169169

170170
.PHONY: \
171171
test-sim-nondeterminism \

README.md

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ For details, see the [Liquidity Module Light Paper](doc/LiquidityModuleLightPape
3535
Requirement | Notes
3636
----------- | -----------------
3737
Go version | Go1.15 or higher
38-
Cosmos SDK | v0.42.4 or higher
38+
Cosmos SDK | v0.43.0 or higher
3939

4040
### Get Liquidity Module source code
4141

@@ -133,59 +133,64 @@ Sample scripts are provided in [scripts](https://github.com/tendermint/liquidity
133133
# Build
134134
make install
135135

136+
# Set Binary name of the app
137+
# The basic simapp binary of the liquidity module is liquidityd, but set it differently depending on the situation such as gaiad.
138+
BINARY=liquidityd
139+
136140
# Initialize and add keys
137-
liquidityd init testing --chain-id testing
138-
liquidityd keys add validator --keyring-backend test
139-
liquidityd keys add user1 --keyring-backend test
141+
$BINARY init testing --chain-id testing
142+
$BINARY keys add validator --keyring-backend test
143+
$BINARY keys add user1 --keyring-backend test
140144

141145
# Add genesis accounts and provide coins to the accounts
142-
liquidityd add-genesis-account $(liquidityd keys show validator --keyring-backend test -a) 10000000000stake,10000000000uatom,500000000000uusd
143-
liquidityd add-genesis-account $(liquidityd keys show user1 --keyring-backend test -a) 10000000000stake,10000000000uatom,500000000000uusd
146+
$BINARY add-genesis-account $($BINARY keys show validator --keyring-backend test -a) 10000000000stake,10000000000uatom,500000000000uusd
147+
$BINARY add-genesis-account $($BINARY keys show user1 --keyring-backend test -a) 10000000000stake,10000000000uatom,500000000000uusd
144148

145149
# Create gentx and collect
146-
liquidityd gentx validator 1000000000stake --chain-id testing --keyring-backend test
147-
liquidityd collect-gentxs
150+
$BINARY gentx validator 1000000000stake --chain-id testing --keyring-backend test
151+
$BINARY collect-gentxs
148152

149153
# Start
150-
liquidityd start
154+
$BINARY start
151155
```
152156

153157
### 2.1 Broadcast transactions using CLI commands
154158

155159
```bash
156160
# An example of creating liquidity pool 1
157-
liquidityd tx liquidity create-pool 1 1000000000uatom,50000000000uusd --from user1 --keyring-backend test --chain-id testing -y
161+
$BINARY tx liquidity create-pool 1 1000000000uatom,50000000000uusd --from user1 --keyring-backend test --chain-id testing -b block -o json -y
158162

159163
# An example of creating liquidity pool 2
160-
liquidityd tx liquidity create-pool 1 10000000stake,10000000uusd --from validator --keyring-backend test --chain-id testing -y
164+
$BINARY tx liquidity create-pool 1 10000000stake,10000000uusd --from validator --keyring-backend test --chain-id testing -b block -o json -y
161165

162166
# An example of requesting swap
163-
liquidityd tx liquidity swap 1 1 50000000uusd uatom 0.019 0.003 --from validator --chain-id testing --keyring-backend test -y
167+
$BINARY tx liquidity swap 1 1 50000000uusd uatom 0.019 0.003 --from validator --chain-id testing --keyring-backend test -b block -o json -y
164168

165169
# An example of generating unsigned tx
166-
validator=$(liquidityd keys show validator --keyring-backend test -a)
167-
liquidityd tx liquidity swap 1 1 50000000uusd uatom 0.019 0.003 --from $validator --chain-id testing --generate-only > tx_swap.json
170+
validator=$($BINARY keys show validator --keyring-backend test -a)
171+
$BINARY tx liquidity swap 1 1 50000000uusd uatom 0.019 0.003 --from $validator --chain-id testing --generate-only &> tx_swap.json
168172
cat tx_swap.json
169173

170174
# Sign the unsigned tx
171-
liquidityd tx sign tx_swap.json --from validator --chain-id testing --keyring-backend test -y > tx_swap_signed.json
175+
$BINARY tx sign tx_swap.json --from validator --chain-id testing --keyring-backend test -y &> tx_swap_signed.json
172176
cat tx_swap_signed.json
173177

174178
# Encode the signed tx
175-
liquidityd tx encode tx_swap_signed.json
179+
$BINARY tx encode tx_swap_signed.json
180+
tx_bytes=$($BINARY tx encode tx_swap_signed.json)
176181
```
177182

178183
### 2.2 Broadcast transactions using REST APIs
179184

180185
For an example of broadcasting transactions using REST API (via gRPC-gateway), see Cosmos SDK [Migrating to New REST Endpoints](https://github.com/cosmos/cosmos-sdk/blob/master/docs/migrations/rest.md#migrating-to-new-rest-endpoints). Testing requires that the API server is enabled in `$HOME/.liquidityapp/config/app.toml`.
181186

182187
```bash
183-
curl --header "Content-Type: application/json" --request POST --data '{"tx_bytes":"Cp0BCpoBCigvdGVuZGVybWludC5saXF1aWRpdHkuTXNnU3dhcFdpdGhpbkJhdGNoEm4KLWNvc21vczE4cWM2ZGwwNDZ1a3V0MjN3NnF1dndmenBmeWhncDJmeHFkcXAwNhACGAEiEAoEdXVzZBIINTAwMDAwMDAqBXVhdG9tMg0KBHV1c2QSBTc1MDAwOhExOTAwMDAwMDAwMDAwMDAwMBJYClAKRgofL2Nvc21vcy5jcnlwdG8uc2VjcDI1NmsxLlB1YktleRIjCiEDsouFptHWGniIBzFrsE26PcfH950qjnf4RaEsd+g2fA0SBAoCCH8YAxIEEMCaDBpAOI3k8fay9TziZbl+eNCqmPEF7tWXua3ad0ldNR6XOgZjKRBP9sQSxCtaRFnqc6Avep9C4Rjt+CHDahRNpZ8u3A==","mode":1}' localhost:1317/cosmos/tx/v1beta1/txs
188+
curl --header "Content-Type: application/json" --request POST --data '{"tx_bytes":"'"$tx_bytes"'","mode":1}' localhost:1317/cosmos/tx/v1beta1/txs
184189
```
185190

186191
### 2.3 Export Genesis State
187192

188-
`$ liquidityd export`
193+
`$ $BINARY export`
189194

190195
### Export empty state case
191196

@@ -362,6 +367,7 @@ To learn more about the liquidity module, check out the following resources:
362367
- [Liquidity Module Lite Paper (English)](doc/LiquidityModuleLightPaper_EN.pdf)
363368
- [Liquidity Module Lite Paper (Korean)](doc/LiquidityModuleLightPaper_KO.pdf)
364369
- [Liquidity Module Lite Paper (Chinese)](doc/LiquidityModuleLightPaper_ZH.pdf)
370+
- [Liquidity Module Security Audit Report of Least Authority](doc/Least_Authority_Liquidity_Module_Security_Audit_Report.pdf)
365371
- [Proposal and milestone](https://github.com/b-harvest/Liquidity-Module-For-the-Hub)
366372
- [Swagger HTTP API doc](https://app.swaggerhub.com/apis-docs/bharvest/cosmos-sdk_liquidity_module_rest_and_g_rpc_gateway_docs)
367373
- [godoc](https://pkg.go.dev/github.com/tendermint/liquidity)

0 commit comments

Comments
 (0)