Skip to content

Commit

Permalink
rebase develop
Browse files Browse the repository at this point in the history
  • Loading branch information
kingpinXD committed Jan 12, 2024
2 parents 62fd6ec + 329b96b commit 764f88d
Show file tree
Hide file tree
Showing 41 changed files with 995 additions and 254 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/sast-linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:

- name: Getting files updated in the PR
id: changed-files
uses: tj-actions/changed-files@v39
uses: tj-actions/changed-files@v41
with:
base_sha: ${{ github.event.pull_request.base.sha }}

Expand Down
8 changes: 8 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

### Fixes

* [1554](https://github.com/zeta-chain/node/pull/1554) - Screen out unconfirmed UTXOs that are not created by TSS itself
* [1560](https://github.com/zeta-chain/node/issues/1560) - Zetaclient post evm-chain outtx hashes only when receipt is available
* [1516](https://github.com/zeta-chain/node/issues/1516) - Unprivileged outtx tracker removal
* [1537](https://github.com/zeta-chain/node/issues/1537) - Sanity check events of ZetaSent/ZetaReceived/ZetaRevertedWithdrawn/Deposited
* [1530](https://github.com/zeta-chain/node/pull/1530) - Outbound tx confirmation/inclusion enhancement
Expand All @@ -37,10 +39,14 @@
* [1525](https://github.com/zeta-chain/node/pull/1525) - relax EVM chain block header length check 1024->4096
* [1522](https://github.com/zeta-chain/node/pull/1522/files) - block `distribution` module account from receiving zeta
* [1528](https://github.com/zeta-chain/node/pull/1528) - fix panic caused on decoding malformed BTC addresses
* [1536](https://github.com/zeta-chain/node/pull/1536) - add index to check previously finalized inbounds
* [1556](https://github.com/zeta-chain/node/pull/1556) - add emptiness check for topic array in event parsing
* [1555](https://github.com/zeta-chain/node/pull/1555) - Reduce websocket message limit to 10MB
* [1567](https://github.com/zeta-chain/node/pull/1567) - add bitcoin chain id to fetch the tss address rpc endpoint

### Refactoring

* [1552](https://github.com/zeta-chain/node/pull/1552) - requires group2 to enable header verification
* [1211](https://github.com/zeta-chain/node/issues/1211) - use `grpc` and `msg` for query and message files
* refactor cctx scheduler - decouple evm cctx scheduler from btc cctx scheduler
* move tss state from crosschain to observer
Expand All @@ -54,13 +60,15 @@
* Remove chain id from the index for observer mapper and rename it to observer set.
* Add logger to smoke tests
* [1521](https://github.com/zeta-chain/node/pull/1521) - replace go-tss lib version with one that reverts back to thorchain tss-lib
* [1558](https://github.com/zeta-chain/node/pull/1558) - change log level for gas stability pool iteration error
* Update --ledger flag hint

### Chores
* [1446](https://github.com/zeta-chain/node/pull/1446) - renamed file `zetaclientd/aux.go` to `zetaclientd/utils.go` to avoid complaints from go package resolver.
* [1499](https://github.com/zeta-chain/node/pull/1499) - Add scripts to localnet to help test gov proposals
* [1442](https://github.com/zeta-chain/node/pull/1442) - remove build types in `.goreleaser.yaml`
* [1504](https://github.com/zeta-chain/node/pull/1504) - remove `-race` in the `make install` commmand
* [1564](https://github.com/zeta-chain/node/pull/1564) - bump ti-actions/changed-files

### Tests

Expand Down
2 changes: 1 addition & 1 deletion common/bitcoin/proof.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func (m *Merkle) BuildMerkleProof(txIndex int) ([]byte, uint, error) {
path := make([]byte, 0)
var siblingIndexes uint

// Find intermediate nodes on the path to the root buttom-up.
// Find intermediate nodes on the path to the root bottom-up.
nodeIndex := txIndex
nodesOnLevel := N / 2
for nodesOnLevel > 1 {
Expand Down
2 changes: 1 addition & 1 deletion common/headers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ func unmarshalHeader(t *testing.T, headerBytes []byte) *wire.BlockHeader {
func validateTrueBitcoinHeader(t *testing.T, header *wire.BlockHeader, headerBytes []byte) {
blockHash := header.BlockHash()

// Ture Bitcoin header should pass validation
// True Bitcoin header should pass validation
err := common.ValidateBitcoinHeader(headerBytes, blockHash[:], 18332)
require.NoError(t, err)

Expand Down
15 changes: 15 additions & 0 deletions docs/openapi/openapi.swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50813,6 +50813,8 @@ definitions:
inbound_tx_finalized_zeta_height:
type: string
format: uint64
tx_finalization_status:
$ref: '#/definitions/crosschainTxFinalizationStatus'
crosschainLastBlockHeight:
type: object
properties:
Expand Down Expand Up @@ -50914,6 +50916,8 @@ definitions:
format: uint64
tss_pubkey:
type: string
tx_finalization_status:
$ref: '#/definitions/crosschainTxFinalizationStatus'
crosschainQueryAllCctxResponse:
type: object
properties:
Expand Down Expand Up @@ -51064,6 +51068,17 @@ definitions:
properties:
aborted_zeta_amount:
type: string
crosschainTxFinalizationStatus:
type: string
enum:
- NotFinalized
- Finalized
- Executed
default: NotFinalized
title: |-
- NotFinalized: the corresponding tx is not finalized
- Finalized: the corresponding tx is finalized but not executed yet
- Executed: the corresponding tx is executed
crosschainTxHashList:
type: object
properties:
Expand Down
16 changes: 8 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ require (
github.com/tendermint/tendermint v0.34.28
github.com/tendermint/tm-db v0.6.7
google.golang.org/genproto v0.0.0-20230526203410-71b5a4ffd15e // indirect
google.golang.org/grpc v1.55.0
google.golang.org/grpc v1.56.3
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c

)
Expand Down Expand Up @@ -113,7 +113,7 @@ require (

require (
cloud.google.com/go v0.110.0 // indirect
cloud.google.com/go/compute v1.19.0 // indirect
cloud.google.com/go/compute v1.19.1 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/iam v0.13.0 // indirect
cloud.google.com/go/storage v1.28.1 // indirect
Expand Down Expand Up @@ -158,7 +158,7 @@ require (
github.com/dlclark/regexp2 v1.7.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/dop251/goja v0.0.0-20230122112309-96b1610dd4f7 // indirect
github.com/dvsekhvalnov/jose2go v1.5.0 // indirect
github.com/dvsekhvalnov/jose2go v1.6.0 // indirect
github.com/edsrzf/mmap-go v1.0.0 // indirect
github.com/elastic/gosigar v0.14.2 // indirect
github.com/felixge/httpsnoop v1.0.2 // indirect
Expand Down Expand Up @@ -300,15 +300,15 @@ require (
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.24.0 // indirect
golang.org/x/crypto v0.10.0 // indirect
golang.org/x/crypto v0.17.0 // indirect
golang.org/x/exp v0.0.0-20230321023759-10a507213a29 // indirect
golang.org/x/mod v0.10.0 // indirect
golang.org/x/net v0.10.0
golang.org/x/net v0.17.0
golang.org/x/oauth2 v0.8.0 // indirect
golang.org/x/sync v0.2.0
golang.org/x/sys v0.9.0 // indirect
golang.org/x/term v0.9.0 // indirect
golang.org/x/text v0.10.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/term v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.9.1 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/api v0.114.0 // indirect
Expand Down
32 changes: 16 additions & 16 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ cloud.google.com/go/compute v1.12.1/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x
cloud.google.com/go/compute v1.13.0/go.mod h1:5aPTS0cUNMIc1CE546K+Th6weJUNQErARyZtRXDJ8GE=
cloud.google.com/go/compute v1.14.0/go.mod h1:YfLtxrj9sU4Yxv+sXzZkyPjEyPBZfXHUvjxega5vAdo=
cloud.google.com/go/compute v1.15.1/go.mod h1:bjjoF/NtFUrkD/urWfdHaKuOPDR5nWIs63rR+SXhcpA=
cloud.google.com/go/compute v1.19.0 h1:+9zda3WGgW1ZSTlVppLCYFIr48Pa35q1uG2N1itbCEQ=
cloud.google.com/go/compute v1.19.0/go.mod h1:rikpw2y+UMidAe9tISo04EHNOIf42RLYF/q8Bs93scU=
cloud.google.com/go/compute v1.19.1 h1:am86mquDUgjGNWxiGn+5PGLbmgiWXlE/yNWpIpNvuXY=
cloud.google.com/go/compute v1.19.1/go.mod h1:6ylj3a05WF8leseCdIf77NK0g1ey+nj5IKd5/kvShxE=
cloud.google.com/go/compute/metadata v0.1.0/go.mod h1:Z1VN+bulIf6bt4P/C37K4DyZYZEXYonfTBHHFPO/4UU=
cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k=
cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM=
Expand Down Expand Up @@ -1172,8 +1172,8 @@ github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:Htrtb
github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM=
github.com/dvsekhvalnov/jose2go v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQxaLAeM=
github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU=
github.com/dvsekhvalnov/jose2go v1.6.0 h1:Y9gnSnP4qEI0+/uQkHvFXeD2PLPJeXEL+ySMEA2EjTY=
github.com/dvsekhvalnov/jose2go v1.6.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU=
github.com/dvyukov/go-fuzz v0.0.0-20200318091601-be3528f3a813/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw=
github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU=
Expand Down Expand Up @@ -3233,8 +3233,8 @@ golang.org/x/crypto v0.0.0-20220826181053-bd7e27e6170d/go.mod h1:IxCIyHEi3zRg3s0
golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw=
golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU=
golang.org/x/crypto v0.10.0 h1:LKqV2xt9+kDzSTfOhx4FrkEBcMrAgHSYgzywV9zcGmM=
golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I=
golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k=
golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
Expand Down Expand Up @@ -3403,8 +3403,8 @@ golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws=
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/oauth2 v0.0.0-20180724155351-3d292e4d0cdc/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
Expand Down Expand Up @@ -3647,8 +3647,8 @@ golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s=
golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
Expand All @@ -3662,8 +3662,8 @@ golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA=
golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.9.0 h1:GRRCnKYhdQrD8kfRAdQ6Zcw1P0OcELxGLKJvtjVMZ28=
golang.org/x/term v0.9.0/go.mod h1:M6DEAAIenWoTxdKrOltXcmDY3rSplQUkrvaDU5FcQyo=
golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4=
golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0=
golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
Expand All @@ -3679,8 +3679,8 @@ golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.10.0 h1:UpjohKhiEgNc0CSauXmwYftY1+LlaC75SJwh0SgCX58=
golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
Expand Down Expand Up @@ -4139,8 +4139,8 @@ google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCD
google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww=
google.golang.org/grpc v1.52.0/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY=
google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw=
google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag=
google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8=
google.golang.org/grpc v1.56.3 h1:8I4C0Yq1EjstUzUJzpcRVbuYA2mODtEmpWiQoN/b2nc=
google.golang.org/grpc v1.56.3/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s=
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
Expand Down
8 changes: 8 additions & 0 deletions proto/crosschain/cross_chain_tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ enum CctxStatus {
Aborted = 6; // inbound tx error or invalid paramters and cannot revert; just abort
}

enum TxFinalizationStatus {
option (gogoproto.goproto_enum_stringer) = true;
NotFinalized = 0; // the corresponding tx is not finalized
Finalized = 1; // the corresponding tx is finalized but not executed yet
Executed = 2; // the corresponding tx is executed
}
message InboundTxParams {
string sender = 1; // this address is the immediate contract/EOA that calls the Connector.send()
int64 sender_chain_id = 2;
Expand All @@ -30,6 +36,7 @@ message InboundTxParams {
uint64 inbound_tx_observed_external_height = 8;
string inbound_tx_ballot_index = 9;
uint64 inbound_tx_finalized_zeta_height = 10;
TxFinalizationStatus tx_finalization_status = 11;
}

message ZetaAccounting {
Expand Down Expand Up @@ -63,6 +70,7 @@ message OutboundTxParams {
];
uint64 outbound_tx_effective_gas_limit = 22;
string tss_pubkey = 11;
TxFinalizationStatus tx_finalization_status = 12;
}

message Status {
Expand Down
1 change: 1 addition & 0 deletions proto/crosschain/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ message GenesisState {
repeated InTxHashToCctx inTxHashToCctxList = 9 [(gogoproto.nullable) = false];
repeated InTxTracker in_tx_tracker_list = 11 [(gogoproto.nullable) = false];
ZetaAccounting zeta_accounting = 12 [(gogoproto.nullable) = false];
repeated string FinalizedInbounds = 16;
}
2 changes: 1 addition & 1 deletion rpc/websockets.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ import (
)

const (
messageSizeLimit = 32 * 1024 * 1024 // 32MB
messageSizeLimit = 10 * 1024 * 1024 // 10MB

)

Expand Down
2 changes: 1 addition & 1 deletion standalone-network/change-observer-params.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
zetacored tx gov submit-proposal param-change proposal.json --from zeta --keyring-backend=test -b block --chain-id=localnet_101-1 --gas=auto --gas-prices=0.1azeta --gas-adjustment=1.5 --yes
zetacored tx gov submit-proposal proposal_feemarket.json --from zeta --keyring-backend=test -b block --chain-id=localnet_101-1 --gas=auto --gas-prices=0.1azeta --gas-adjustment=1.5 --yes
zetacored tx gov vote 1 yes --from zeta --keyring-backend test --chain-id localnet_101-1 --yes --gas=auto --gas-prices=0.1azeta --gas-adjustment=1.5
15 changes: 15 additions & 0 deletions standalone-network/proposal_feemarket.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"messages": [
{
"@type": "/ethermint.feemarket.v1.MsgUpdateParams",
"authority": "zeta10d07y265gmmuvt4z0w9aw880jnsr700jvxasvr",
"params": {
"base_fee": "7",
"min_gas_price" : "100000000000000",
"base_fee_change_denominator": "8"
}
}
],
"metadata" : "some metadata",
"deposit": "10000000azeta"
}
5 changes: 5 additions & 0 deletions testutil/sample/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,8 @@ func Proof() (txIndex int64, block *ethtypes.Block, header ethtypes.Header, head
tx = block.Transactions()[txIndex]
return
}

func EventIndex() uint64 {
r := newRandFromSeed(1)
return r.Uint64()
}
19 changes: 19 additions & 0 deletions testutil/sample/crosschain.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,22 @@ func ZetaAccounting(t *testing.T, index string) types.ZetaAccounting {
AbortedZetaAmount: math.NewUint(uint64(r.Int63())),
}
}

func InboundVote(coinType common.CoinType, from, to int64) types.MsgVoteOnObservedInboundTx {
return types.MsgVoteOnObservedInboundTx{
Creator: "",
Sender: EthAddress().String(),
SenderChainId: Chain(from).GetChainId(),
Receiver: EthAddress().String(),
ReceiverChain: Chain(to).GetChainId(),
Amount: UintInRange(10000000, 1000000000),
Message: String(),
InBlockHeight: Uint64InRange(1, 10000),
GasLimit: 1000000000,
InTxHash: Hash().String(),
CoinType: coinType,
TxOrigin: EthAddress().String(),
Asset: "",
EventIndex: EventIndex(),
}
}
12 changes: 6 additions & 6 deletions testutil/sample/observer.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@ func ChainParams(chainID int64) *types.ChainParams {
ChainId: chainID,
ConfirmationCount: r.Uint64(),

GasPriceTicker: Uint64InRange(r, 1, 300),
InTxTicker: Uint64InRange(r, 1, 300),
OutTxTicker: Uint64InRange(r, 1, 300),
WatchUtxoTicker: Uint64InRange(r, 1, 300),
GasPriceTicker: Uint64InRange(1, 300),
InTxTicker: Uint64InRange(1, 300),
OutTxTicker: Uint64InRange(1, 300),
WatchUtxoTicker: Uint64InRange(1, 300),
ZetaTokenContractAddress: EthAddress().String(),
ConnectorContractAddress: EthAddress().String(),
Erc20CustodyContractAddress: EthAddress().String(),
OutboundTxScheduleInterval: Int64InRange(r, 1, 100),
OutboundTxScheduleLookahead: Int64InRange(r, 1, 500),
OutboundTxScheduleInterval: Int64InRange(1, 100),
OutboundTxScheduleLookahead: Int64InRange(1, 500),
BallotThreshold: fiftyPercent,
MinObserverDelegation: sdk.NewDec(r.Int63()),
IsSupported: false,
Expand Down
12 changes: 10 additions & 2 deletions testutil/sample/sample.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"strconv"
"testing"

sdkmath "cosmossdk.io/math"
"github.com/zeta-chain/zetacore/cmd/zetacored/config"

"github.com/cosmos/cosmos-sdk/crypto/keys/ed25519"
Expand Down Expand Up @@ -131,11 +132,18 @@ func Coins() sdk.Coins {
}

// Uint64InRange returns a sample uint64 in the given ranges
func Uint64InRange(r *rand.Rand, low, high uint64) uint64 {
func Uint64InRange(low, high uint64) uint64 {
r := newRandFromSeed(int64(low))
return r.Uint64()%(high-low) + low
}

// Int64InRange returns a sample int64 in the given ranges
func Int64InRange(r *rand.Rand, low, high int64) int64 {
func Int64InRange(low, high int64) int64 {
r := newRandFromSeed(low)
return r.Int63()%(high-low) + low
}

func UintInRange(low, high uint64) sdkmath.Uint {
u := Uint64InRange(low, high)
return sdkmath.NewUint(u)
}
Loading

0 comments on commit 764f88d

Please sign in to comment.