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

Ping Peer Improvement #154

Closed

Conversation

maneeSHA-256
Copy link
Contributor

@maneeSHA-256 maneeSHA-256 commented May 16, 2024

Previously, we were connecting a peer, say Alice is connecting Bob, to check peer status or to fetch it's DIDType for token ownership validation. In this branch the protocol is being improved. Now Alice can share her PeerId, DID and DIDType through the same API which she was using for fetching Bob's status or DIDType. Bob will register or update Alice's details in DIDPeerTable if not already registered or needs to be updated.

This branch has been tested with the following test cases:
sender & reciever's quorums: Q1-Q5

  1. receiver doesn't have sender details
    Result : successful

  2. sender doesn't have receiver did type and receiver doesn't have sender details
    Result : receiver gets sender details but sender doesn't get receiver did type [as expected]

  3. receiver doesn't have sender did type
    Result : successful

  4. receiver doesn't have sender correct peerID
    Result : successful

  5. receiver doesn't have sender peerID
    Result : successful

  6. receiver doesn't have sender peerID and did type
    Result : successful

  7. quorums doesn't have sender details :
    Q1 : doesn't have sender details
    Q2 : doesn't have sender details and sender doesn't have Q2 did type
    Q3 : doesn't have sender did type
    Q4 : doesn't have sender peerID and did type
    Q5 : doesn't have sender correct peerID
    Result : successful

  8. prev pledged quorum (Q4) doesn't have quorum details
    sender : doesn't have Q4 did type
    Q1: doesn't have Q4 did type
    Q3: doesn't have Q4 did type
    Q4 : doesn't have sender details , Q1 details, Q2 details, Q3 did type & correct peerID, Q5 peerID
    Result: couldn't retrieve Q2 & Q5 [as expected]

    sender's quorums: Q2-Q6 ; reciever quorums: Q1-Q5

  9. prev pledged quorum (Q1) doesn't have sender details
    Q2: peerID of Q1
    Q4: didtype & peerID of Q1
    Q6: did type of Q1
    Sender: did type of Q1
    Q1: doesn't have sender details , Q2 details, Q4 did type & correct peerID, Q6 peerID
    Result: failed as Q4 doesn't have peerID of Q1 to ping & fetch its did type [as expected]

  10. prev pledged quorum (Q1) doesn't have sender details
    Q2: peerID of Q1
    Q4: didtype of Q1
    Q6: did type of Q1
    Sender: did type of Q1
    Q1: doesn't have sender details , Q2 details, Q4 did type & correct peerID, Q6 peerID
    Result: couldn't retrieve Q2 & sender details [as expected]

  11. sender creates new token
    Q2 : doesn't have sender did type
    Q6 : doesn't have sender did type
    sender : doesn't have Q2 did type & Q6 details
    Result : successful

Test Cases for the commit - 997366a73860e1ed22ce1148eca605f38ba9c54c :
Sender's Qrms: Q4-Q8 ; Receiver's Qrms: Q11-Q15
Sender added peer details of Q4-Q8; Receiver added peer details of Q11-Q15; Sender added peer details of Receiver

  1. Transfer 1 RBT from Sender to Receiver :
    Result: [transfer successful]
    Q7: pledged-quorum
    Receiver: have peer details of Q4-Q8 & Sender in DIDPeerTable
    Q4-Q8: have peer details of Sender in DIDPeerTable

  2. Transfer 1 RBT from Receiver to Sender:
    Result: [transfer successful]
    Q15: pledged-quorum
    Sender: have peer details of Receiver & Q11-Q15 in DIDPeerTable
    Q11-Q15: have peer details of Receiver & Q7(prev pledged quorum) in DIDPeerTable

  3. Transfer 1 RBT from Sender to Receiver :
    Result: [transfer successful]
    Q5: pledged-quorum
    Q4-Q8: have peer details of Q15(prev pledged quorum) in DIDPeerTable

gklps and others added 30 commits April 4, 2024 15:35
handling non connected peer in Pincheck
Add `release` Github Action workflow
Add feature: Alternate quorum selection
Merge pull request #148 from rubixchain/ft/quorum-setup-check
arnabghose997 and others added 23 commits May 22, 2024 11:33
bump rubixgoplatform version to 0.0.17 for release
…t-fix

Added `dist/` in `.gitignore` to fix merge conflict with `main` branch
…flow-files

hotfix: adding release github action files which were removed while merging PR #151
Syncing `development` and `main` branch
…block-with-signVersion

Adding sender signature details in block
@maneeSHA-256 maneeSHA-256 changed the base branch from development to ashita/adding-peer-details May 29, 2024 07:09
@maneeSHA-256
Copy link
Contributor Author

Closing this PR. Please refer to the PR #176 for updates related to this PR.

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

Successfully merging this pull request may close these issues.

6 participants