A Framework for Building High Value Public Blockchains
APACHE-2.0 License
Bot releases are hidden (Show)
Published by alexanderbez over 4 years ago
x/distribution
genesis stateparams
instead of individual parameters.x/genaccounts
module has beenlegacy/
package. This requires changes to theaccounts
now exist under app_state.auth.accounts
. The corresponding migration$ {appd} migrate v0.38 genesis.json
.ABCIEvidenceTypeDuplicateVote
BeginBlock
along with the corresponding parameters (MaxEvidenceAge
) have moved from thex/slashing
module to the x/evidence
module.x/distribution
parameters. Instead, follow the module spec in getting parameters, setting new value(s) and finally calling SetParams
.(Must)Bech32ify*
and (Must)Get*KeyBech32
functions in favor of (Must)Bech32ifyPubKey
and (Must)GetPubKeyFromBech32
respectively, both of which take a Bech32PubKeyType
(string).DecCoins#Add
parameter changed from DecCoins
...DecCoin
, Coins#Add
parameter changed from Coins
to ...Coin
.Error
interface (types/errors.go
)types/errors/
which implements the standard error
interface.
Handler
and Querier
implementations now return a standard error
.BaseApp
, runTx
now returns a (GasInfo, *Result, error)
tuple and runMsgs
returns a(*Result, error)
tuple. A reference to a Result
is now used to indicate success whereas an errorCode
, Codespace
,GasWanted
, and GasUsed
have been removed the Result
type. The latter two fields are now foundGasInfo
type which is always returned regardless of execution outcome.error
, the types/errors/
sdkerrors.Wrap(sdkerrors.ErrUnknownRequest, "...")
. You can retrieveABCIInfo
.CommitMultiStore
interfaceSetInterBlockCache
method. Applications that do not wish to support this can simplyx/gov
module structure and dev-UX:
x/genaccounts
module has been deprecated and all components removed except the legacy/
package.x/auth
module and now live under x/auth/vesting
. Applications wishing to use vesting account types must be sure to register types via RegisterCodec
under the new vesting package.NewBaseVestingAccount
constructor returns an errorAnteHandler
via composable decorators:
AnteHandler
interface now returns (newCtx Context, err error)
instead of (newCtx Context, result sdk.Result, abort bool)
NewAnteHandler
function returns an AnteHandler
function that returns the new AnteHandler
auth/ante
directory.ValidateSigCount
, ValidateMemo
, ProcessPubKey
, EnsureSufficientMempoolFee
, and GetSignBytes
InvalidPubKey
instead of Unauthorized
error, since the transactionSetPubKeyDecorator
before the SigVerificationDecorator
runs.StdTx#GetSignatures
will return an array of just signature byte slices [][]byte
instead ofStdSignature
structs. To replicate the old behavior, use the public fieldStdTx.Signatures
to get back the array of StdSignatures []StdSignature
.HandleDoubleSign
along with params MaxEvidenceAge
and DoubleSignJailEndTime
have moved from the x/slashing
module to the x/evidence
module.NewKeyBaseFromDir
and NewInMemory
now accept optional parameters of type KeybaseOption
. TheseNewKeyBaseFromHomeFlag
constructor has been removed.keybase
WithKeygenFunc
function added as a KeybaseOption
which allows a custom bytes to keyWithDeriveFunc
function added as a KeybaseOption
allows custom logic for deriving a keykeybase.CreateAccount()
. It is however the default when usingclient/keys
add command.SupportedAlgos
and SupportedAlgosLedger
functions return a slice of SigningAlgo
s that arehelpers.GenTx()
now accepts a gas argument.sdk.Context
is now passed into the router.Route()
function.AnteHandler
hasAnteHandler
support. Increase GasLimit accordingly.MsgEditValidator
uses description
instead of Description
as a JSON key.keys migrate
command for more info.decode-tx
command from x/auth/client/cli, duplicate of the decode
command.x/evidence
module.q gov proposals
command now supports pagination.rootmulti.Store.LoadLatestVersionAndUpgrade
method inBaseapp
supports StoreLoader
to enable various upgrade strategies. It noTxResponse
with a corresponding codeCodeTxInMempoolCache
CodeMempoolIsFull
CodeTxTooLarge
go-keychain
library. If10.2
. You cansudo rm -rf /Library/Developer/CommandLineTools; xcode-select --install
. Verify thepkgutil --pkg-info=com.apple.pkg.CLTools_Executables
.--keyring-backend
option through which users can specify which backend should be usedos
: use OS default credentials storage (default).file
: use encrypted file-based store.kwallet
: use KDE Wallet service.pass
: use the pass command line password manager.test
: use password-less key store. For testing purposes only. Use it at your own risk.
keys migrate
command to assist users migrate their keyskeys list
now accepts a --list-names
option to list key names only, whilst the keys delete
appcli keys list -n | xargs appcli keys delete
PeriodicVestingAccount
vesting account typerunTxModeReCheck
to allow applications to skip expensive and unnecessary re-checking of transactions.IsRecheckTx() bool
and WithIsReCheckTx(bool) Context
methods to to be used in the AnteHandler
.ctx.IsReCheckTx() == true
AnteHandler
via composable decorators:
AnteDecorator
interface has been introduced to allow users to implement modular AnteHandler
AnteHandler
rather than implementingAnteHandler
completely from scratch, where each AnteDecorator
allows for custom behavior inAnteDecorator
can then be chained togetherAnteDecorator
or third-party AnteDecorator
to create a modularized AnteHandler
AnteDecorator
in the order specified in ChainAnteDecorators
. For detailsChainAnteDecorators
function has been introduced to take in a list of AnteDecorators
and chainAnteHandler
:
SetUpContextDecorator
: Sets GasMeter
in context and creates defer clause to recover from anyOutOfGas
panics in future AnteDecorators and return OutOfGas
error to BaseApp
. It MUST be theAnteDecorator
in the chain for any application that uses gas (or another one that sets the gas meter).ValidateBasicDecorator
: Calls tx.ValidateBasic and returns any non-nil error.ValidateMemoDecorator
: Validates tx memo with application parameters and returns any non-nil error.ConsumeGasTxSizeDecorator
: Consumes gas proportional to the tx size based on application parameters.MempoolFeeDecorator
: Checks if fee is above local mempool minFee
parameter during CheckTx
.DeductFeeDecorator
: Deducts the FeeAmount
from first signer of the transaction.SetPubKeyDecorator
: Sets pubkey of account in any account that does not already have pubkey saved in state machine.SigGasConsumeDecorator
: Consume parameter-defined amount of gas for each signature.SigVerificationDecorator
: Verify each signature is valid, return if there is an error.ValidateSigCountDecorator
: Validate the number of signatures in tx based on app-parameters.IncrementSequenceDecorator
: Increments the account sequence for each signer to prevent replay attacks.HistoricalEntries
which allows applications to determine how many recent historical info entries they want to persist in store. Default value is 0.keys add
cli command.--algo
and --hd-path
are added tokeys add
command in order to make use of keybase modularized. By default, it uses (0, 0) bip44ApproxRoot
function to sdk.Decimal type in order to get the nth root for a decimal number, where n is a positive integer.
ApproxSqrt
function was also added for convenience around the common case of n=2.--pruning
flagCLIContext
now supports multiple verifiersCLIContext
will have to have the correctCLIContext
with a verifier for another chain:
// main or parent chain (chain as if you're running without IBC)
mainCtx := context.NewCLIContext()
// connecting IBC chain
sideCtx := context.NewCLIContext().
WithChainID(sideChainID).
WithNodeURI(sideChainNodeURI) // or .WithClient(...)
sideCtx = sideCtx.WithVerifier(
context.CreateVerifier(sideCtx, context.DefaultVerifierCacheSize),
)
x/auth
package now supportsGenesisAccount
interface.x/auth
to match module spec.DiffKVStores
to return an array of KVPairs
that are then compared to check for inconsistencies.x/slashing
to match the new module specx/genaccounts
to match module specPrintAllInvariants
flag will print all failed invariantsInitialBlockHeight
flag to resume a simulation from a given block
SimApp
and simulation refactors:
SimulationManager
for executing modules' simulation functionalities in a modularized wayRegisterStoreDecoders
to the SimulationManager
for decoding each module's typesGenerateGenesisStates
to the SimulationManager
to generate a randomized GenState
for each moduleRandomizedParams
to the SimulationManager
that registers each modules' parameters in order toParamChangeProposal
s' Content
sWeightedOperations
to the SimulationManager
that define simulation operations (modules' Msg
s) with theirProposalContents
to the SimulationManager
to register each module's governance proposal Content
s.SimApp
keepers to be public and add getter functions for keys and codecConfig
struct that wraps simulation flagsABCI
application without bypassing BaseApp
semanticsApp
interface for general SDK-based app's methods.CommitKVStoreCacheManager
. Any application wishing to utilize an inter-block cacheBaseApp
option. The BaseApp
docs have been drastically improvedbaseapp
, server
, store
s, context
and more.keeper
, handler
, messages
, queries
,...).Mod
(modulo) method and RelativePow
(exponentation) function for Uint
.x/distribution
s use of parameters. ThereParams
type with a getter and setter along with a getter for each individual parameter.x/distribution
endpoints to properly return height in the response.DefaultGenesis
returns valid and non-nil default genesis state.--min-self-delegation
for staking EditValidator
/gov/proposals
handler.Published by alexanderbez almost 5 years ago
SortableDecBytes
whichDec
type to be sortable.q txs
command in favor of the new events system. Functionality remains unchanged except that =
is used instead of :
to be consistent with the API's use of event queries.Published by alexanderbez about 5 years ago
Note:
Published by alexanderbez about 5 years ago
Note: Requies Go 1.13+
--cpu-profile
flag.halt-time
config and CLI option to the start
command. When provided, an application will halt during Commit
when the block time is >= the halt-time
.Events
to the ABCIMessageLog
to provide context and grouping of events based on the messages they correspond to. The Events
field in TxResponse
is deprecated and will be removed in the next major release.Signal(os.Interrupt)
over os.Exit(0)
during configured halting to allow any defer
calls to be executed.Published by alexanderbez about 5 years ago
CLIContext
to BaseApp
as the heighthandleQueryStore
to resemble handleQueryCustom
q gov vote
/auth/accounts/{address}
return a 200 with an empty account upon error whenPublished by alexanderbez about 5 years ago
⚠️ NOTE: It is not recommended to use this version due to a bug in sending funds to module accounts. For more information, see here. Please use v0.37.0 which includes the fix plus any non-breaking changes intended for v0.36.1.
proposal_content
to content
proposal_id
to id
ProposalTypeSoftwareUpgrade
temporarilyx/distribution
ModuleName
distribution
instead of distr
ModuleAccount
type, which tracks the flow of coins held within a moduleFeeCollectorKeeper
for a ModuleAccount
Pool
, which coins are now held by the BondedPool
and NotBonded
module accountsNotBonded
module account now only keeps track of the not bonded tokens within staking, instead of the whole chainModuleAccount
ModuleAccount
for the distribution moduleModuleAccount
for the mint moduleValidatorPowerRank
uses potential consensus power instead of tendermint powerGenerateOrBroadcastMsgs
no longer takes an offline
parameter.x/{module}/tags/tags.go
=> x/{module}/types/events.go
docs/specs
Event(s)
type(s)Context
to use new EventManager
EventManager
EventManager
ctx.EventManger().EmitEvent(s)
.ctx = ctx.WithEventManager(sdk.NewEventManager())
events := ctx.EventManager().Events()
[]byte
instead of string
.x/auth
module./auth/accounts/{address}
now returns a height
in the response.account
.DefaultSigVerificationGasConsumer
) now specifies explicit key types rather than string pattern matching. This means that zones that depended on string matching to allow other keys will need to write a custom SignatureVerificationGasConsumer
function.InputOutputCoins
, SetCoins
, SubtractCoins
and AddCoins
are now part of the SendKeeper
instead of the Keeper
interfacerewards
and commission
to distribution tx tags.halt-height
config or CLI value.--read-timeout
and --write-timeout
args to the rest-server
commandmigrate
command currently supports migrating from v0.34 to v0.36 by implementing(simulation) PrintAllInvariants flag will print all failed invariants
(simulation) Add InitialBlockHeight
flag to resume a simulation from a given block
(simulation) #4670 Update simulation statistics to JSON format
#4775 Refactor CI config
Upgrade IAVL to v0.12.4
(tendermint) Upgrade Tendermint to v0.32.2
(modules) #4751 update x/genutils
to match module spec
(keys) #4611 store keys in simapp now use a map instead of using individual literal keys
#2286 Improve performance of CacheKVStore iterator.
#3512 Implement Logger method on each module's keeper.
#3655 Improve signature verification failure error message.
#3774 add category tag to transactions for ease of filtering
#3914 Implement invariant benchmarks and add target to makefile.
#3928 remove staking references from types package
#3978 Return ErrUnknownRequest in message handlers for unknown
or invalid routed messages.
#4190 Client responses that return (re)delegation(s) now return balances
instead of shares.
#4194 ValidatorSigningInfo now includes the validator's consensus address.
#4235 Add parameter change proposal messages to simulation.
#4235 Update the minting module params to implement params.ParamSet so
individual keys can be set via proposals instead of passing a struct.
#4259 Coins
that are nil
are now JSON encoded as an empty array []
.
Decoding remains unchanged and behavior is left intact.
#4305 The --generate-only
CLI flag fully respects offline tx processing.
#4379 close db write batch.
#4384- Allow splitting withdrawal transaction in several chunks
#4403 Allow for parameter change proposals to supply only desired fields to be updated
in objects instead of the entire object (only applies to values that are objects).
#4415 /client refactor, reduce genutil dependancy on staking
#4439 Implement governance module iterators.
#4465 Unknown subcommands print relevant error message
#4466 Commission validation added to validate basic of MsgCreateValidator by changing CommissionMsg to CommissionRates
#4501 Support height queriers in rest client
#4535 Improve import-export simulation errors by decoding the KVPair.Value
into its
respective type
#4536 cli context queries return query height and accounts are returned with query height
#4553 undelegate max entries check first
#4556 Added IsValid function to Coin
#4564 client/input.GetConfirmation()'s default is changed to No.
#4573 Returns height in response for query endpoints.
#4580 Update Context#BlockHeight
to properly set the block height via WithBlockHeader
.
#4584 Update bank Keeper to use expected keeper interface of the AccountKeeper.
#4584 Move Account
and VestingAccount
interface types to x/auth/exported
.
#4082 supply module queriers for CLI and REST endpoints
#4601 Implement generic pangination helper function to be used in
REST handlers and queriers.
#4629 Added warning event that gets emitted if validator misses a block.
#4674 Export Simapp
genState generators and util functions by making them public
#4706 Simplify context
Replace complex Context construct with a simpler immutible struct.
Only breaking change is not to support Value
and GetValue
as first class calls.
We do embed ctx.Context() as a raw context.Context instead to be used as you see fit.
Migration guide:
ctx = ctx.WithValue(contextKeyBadProposal, false)
->
ctx = ctx.WithContext(context.WithValue(ctx.Context(), contextKeyBadProposal, false))
A bit more verbose, but also allows context.WithTimeout()
, etc and only used
in one function in this repo, in test code.
#3685 Add SetAddressVerifier
and GetAddressVerifier
to sdk.Config
to allow SDK users to configure custom address format verification logic (to override the default limitation of 20-byte addresses).
#3685 Add an additional parameter to NewAnteHandler for a custom SignatureVerificationGasConsumer
(the default logic is now in `DefaultSigVerificationGasConsumer). This allows SDK users to configure their own logic for which key types are accepted and how those key types consume gas.
Remove --print-response
flag as it is no longer used.
Revert #2284 to allow create_empty_blocks in the config
(tendermint) #4718 Upgrade tendermint/iavl to v0.12.3
block
broadcasting mode.Store#DeleteVersion
.withdraw-all-rewards
command when --generate-only
is suppliedDefaultUnbondingTime
from 3 days to 3 weeks to be inline with documentation.CheckTx
by verifying the message route[]
instead of null
when querying delegator rewards.tx send --generate-only
toQueryWithData()
to query unbonding delegations.GetAllMatureValidatorQueue
and UnbondAllMatureValidatorQueue
MintCoins
and BurnCoins
Published by alexanderbez over 5 years ago
x/staking
module security advisory for downstream consumers of thePublished by alexanderbez over 5 years ago
Undelegate
preventing the ability to sync fromPublished by jackzampolin over 5 years ago
UndelegatePatchHeight
, currently set to block 482100. To apply this behaviour at a different height, change the value of UndelegatePatchHeight
.Published by jackzampolin over 5 years ago
Published by jackzampolin over 5 years ago
tx send --generate-only
torewards
and commission
to distribution tx tags.Published by jackzampolin over 5 years ago
#4196 Set default invariant check period to zero.
Published by jackzampolin over 5 years ago
async
flag with --broadcast-mode
flag where the defaultsync
. The block
mode should not be used. The REST client nowmode
parameter instead of the return
parameter.gaiad --assert-invariants-blockly
gaiad
and gaiacli
integration tests use ./build/ binaries.~/.gaiad/simulations/
--SimulationLean
flag)gaiacli tx sign
command
gaiacli keys [add|show|list]
gaiacli keys ...
docs/spec/mint/01_concepts.md
)baseapp
safety improvements--generate-only
is provided, the Keybase is not used and as a result--from
value must be a valid Bech32 cosmos address.WithdrawValidatorCommission
to properly set the validator's remaining commission.calculateDelegationRewards