Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/zeta-chain/node into zet…
Browse files Browse the repository at this point in the history
…aclient-evm-index-by-nonce
  • Loading branch information
ws4charlie committed Sep 11, 2024
2 parents 19699f3 + 33b0e71 commit 243452b
Show file tree
Hide file tree
Showing 63 changed files with 2,368 additions and 1,549 deletions.
44 changes: 39 additions & 5 deletions app/encoding.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,51 @@
package app

import (
cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
"github.com/cosmos/cosmos-sdk/x/authz"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types"
distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types"
evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types"
slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
evmenc "github.com/zeta-chain/ethermint/encoding"
ethermint "github.com/zeta-chain/ethermint/types"
evmtypes "github.com/zeta-chain/ethermint/x/evm/types"

authoritytypes "github.com/zeta-chain/node/x/authority/types"
crosschaintypes "github.com/zeta-chain/node/x/crosschain/types"
emissionstypes "github.com/zeta-chain/node/x/emissions/types"
fungibletypes "github.com/zeta-chain/node/x/fungible/types"
lightclienttypes "github.com/zeta-chain/node/x/lightclient/types"
observertypes "github.com/zeta-chain/node/x/observer/types"
)

// MakeEncodingConfig creates an EncodingConfig for testing
func MakeEncodingConfig() ethermint.EncodingConfig {
//encodingConfig := params.MakeEncodingConfig()
encodingConfig := evmenc.MakeConfig(ModuleBasics)
//std.RegisterLegacyAminoCodec(encodingConfig.Amino)
//std.RegisterInterfaces(encodingConfig.InterfaceRegistry)
//ModuleBasics.RegisterLegacyAminoCodec(encodingConfig.Amino)
//ModuleBasics.RegisterInterfaces(encodingConfig.InterfaceRegistry)
registry := encodingConfig.InterfaceRegistry

cryptocodec.RegisterInterfaces(registry)
authtypes.RegisterInterfaces(registry)
authz.RegisterInterfaces(registry)
banktypes.RegisterInterfaces(registry)
stakingtypes.RegisterInterfaces(registry)
slashingtypes.RegisterInterfaces(registry)
upgradetypes.RegisterInterfaces(registry)
distrtypes.RegisterInterfaces(registry)
evidencetypes.RegisterInterfaces(registry)
crisistypes.RegisterInterfaces(registry)
evmtypes.RegisterInterfaces(registry)
ethermint.RegisterInterfaces(registry)
authoritytypes.RegisterInterfaces(registry)
crosschaintypes.RegisterInterfaces(registry)
emissionstypes.RegisterInterfaces(registry)
fungibletypes.RegisterInterfaces(registry)
observertypes.RegisterInterfaces(registry)
lightclienttypes.RegisterInterfaces(registry)

return encodingConfig
}
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
* [2615](https://github.com/zeta-chain/node/pull/2615) - Refactor cleanup of outbound trackers
* [2749](https://github.com/zeta-chain/node/pull/2749) - fix all lint errors from govet
* [2725](https://github.com/zeta-chain/node/pull/2725) - refactor SetCctxAndNonceToCctxAndInboundHashToCctx to receive tsspubkey as an argument
* [2802](https://github.com/zeta-chain/node/pull/2802) - set default liquidity cap for new ZRC20s
* [2826](https://github.com/zeta-chain/node/pull/2826) - remove unused code from emissions module and add new parameter for fixed block reward amount

### Tests

Expand All @@ -40,6 +42,8 @@
* [2672](https://github.com/zeta-chain/node/pull/2672) - check observer set for duplicates when adding a new observer or updating an existing one
* [2735](https://github.com/zeta-chain/node/pull/2735) - fix the outbound tracker blocking confirmation and outbound processing on EVM chains by locally index outbound txs in zetaclient
* [2787](https://github.com/zeta-chain/node/pull/2787) - ask for 3 accounts (signer, pda, system_program) on solana gateway deposit
* [2842](https://github.com/zeta-chain/node/pull/2842) - fix: move interval assignment out of cctx loop in EVM outbound tx scheduler
* [2853](https://github.com/zeta-chain/node/pull/2853) - calling precompile through sc with sc state update

## v19.0.0

Expand Down
35 changes: 0 additions & 35 deletions docs/cli/zetacored/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -3345,45 +3345,10 @@ zetacored query emissions [flags]
### SEE ALSO

* [zetacored query](#zetacored-query) - Querying subcommands
* [zetacored query emissions get-emmisons-factors](#zetacored-query-emissions-get-emmisons-factors) - Query GetEmmisonsFactors
* [zetacored query emissions list-pool-addresses](#zetacored-query-emissions-list-pool-addresses) - Query list-pool-addresses
* [zetacored query emissions params](#zetacored-query-emissions-params) - shows the parameters of the module
* [zetacored query emissions show-available-emissions](#zetacored-query-emissions-show-available-emissions) - Query show-available-emissions

## zetacored query emissions get-emmisons-factors

Query GetEmmisonsFactors

```
zetacored query emissions get-emmisons-factors [flags]
```

### Options

```
--grpc-addr string the gRPC endpoint to use for this chain
--grpc-insecure allow gRPC over insecure channels, if not TLS the server must use TLS
--height int Use a specific height to query state at (this can error if the node is pruning state)
-h, --help help for get-emmisons-factors
--node string [host]:[port] to Tendermint RPC interface for this chain
-o, --output string Output format (text|json)
```

### Options inherited from parent commands

```
--chain-id string The network chain ID
--home string directory for config and data
--log_format string The logging format (json|plain)
--log_level string The logging level (trace|debug|info|warn|error|fatal|panic)
--log_no_color Disable colored logs
--trace print out full stack trace on errors
```

### SEE ALSO

* [zetacored query emissions](#zetacored-query-emissions) - Querying commands for the emissions module

## zetacored query emissions list-pool-addresses

Query list-pool-addresses
Expand Down
46 changes: 11 additions & 35 deletions docs/openapi/openapi.swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29498,21 +29498,6 @@ paths:
$ref: '#/definitions/googlerpcStatus'
tags:
- Query
/zeta-chain/emissions/get_emissions_factors:
get:
summary: Queries a list of GetEmmisonsFactors items.
operationId: Query_GetEmissionsFactors
responses:
"200":
description: A successful response.
schema:
$ref: '#/definitions/emissionsQueryGetEmissionsFactorsResponse'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
tags:
- Query
/zeta-chain/emissions/list_addresses:
get:
summary: Queries a list of ListBalances items.
Expand Down Expand Up @@ -57609,15 +57594,6 @@ definitions:
type: object
emissionsMsgWithdrawEmissionResponse:
type: object
emissionsQueryGetEmissionsFactorsResponse:
type: object
properties:
reservesFactor:
type: string
bondFactor:
type: string
durationFactor:
type: string
emissionsQueryListPoolAddressesResponse:
type: object
properties:
Expand Down Expand Up @@ -58468,28 +58444,28 @@ definitions:
zetacoreemissionsParams:
type: object
properties:
max_bond_factor:
type: string
min_bond_factor:
type: string
avg_block_time:
type: string
target_bond_ratio:
type: string
validator_emission_percentage:
type: string
observer_emission_percentage:
type: string
tss_signer_emission_percentage:
type: string
duration_factor_constant:
type: string
observer_slash_amount:
type: string
ballot_maturity_blocks:
type: string
format: int64
description: Params defines the parameters for the module.
block_reward_amount:
type: string
title: |-
Params defines the parameters for the module.
Sample values:
ValidatorEmissionPercentage: "00.50",
ObserverEmissionPercentage: "00.25",
TssSignerEmissionPercentage: "00.25",
ObserverSlashAmount: 100000000000000000,
BallotMaturityBlocks: 100,
BlockRewardAmount: 9620949074074074074.074070733466756687,
ethermint.evm.v1.ChainConfig:
type: object
properties:
Expand Down
9 changes: 9 additions & 0 deletions docs/releases/v20_breaking_changes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

# V20 Breaking Changes

### Emissions factors deprecated

* `EmissionsFactors` have been deprecated and removed from the `emissions` module.
- This results in the removal of the query `/zeta-chain/emissions/get_emissions_factors`.
- The fixed block reward amount can now be queried via `/zeta-chain/emissions/params`. This is constant for every block and does not depend on any factors.

71 changes: 71 additions & 0 deletions e2e/contracts/teststaking/TestStaking.abi
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,19 @@
"stateMutability": "payable",
"type": "fallback"
},
{
"inputs": [],
"name": "counter",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "depositWZETA",
Expand Down Expand Up @@ -143,6 +156,64 @@
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "staker",
"type": "address"
},
{
"internalType": "string",
"name": "validator",
"type": "string"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "stakeAndRevert",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "staker",
"type": "address"
},
{
"internalType": "string",
"name": "validator",
"type": "string"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "stakeWithStateUpdate",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
Expand Down
Loading

0 comments on commit 243452b

Please sign in to comment.