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

chore: Update the default genesis params #285

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions x/auth/types/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

// Default parameter values
const (
DefaultMaxMemoCharacters uint64 = 256
DefaultMaxMemoCharacters uint64 = 128
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this cuts the max memo in half. The memo is now 1/4 the size of a single share, and costs 25% more per gas (10 gas/byte vs 8 gas/ blob byte)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can explore how the memo is currently used. And limit the number to the minimum necessary. also, In celestia people can exchange messages directly in the blobs instead of the memo field.

DefaultTxSigLimit uint64 = 7
DefaultTxSizeCostPerByte uint64 = 10
DefaultSigVerifyCostED25519 uint64 = 590
Expand Down Expand Up @@ -71,8 +71,10 @@ func DefaultParams() Params {

// SigVerifyCostSecp256r1 returns gas fee of secp256r1 signature verification.
// Set by benchmarking current implementation:
// BenchmarkSig/secp256k1 4334 277167 ns/op 4128 B/op 79 allocs/op
// BenchmarkSig/secp256r1 10000 108769 ns/op 1672 B/op 33 allocs/op
//
// BenchmarkSig/secp256k1 4334 277167 ns/op 4128 B/op 79 allocs/op
// BenchmarkSig/secp256r1 10000 108769 ns/op 1672 B/op 33 allocs/op
//
// Based on the results above secp256k1 is 2.7x is slwer. However we propose to discount it
// because we are we don't compare the cgo implementation of secp256k1, which is faster.
func (p Params) SigVerifyCostSecp256r1() uint64 {
Expand Down
2 changes: 1 addition & 1 deletion x/mint/types/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func DefaultParams() Params {
InflationMax: sdk.NewDecWithPrec(20, 2),
InflationMin: sdk.NewDecWithPrec(7, 2),
GoalBonded: sdk.NewDecWithPrec(67, 2),
BlocksPerYear: uint64(60 * 60 * 8766 / 5), // assuming 5 second block times
BlocksPerYear: uint64(60 * 60 * 8766 / 15), // assuming 15 second block times
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is this used by the Cosmos SDK? Got a link to docs maybe?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blocks per year is used to determine the rate of change for inflation (we currently have the max inflation rate change set to 0, so this value shouldn't be important unless we ever change it)

https://docs.cosmos.network/main/modules/mint

}
}

Expand Down
2 changes: 1 addition & 1 deletion x/slashing/types/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

// Default parameter namespace
const (
DefaultSignedBlocksWindow = int64(100)
DefaultSignedBlocksWindow = int64(5760) // 4 (blocks per min) * 60 (mins in hour) * 24 (hours in day) = 5760 blocks per day
DefaultDowntimeJailDuration = 60 * 10 * time.Second
)

Expand Down
4 changes: 2 additions & 2 deletions x/staking/types/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ const (
DefaultHistoricalEntries uint32 = 10000
)

// DefaultMinCommissionRate is set to 0%
var DefaultMinCommissionRate = sdk.ZeroDec()
// DefaultMinCommissionRate is set to .05
var DefaultMinCommissionRate = sdk.NewDecWithPrec(5, 2)

var (
KeyUnbondingTime = []byte("UnbondingTime")
Expand Down