Skip to content

Commit

Permalink
Merge pull request #56 from SAONetwork/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
mattkb committed May 31, 2023
2 parents 8db90e3 + 3a423e5 commit 6ded448
Show file tree
Hide file tree
Showing 115 changed files with 13,185 additions and 1,483 deletions.
51 changes: 36 additions & 15 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,46 @@
## [Unreleased]

### Features
- handle timeout order ([#37](https://github.com/SAONetwork/sao-consensus/issues/37))
- renew info ([#52](https://github.com/SAONetwork/sao-consensus/issues/52))
- pledge_debt, refactor node module funcs ([#51](https://github.com/SAONetwork/sao-consensus/issues/51))
- expired shard ([#49](https://github.com/SAONetwork/sao-consensus/issues/49))
- storage pledge baseline ([#48](https://github.com/SAONetwork/sao-consensus/issues/48))

### Bug Fixes
- eth address binding proof verify
- update timeout shards ([#40](https://github.com/SAONetwork/sao-consensus/issues/40))
- add ignore list in random sp for migration and resize ([#33](https://github.com/SAONetwork/sao-consensus/issues/33))
- fill migrate shard sp and size ([#32](https://github.com/SAONetwork/sao-consensus/issues/32))
- add worker migrate logic ([#30](https://github.com/SAONetwork/sao-consensus/issues/30))
- shard pledge reward debt ([#29](https://github.com/SAONetwork/sao-consensus/issues/29))
- use block height to calculate reward ([#27](https://github.com/SAONetwork/sao-consensus/issues/27))
- remove reset_store ([#25](https://github.com/SAONetwork/sao-consensus/issues/25))
- export/import issue ([#44](https://github.com/SAONetwork/sao-consensus/issues/44))

### Code Refactoring
- node info enhancement for UI display and tx address pool supporting ([#39](https://github.com/SAONetwork/sao-consensus/issues/39))
- metadata ([#38](https://github.com/SAONetwork/sao-consensus/issues/38))
- remove order instead of set cancel/terminate status ([#36](https://github.com/SAONetwork/sao-consensus/issues/36))
- data management ([#35](https://github.com/SAONetwork/sao-consensus/issues/35))
- uniform order status ([#31](https://github.com/SAONetwork/sao-consensus/issues/31))
- pool_management ([#28](https://github.com/SAONetwork/sao-consensus/issues/28))
- shard record storage duration ([#46](https://github.com/SAONetwork/sao-consensus/issues/46))
- renew


<a name="v0.1.4"></a>
## [v0.1.4](https://github.com/SAONetwork/sao-consensus/compare/v0.1.3...v0.1.4) (2023-04-20)

### Features

* migration for v0.1.4 ([#41](https://github.com/SAONetwork/sao-consensus/issues/41)) *#0* *#1* *#4* *#41* *#014*
* handle timeout order ([#37](https://github.com/SAONetwork/sao-consensus/issues/37)) *#37*

### Bug Fixes

* eth address binding proof verify ([#42](https://github.com/SAONetwork/sao-consensus/issues/42)) *#42*
* update timeout shards ([#40](https://github.com/SAONetwork/sao-consensus/issues/40)) *#40*
* add ignore list in random sp for migration and resize ([#33](https://github.com/SAONetwork/sao-consensus/issues/33)) *#33*
* fill migrate shard sp and size ([#32](https://github.com/SAONetwork/sao-consensus/issues/32)) *#32*
* add worker migrate logic ([#30](https://github.com/SAONetwork/sao-consensus/issues/30)) *#30*
* shard pledge reward debt ([#29](https://github.com/SAONetwork/sao-consensus/issues/29)) *#29*
* use block height to calculate reward ([#27](https://github.com/SAONetwork/sao-consensus/issues/27)) *#27*
* remove reset_store ([#25](https://github.com/SAONetwork/sao-consensus/issues/25)) *#25*

### Code Refactoring

* node info enhancement for UI display and tx address pool supporting ([#39](https://github.com/SAONetwork/sao-consensus/issues/39)) *#39*
* metadata ([#38](https://github.com/SAONetwork/sao-consensus/issues/38)) *#38*
* remove order instead of set cancel/terminate status ([#36](https://github.com/SAONetwork/sao-consensus/issues/36)) *#36*
* data management ([#35](https://github.com/SAONetwork/sao-consensus/issues/35)) *#35*
* uniform order status ([#31](https://github.com/SAONetwork/sao-consensus/issues/31)) *#31*
* pool_management ([#28](https://github.com/SAONetwork/sao-consensus/issues/28)) *#28*


<a name="v0.1.3"></a>
Expand Down
7 changes: 7 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package app

import (
"fmt"
v015 "github.com/SaoNetwork/sao/app/upgrades/v0_1_5"
"io"
"net/http"
"os"
Expand Down Expand Up @@ -598,6 +599,7 @@ func New(
app.StakingKeeper,
appCodec,
keys[saomoduletypes.StoreKey],
keys[ordermoduletypes.StoreKey],
keys[saomoduletypes.MemStoreKey],
app.GetSubspace(saomoduletypes.ModuleName),
)
Expand Down Expand Up @@ -836,6 +838,11 @@ func (app *App) setupUpgradeHandlers() {
v014.CreateUpgradeHandler(app.mm, app.configurator, app.NodeKeeper),
)

app.UpgradeKeeper.SetUpgradeHandler(
v015.UpgradeName,
v015.CreateUpgradeHandler(app.mm, app.configurator, app.NodeKeeper),
)

upgradeInfo, err := app.UpgradeKeeper.ReadUpgradeInfoFromDisk()
if err != nil {
panic(fmt.Errorf("failed to read upgrade info from disk: %w", err))
Expand Down
6 changes: 6 additions & 0 deletions app/upgrades/v0_1_5/constants.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package v015

const (
UpgradeName = "v0.1.5"
UpgradeInfo = `'upgrade to v0.1.5'`
)
21 changes: 21 additions & 0 deletions app/upgrades/v0_1_5/upgrades.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package v015

import (
nodekeeper "github.com/SaoNetwork/sao/x/node/keeper"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
)

func CreateUpgradeHandler(
mm *module.Manager,
configurator module.Configurator,
node nodekeeper.Keeper,
) upgradetypes.UpgradeHandler {
return func(ctx sdk.Context, _ upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) {
logger := ctx.Logger().With("upgrade", UpgradeName)

logger.Debug("running module migrations ...")
return mm.RunMigrations(ctx, configurator, vm)
}
}
7 changes: 6 additions & 1 deletion config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,12 @@ genesis:
node:
params:
block_reward:
amount: "10000000"
amount: "6250000"
denom: "sao"
baseline:
amount: "100000000000"
denom: "sao"
annual_percentage_yield : "1"
staking:
params:
bond_denom: "sao"
Expand All @@ -52,6 +56,7 @@ genesis:
inflation_min: "0"
inflation_rate_change: "0"
mint_denom: "sao"
blocks_per_year: "16000000"
validators:
- name: alice
bonded: 100000000sao
Loading

0 comments on commit 6ded448

Please sign in to comment.