Skip to content

Commit

Permalink
rebase develop
Browse files Browse the repository at this point in the history
  • Loading branch information
kingpinXD committed Jun 6, 2024
2 parents 42b5171 + 3f02526 commit 51c5624
Show file tree
Hide file tree
Showing 256 changed files with 9,997 additions and 469 deletions.
2 changes: 1 addition & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ func New(
app.MsgServiceRouter(),
app.AccountKeeper,
group.Config{
MaxExecutionPeriod: 2 * time.Hour, // Two hours.
MaxExecutionPeriod: 48 * time.Hour,
MaxMetadataLen: 255,
},
)
Expand Down
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
* [2275](https://github.com/zeta-chain/node/pull/2275) - add ChainInfo singleton state variable in authority
* [2291](https://github.com/zeta-chain/node/pull/2291) - initialize cctx gateway interface
* [2289](https://github.com/zeta-chain/node/pull/2289) - add an authorization list to keep track of all authorizations on the chain
* [2305](https://github.com/zeta-chain/node/pull/2305) - add new messages `MsgAddAuthorization` and `MsgRemoveAuthorization` that can be used to update the authorization list
* [2313](https://github.com/zeta-chain/node/pull/2313) - add `CheckAuthorization` function to replace the `IsAuthorized` function. The new function uses the authorization list to verify the signer's authorization.
* [2312](https://github.com/zeta-chain/node/pull/2312) - add queries `ShowAuthorization` and `ListAuthorizations`

### Refactor

Expand All @@ -39,6 +42,8 @@
* [2262](https://github.com/zeta-chain/node/pull/2262) - refactor MsgUpdateZRC20 into MsgPauseZrc20 and MsgUnPauseZRC20
* [2290](https://github.com/zeta-chain/node/pull/2290) - rename `MsgAddBlameVote` message to `MsgVoteBlame`
* [2269](https://github.com/zeta-chain/node/pull/2269) - refactor MsgUpdateCrosschainFlags into MsgEnableCCTX, MsgDisableCCTX and MsgUpdateGasPriceIncreaseFlags
* [2306](https://github.com/zeta-chain/node/pull/2306) - refactor zetaclient outbound transaction signing logic
* [2296](https://github.com/zeta-chain/node/pull/2296) - move `testdata` package to `testutil` to organize test-related utilities

### Tests

Expand All @@ -48,6 +53,7 @@
* [2199](https://github.com/zeta-chain/node/pull/2199) - custom priority mempool unit tests
* [2240](https://github.com/zeta-chain/node/pull/2240) - removed hard-coded Bitcoin regnet chainID in E2E withdraw tests
* [2266](https://github.com/zeta-chain/node/pull/2266) - try fixing E2E test `crosschain_swap` failure `btc transaction not signed`
* [2294](https://github.com/zeta-chain/node/pull/2294) - add and fix existing ethermint rpc unit test
* [2299](https://github.com/zeta-chain/node/pull/2299) - add `zetae2e` command to deploy test contracts

### Fixes
Expand Down
1 change: 0 additions & 1 deletion codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ ignore:
- "cmd/**/*"
- "contrib/**/*"
- "docs/**/*"
- "rpc/**/*"
- "proto/**/*"
- "scripts/**/*"
- "server/**/*"
Expand Down
2 changes: 1 addition & 1 deletion contrib/localnet/scripts/start-upgrade-orchestrator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ done

# copy zetacore0 config and keys if not running on zetacore0
if [[ $(hostname) != "zetacore0" ]]; then
scp -r zetacore0:"~/.zetacored/config ~/.zetacored/os_info ~/.zetacored/config ~/.zetacored/keyring-file ~/.zetacored/keyring-test" ~/.zetacored/
scp -r 'zetacore0:~/.zetacored/config' 'zetacore0:~/.zetacored/os_info' 'zetacore0:~/.zetacored/config' 'zetacore0:~/.zetacored/keyring-file' 'zetacore0:~/.zetacored/keyring-test' ~/.zetacored/
sed -i 's|tcp://localhost:26657|tcp://zetacore0:26657|g' ~/.zetacored/config/client.toml
fi

Expand Down
2 changes: 2 additions & 0 deletions docs/cli/zetacored/zetacored_query_authority.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ zetacored query authority [flags]
### SEE ALSO

* [zetacored query](zetacored_query.md) - Querying subcommands
* [zetacored query authority list-authorizations](zetacored_query_authority_list-authorizations.md) - lists all authorizations
* [zetacored query authority show-authorization](zetacored_query_authority_show-authorization.md) - shows the authorization for a given message URL
* [zetacored query authority show-chain-info](zetacored_query_authority_show-chain-info.md) - show the chain info
* [zetacored query authority show-policies](zetacored_query_authority_show-policies.md) - show the policies

Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# query authority list-authorizations

lists all authorizations

```
zetacored query authority list-authorizations [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 list-authorizations
--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 authority](zetacored_query_authority.md) - Querying commands for the authority module

34 changes: 34 additions & 0 deletions docs/cli/zetacored/zetacored_query_authority_show-authorization.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# query authority show-authorization

shows the authorization for a given message URL

```
zetacored query authority show-authorization [msg-url] [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 show-authorization
--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 authority](zetacored_query_authority.md) - Querying commands for the authority module

4 changes: 3 additions & 1 deletion docs/cli/zetacored/zetacored_tx_authority.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ zetacored tx authority [flags]
### SEE ALSO

* [zetacored tx](zetacored_tx.md) - Transactions subcommands
* [zetacored tx authority add-authorization](zetacored_tx_authority_add-authorization.md) - Add a new authorization or update the policy of an existing authorization. Policy type can be 0 for groupEmergency, 1 for groupOperational, 2 for groupAdmin.
* [zetacored tx authority remove-authorization](zetacored_tx_authority_remove-authorization.md) - removes an existing authorization
* [zetacored tx authority update-chain-info](zetacored_tx_authority_update-chain-info.md) - Update the chain info
* [zetacored tx authority update-policies](zetacored_tx_authority_update-policies.md) - Update the policies
* [zetacored tx authority update-policies](zetacored_tx_authority_update-policies.md) - Update policies to values provided in the JSON file.

53 changes: 53 additions & 0 deletions docs/cli/zetacored/zetacored_tx_authority_add-authorization.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# tx authority add-authorization

Add a new authorization or update the policy of an existing authorization. Policy type can be 0 for groupEmergency, 1 for groupOperational, 2 for groupAdmin.

```
zetacored tx authority add-authorization [msg-url] [authorized-policy] [flags]
```

### Options

```
-a, --account-number uint The account number of the signing account (offline mode only)
--aux Generate aux signer data instead of sending a tx
-b, --broadcast-mode string Transaction broadcasting mode (sync|async)
--chain-id string The network chain ID
--dry-run ignore the --gas flag and perform a simulation of a transaction, but don't broadcast it (when enabled, the local Keybase is not accessible)
--fee-granter string Fee granter grants fees for the transaction
--fee-payer string Fee payer pays fees for the transaction instead of deducting from the signer
--fees string Fees to pay along with transaction; eg: 10uatom
--from string Name or address of private key with which to sign
--gas string gas limit to set per-transaction; set to "auto" to calculate sufficient gas automatically. Note: "auto" option doesn't always report accurate results. Set a valid coin value to adjust the result. Can be used instead of "fees". (default 200000)
--gas-adjustment float adjustment factor to be multiplied against the estimate returned by the tx simulation; if the gas limit is set manually this flag is ignored (default 1)
--gas-prices string Gas prices in decimal format to determine the transaction fee (e.g. 0.1uatom)
--generate-only Build an unsigned transaction and write it to STDOUT (when enabled, the local Keybase only accessed when providing a key name)
-h, --help help for add-authorization
--keyring-backend string Select keyring's backend (os|file|kwallet|pass|test|memory)
--keyring-dir string The client Keyring directory; if omitted, the default 'home' directory will be used
--ledger Use a connected Ledger device
--node string [host]:[port] to tendermint rpc interface for this chain
--note string Note to add a description to the transaction (previously --memo)
--offline Offline mode (does not allow any online functionality)
-o, --output string Output format (text|json)
-s, --sequence uint The sequence number of the signing account (offline mode only)
--sign-mode string Choose sign mode (direct|amino-json|direct-aux), this is an advanced feature
--timeout-height uint Set a block timeout height to prevent the tx from being committed past a certain height
--tip string Tip is the amount that is going to be transferred to the fee payer on the target chain. This flag is only valid when used with --aux, and is ignored if the target chain didn't enable the TipDecorator
-y, --yes Skip tx broadcasting prompt confirmation
```

### Options inherited from parent commands

```
--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 tx authority](zetacored_tx_authority.md) - authority transactions subcommands

53 changes: 53 additions & 0 deletions docs/cli/zetacored/zetacored_tx_authority_remove-authorization.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# tx authority remove-authorization

removes an existing authorization

```
zetacored tx authority remove-authorization [msg-url] [flags]
```

### Options

```
-a, --account-number uint The account number of the signing account (offline mode only)
--aux Generate aux signer data instead of sending a tx
-b, --broadcast-mode string Transaction broadcasting mode (sync|async)
--chain-id string The network chain ID
--dry-run ignore the --gas flag and perform a simulation of a transaction, but don't broadcast it (when enabled, the local Keybase is not accessible)
--fee-granter string Fee granter grants fees for the transaction
--fee-payer string Fee payer pays fees for the transaction instead of deducting from the signer
--fees string Fees to pay along with transaction; eg: 10uatom
--from string Name or address of private key with which to sign
--gas string gas limit to set per-transaction; set to "auto" to calculate sufficient gas automatically. Note: "auto" option doesn't always report accurate results. Set a valid coin value to adjust the result. Can be used instead of "fees". (default 200000)
--gas-adjustment float adjustment factor to be multiplied against the estimate returned by the tx simulation; if the gas limit is set manually this flag is ignored (default 1)
--gas-prices string Gas prices in decimal format to determine the transaction fee (e.g. 0.1uatom)
--generate-only Build an unsigned transaction and write it to STDOUT (when enabled, the local Keybase only accessed when providing a key name)
-h, --help help for remove-authorization
--keyring-backend string Select keyring's backend (os|file|kwallet|pass|test|memory)
--keyring-dir string The client Keyring directory; if omitted, the default 'home' directory will be used
--ledger Use a connected Ledger device
--node string [host]:[port] to tendermint rpc interface for this chain
--note string Note to add a description to the transaction (previously --memo)
--offline Offline mode (does not allow any online functionality)
-o, --output string Output format (text|json)
-s, --sequence uint The sequence number of the signing account (offline mode only)
--sign-mode string Choose sign mode (direct|amino-json|direct-aux), this is an advanced feature
--timeout-height uint Set a block timeout height to prevent the tx from being committed past a certain height
--tip string Tip is the amount that is going to be transferred to the fee payer on the target chain. This flag is only valid when used with --aux, and is ignored if the target chain didn't enable the TipDecorator
-y, --yes Skip tx broadcasting prompt confirmation
```

### Options inherited from parent commands

```
--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 tx authority](zetacored_tx_authority.md) - authority transactions subcommands

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# tx authority update-policies

Update the policies
Update policies to values provided in the JSON file.

```
zetacored tx authority update-policies [policies-json-file] [flags]
Expand Down
82 changes: 82 additions & 0 deletions docs/openapi/openapi.swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28254,6 +28254,39 @@ paths:
type: boolean
tags:
- Query
/zeta-chain/authority/authorization/{msg_url}:
get:
operationId: Query_Authorization
responses:
"200":
description: A successful response.
schema:
$ref: '#/definitions/authorityQueryAuthorizationResponse'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: msg_url
in: path
required: true
type: string
tags:
- Query
/zeta-chain/authority/authorizations:
get:
operationId: Query_AuthorizationList
responses:
"200":
description: A successful response.
schema:
$ref: '#/definitions/authorityQueryAuthorizationListResponse'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
tags:
- Query
/zeta-chain/authority/chainInfo:
get:
summary: Queries ChainInfo
Expand Down Expand Up @@ -56718,6 +56751,27 @@ definitions:
format: int64
balance:
type: string
authorityAuthorization:
type: object
properties:
msg_url:
type: string
title: The URL of the message that needs to be authorized
authorized_policy:
$ref: '#/definitions/authorityPolicyType'
title: The policy that is authorized to access the message
title: |-
Authorization defines the authorization required to access use a message
which needs special permissions
authorityAuthorizationList:
type: object
properties:
authorizations:
type: array
items:
type: object
$ref: '#/definitions/authorityAuthorization'
title: AuthorizationList holds the list of authorizations on zetachain
authorityChainInfo:
type: object
properties:
Expand All @@ -56730,6 +56784,14 @@ definitions:
ChainInfo contains static information about the chains
This structure is used to dynamically update these info on a live network
before hardcoding the values in a upgrade
authorityMsgAddAuthorizationResponse:
type: object
description: MsgAddAuthorizationResponse defines the MsgAddAuthorizationResponse service.
authorityMsgRemoveAuthorizationResponse:
type: object
description: |-
MsgRemoveAuthorizationResponse defines the MsgRemoveAuthorizationResponse
service.
authorityMsgUpdateChainInfoResponse:
type: object
description: MsgUpdateChainInfoResponse defines the MsgUpdateChainInfoResponse service.
Expand Down Expand Up @@ -56758,14 +56820,34 @@ definitions:
- groupEmergency
- groupOperational
- groupAdmin
- groupEmpty
default: groupEmergency
description: |-
- groupEmergency: Used for emergency situations that require immediate action
- groupOperational: Used for operational tasks like changing
- groupAdmin: non-sensitive protocol parameters

Used for administrative tasks like changing sensitive
- groupEmpty: protocol parameters or moving funds

Used for empty policy, no action is allowed
title: PolicyType defines the type of policy
authorityQueryAuthorizationListResponse:
type: object
properties:
authorization_list:
$ref: '#/definitions/authorityAuthorizationList'
title: |-
QueryAuthorizationListResponse is the response type for the
Query/AuthorizationList RPC
authorityQueryAuthorizationResponse:
type: object
properties:
authorization:
$ref: '#/definitions/authorityAuthorization'
description: |-
QueryAuthorizationResponse is the response type for the Query/Authorization
RPC method.
authorityQueryGetChainInfoResponse:
type: object
properties:
Expand Down
Loading

0 comments on commit 51c5624

Please sign in to comment.