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

feat: sui cluster connection #393

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Conversation

gcranju
Copy link
Collaborator

@gcranju gcranju commented Oct 7, 2024

Description:

Commit Message

feat: sui cluster connection

see the guidelines for commit messages.

Changelog Entry

version: <log entry>

Checklist:

  • I have performed a self-review of my own code
  • I have documented my code in accordance with the documentation guidelines
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have run the unit tests
  • I only have one commit (if not, squash them into one commit).
  • I have a descriptive commit message that adheres to the commit message guidelines

Please review the CONTRIBUTING.md file for detailed contributing guidelines.

@gcranju gcranju added the enhancement New feature or request label Oct 7, 2024
@gcranju gcranju self-assigned this Oct 7, 2024
Copy link

codecov bot commented Oct 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.47%. Comparing base (231a239) to head (0dd5ec3).
Report is 6 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##               main     #393   +/-   ##
=========================================
  Coverage     89.47%   89.47%           
  Complexity       77       77           
=========================================
  Files            42       42           
  Lines          2698     2698           
  Branches         37       37           
=========================================
  Hits           2414     2414           
  Misses          267      267           
  Partials         17       17           
Flag Coverage Δ
solidity 88.41% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Copy link
Collaborator

@ibrizsabin ibrizsabin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

few change requests on comment

}

entry fun set_validator_threshold(xcall:&mut XCallState,cap:&ConnCap,threshold:u64,_ctx: &mut TxContext){
let state=get_state_mut(xcall_state::get_connection_states_mut(xcall),cap.connection_id());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we should separate configuration capabilities to a separate AdminCap because if the relayer is compromised it can change these settings and submit fake signatures which undermines entire point. But if we have admin cap separate attacker would need to compromise both to submit fake msg.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also instead of adding removing validators it makes sense to have single entry point that changes entire validatorset and threshold. This way we can verify that threshold is valid number whenever validator set changes else there might be scenarios where we remove validators and forget to update threshold. makes sense?

let mut unique_verified_pubkey = vector::empty();
while (i < signatures.length()) {
let signature = signatures.borrow(i);
let pub_key = get_pubkey_from_signature(signature);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we sure that we will receive raw_signature(scheme+pubkey+signature) here ? plz make sure with relay guys, in my opinion they may only send signature here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one was discussed with Biru daii, and planned this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants