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

refactor: consolidate inbound and outbound naming #2118

Merged
merged 76 commits into from
May 20, 2024

Conversation

lumtis
Copy link
Member

@lumtis lumtis commented May 6, 2024

Description

Use inbound naming to refers to cctx coming to ZetaChain and outbound for cctx to external chain.

  • inTx, receive, inboundTx -> inbound
  • outTx, send, outboundTx -> outbound

Do also some naming simplification for some messages and query

  • VoteOnObserverInboundTx -> VoteInbound
  • VoteOnObserverOutboundTx -> VoteOutbound
  • AddToOutTxTracker -> AddOutboundTracker
  • AddToInTxTracker -> AddInboundTracker
  • RemoveFromOutTxTracker -> RemoveOutboundTracker

Move the breaking changes note to a specific file: https://github.com/zeta-chain/node/blob/refactor/rename-outbound-inbound/docs/releases/v17_breaking_changes.md#intx-and-outtx-renaming

The PR also introduces observer migration guide for v17: https://github.com/zeta-chain/node/blob/refactor/rename-outbound-inbound/docs/releases/v17_observer_migration.md

Successful upgrade test: https://github.com/zeta-chain/node/actions/runs/9112437066

Closes: #2011 #1797 #1082

@github-actions github-actions bot added ci Changes to CI pipeline or github actions breaking:proto breaking:cli labels May 6, 2024
Copy link

github-actions bot commented May 6, 2024

!!!WARNING!!!
nosec detected in the following files: x/crosschain/client/cli/query_cctx.go, x/crosschain/keeper/cctx.go, x/crosschain/keeper/evm_deposit.go, x/crosschain/keeper/grpc_query_cctx_rate_limit.go, x/crosschain/keeper/grpc_query_cctx_rate_limit_test.go, x/crosschain/keeper/msg_server_vote_inbound_tx.go, x/crosschain/keeper/msg_server_vote_outbound_tx.go, x/crosschain/keeper/process_outbound.go, x/crosschain/types/keys.go, x/crosschain/types/outbound_params_test.go, zetaclient/chains/bitcoin/fee.go, zetaclient/chains/bitcoin/fee_test.go, zetaclient/chains/bitcoin/observer/inbound.go, zetaclient/chains/bitcoin/observer/inbound_test.go, zetaclient/chains/bitcoin/observer/outbound.go, zetaclient/chains/bitcoin/signer/signer.go, zetaclient/chains/evm/observer/inbound.go, zetaclient/chains/evm/signer/signer.go, zetaclient/orchestrator/orchestrator.go, x/crosschain/client/querytests/inbound_hash.go, x/crosschain/client/querytests/inbound_tracker.go, x/crosschain/client/querytests/outbound_tracker.go

Be very careful about using #nosec in code. It can be a quick way to suppress security warnings and move forward with development, it should be employed with caution. Suppressing warnings with #nosec can hide potentially serious vulnerabilities. Only use #nosec when you're absolutely certain that the security issue is either a false positive or has been mitigated in another way.

Only suppress a single rule (or a specific set of rules) within a section of code, while continuing to scan for other problems. To do this, you can list the rule(s) to be suppressed within the #nosec annotation, e.g: /* #nosec G401 */ or //#nosec G201 G202 G203
Broad #nosec annotations should be avoided, as they can hide other vulnerabilities. The CI will block you from merging this PR until you remove #nosec annotations that do not target specific rules.

Pay extra attention to the way #nosec is being used in the files listed above.

Copy link

codecov bot commented May 8, 2024

Codecov Report

Attention: Patch coverage is 95.72108% with 27 lines in your changes are missing coverage. Please review.

Project coverage is 68.07%. Comparing base (d72fdad) to head (f6fc02e).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2118      +/-   ##
===========================================
- Coverage    68.25%   68.07%   -0.19%     
===========================================
  Files          259      259              
  Lines        14918    14982      +64     
===========================================
+ Hits         10183    10199      +16     
- Misses        4273     4321      +48     
  Partials       462      462              
Files Coverage Δ
x/crosschain/genesis.go 93.33% <100.00%> (ø)
x/crosschain/keeper/abci.go 80.76% <100.00%> (ø)
x/crosschain/keeper/cctx.go 94.11% <100.00%> (ø)
x/crosschain/keeper/cctx_utils.go 100.00% <100.00%> (ø)
x/crosschain/keeper/evm_deposit.go 90.27% <100.00%> (ø)
x/crosschain/keeper/finalized_inbounds.go 100.00% <100.00%> (ø)
x/crosschain/keeper/grpc_query_cctx.go 91.01% <100.00%> (ø)
x/crosschain/keeper/grpc_query_cctx_rate_limit.go 94.92% <100.00%> (ø)
.../crosschain/keeper/grpc_query_last_block_height.go 85.71% <100.00%> (ø)
x/crosschain/keeper/inbound_hash_to_cctx.go 100.00% <100.00%> (ø)
... and 51 more

... and 1 file with indirect coverage changes

lumtis and others added 22 commits May 20, 2024 10:51
@lumtis lumtis merged commit 47c8205 into develop May 20, 2024
21 checks passed
@lumtis lumtis deleted the refactor/rename-outbound-inbound branch May 20, 2024 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants