-
Notifications
You must be signed in to change notification settings - Fork 109
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: SetCctxAndNonceToCctxAndInboundHashToCctx receive tsspubkey as an argument #2725
Conversation
…dInboundHashToCctx
Caution Review failedThe pull request is closed. WalkthroughWalkthroughThis update introduces a significant refactor to enhance the handling of TSS (Threshold Signature Scheme) public keys within various functions. Key changes include the addition of new parameters to several methods, allowing for dynamic retrieval of public keys during cross-chain transaction processing. The refactor aims to improve security and functionality in how transactions are managed, while also refining testing strategies to align with the updated logic. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant MsgServer
participant Keeper
participant TSS
User->>MsgServer: Initiate transaction
MsgServer->>Keeper: Validate transaction with TSS key
Keeper->>TSS: Retrieve TSS public key
TSS-->>Keeper: Return TSS public key
Keeper-->>MsgServer: Process transaction with TSS key
MsgServer-->>User: Confirm transaction
Assessment against linked issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
tss, found := k.GetObserverKeeper().GetTSS(ctx) | ||
if found { | ||
for _, elem := range genState.CrossChainTxs { | ||
if elem != nil { | ||
k.SetCctxAndNonceToCctxAndInboundHashToCctx(ctx, *elem, func(ctx sdk.Context) string { | ||
return tss.TssPubkey | ||
}) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trying to retain older behaviour , but I feel we should use
elem.GetCurrentOutboundParam().TssPubkey
instead of trying to fetch the current tss.
the cctxs in the genstate would already have been created using the existing tss
|
GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
---|---|---|---|---|---|
13340122 | Triggered | Generic High Entropy Secret | d6ea2df | zetaclient/chains/solana/signer/signer_test.go | View secret |
13340122 | Triggered | Generic High Entropy Secret | d6ea2df | zetaclient/chains/solana/signer/signer_test.go | View secret |
13392123 | Triggered | Generic High Entropy Secret | d6ea2df | zetaclient/chains/solana/signer/signer_test.go | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #2725 +/- ##
===========================================
- Coverage 71.25% 71.23% -0.03%
===========================================
Files 351 351
Lines 18982 18996 +14
===========================================
+ Hits 13525 13531 +6
- Misses 4853 4859 +6
- Partials 604 606 +2
|
Description
It does not modify any logic.
Closes #2719
How Has This Been Tested?
Summary by CodeRabbit
New Features
Bug Fixes
Tests
Chores