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(net): add column codeVersion to HelloMessage #5584

Merged
merged 2 commits into from
Dec 27, 2023

Conversation

317787106
Copy link
Contributor

What does this PR do?

  • add column codeVersion to HelloMessage

Why are these changes required?

  • know more information about peer

This PR has been tested by:

  • Unit Tests
  • Manual Testing

Follow up

Extra details

@317787106 317787106 changed the title Feature/add code version feat(net): add column codeVersion to HelloMessage Nov 15, 2023
@317787106 317787106 linked an issue Nov 15, 2023 that may be closed by this pull request
builder.append("address:")
.append(StringUtil.encode58Check(address.toByteArray())).append("\n");
}

ByteString signature = helloMessage.getSignature();
if (signature != null && !signature.isEmpty()) {
if (!signature.isEmpty()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this field has some relationship with the codeVersion?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is this field has some relationship with the codeVersion?

No, only code optimization.

Choose a reason for hiding this comment

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

933756

Choose a reason for hiding this comment

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

Ma ja sam na neki način i u teretani i ja Pa Pa

Choose a reason for hiding this comment

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

Choose a reason for hiding this comment

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

Zakačite stavke ostave kako ne bi istekle nakon 1 časa

Choose a reason for hiding this comment

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

Choose a reason for hiding this comment

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

Prevucite stavke iz međuspremnika da biste ih izbrisali

Choose a reason for hiding this comment

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

🇦🇸🇦🇩🇦🇩Fg0x1cfa5e643a3436d94732f65561f8c86e2ea910beZakačite stavke ostave kako ne bi istekle nakon 1 časa

builder.append("signature:")
.append(signature.toByteArray().length).append("\n");
}

ByteString codeVersion = helloMessage.getCodeVersion();
Copy link
Contributor

Choose a reason for hiding this comment

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

Will this codeVersion be null when received a HelloMessage from a node with previous version ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Every column in proto has default value. codeVersion has default value byte[0], not null.

@codecov-commenter
Copy link

codecov-commenter commented Nov 16, 2023

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 71.42857% with 2 lines in your changes missing coverage. Please review.

Project coverage is 66.37%. Comparing base (df52667) to head (54704c2).
Report is 228 commits behind head on develop.

Files with missing lines Patch % Lines
.../tron/core/net/message/handshake/HelloMessage.java 71.42% 0 Missing and 2 partials ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #5584      +/-   ##
=============================================
- Coverage      66.43%   66.37%   -0.07%     
+ Complexity     10216    10206      -10     
=============================================
  Files            894      894              
  Lines          53841    53846       +5     
  Branches        5931     5932       +1     
=============================================
- Hits           35768    35738      -30     
- Misses         15284    15315      +31     
- Partials        2789     2793       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@halibobo1205 halibobo1205 added this to the GreatVoyage-v4.7.4 milestone Dec 27, 2023
@halibobo1205 halibobo1205 merged commit 989115a into tronprotocol:develop Dec 27, 2023
2 checks passed
Copy link

@Nouri11190 Nouri11190 left a comment

Choose a reason for hiding this comment

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

fix and push through Tron Project

Copy link

@Danyalkasiri Danyalkasiri left a comment

Choose a reason for hiding this comment

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


@@ -99,6 +100,9 @@ public void testOkHelloMessage()
Node node = new Node(NetUtil.getNodeId(), a1.getAddress().getHostAddress(), null, a1.getPort());
HelloMessage helloMessage = new HelloMessage(node, System.currentTimeMillis(),
ChainBaseManager.getChainBaseManager());

Assert.assertEquals(Version.getVersion(),

Choose a reason for hiding this comment

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


Choose a reason for hiding this comment

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


@Danyalkasiri
Copy link

./

@Danyalkasiri
Copy link

ok

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.

TIP-621: Add code version column to HelloMessage
9 participants