This issue is reserved for people who have never contributed to Hedera or any open source project in general.
We know that creating a pull request (PR) is a major barrier for new contributors.
The goal of this issue and all other issues labeled by 'good first issue' is to help you make your first contribution to Hedera.
πΎ Description of the issue
There is a class SignedState.java. This class is the top level object of the state and has a field where signatures are added to it as they are collected. It collects signatures in this class level field:
/**
* the signatures collected so far (including from self)
*/
private SigSet sigSet;
Once enough signatures are collected, the state is considered "signed". The name of this class is misleading because it implies that the state is always signed, but there is time before it collects enough signatures during which it is NOT signed. See in the SignedState.java constructor the sigSet is initialized with no signatures:
sigSet = new SigSet();
Signatures are added to the sigSet later, as they are collected, using this method:
/**
* Add a signature to the sigset. Does not validate the signature.
*
* @param nodeId the ID of the node that provided the signature
* @param signature the signature to add
*/
public void addSignature(@NonNull final NodeId nodeId, @NonNull final Signature signature)
Steps to reproduce
Find the SignedState class. Observe the empty sigSet in the constructor.
Proposed Solution:
Refactor the SignedState.java class to SignableState.java. This new name is more accurate and clear, indicating that it is an object that can collect signatures but does not imply how many have been collected.
The refactor should include all test classes with the term SignedState in the name.
Leave the SignedStateInfo.java class alone. There is another ticket for removing this unused interface.
π Step by step guide to do a contribution
If you have never contributed to an open source project at GitHub, the following step-by-step guide will introduce you to the workflow. More information and concrete samples for shell commands for each step can be found in our CONTRIBUTING.md file.
A more detailed general documentation of the GitHub PR workflow can be found here.
[ ] Claim this issue: Comment below that you are interested in working on the issue
[ ] Wait for assignment: A community member with the given rights will add you as an assignee of the issue
[ ] Fork the repository: You can do that in GitHub (by simply clicking the 'fork' button).
[ ] Check out the forked repository
[ ] Create a feature branch for the issue. We do not have a hard naming definition for branches but it is best practice to prefix the branch name with the issue id.
[ ] Solve the issue in your branch.
[ ] Commit your changes: Here, it is needed to add sign-off information to the commit to accept the "Developer Certificate of Origin" (https://developercertificate.org). More details can be found in our CONTRIBUTING.md
[ ] Start a Pull Request (PR): We have a pattern for naming pull requests that a GitHub Action checks. We use that pattern to support the creation of automatic release notes.
[ ] Check GitHub Actions: Several GitHub Actions will be triggered automatically for each PR. If a GitHub Action fails and you do not understand the cause of that error do not hesitate to add a comment to the PR and ask the Hedera developer community for support.
[ ] Wait for reviews: Members of the Hedera developer community will review your PR. If a reviewer finds any missing pieces or a problem, he or she will start a discussion with you and describe the next steps for solving the problem.
[ ] You did it π: We will merge the fix in the develop branch. Thanks for being part of the Hedera community as an open-source contributor β€οΈ
π Contribute to Hacktoberfest
Solve this issue as part of the Hacktoberfest event and get a chance to receive cool goodies like a T-Shirt. π½
π€ Additional Information
If you have any questions, just ask us directly in this issue by adding a comment. You can join our community chat at Discord. A general manual about open-source contributions can be found here.
ππ₯ First Timers Only
This issue is reserved for people who have never contributed to Hedera or any open source project in general. We know that creating a pull request (PR) is a major barrier for new contributors. The goal of this issue and all other issues labeled by 'good first issue' is to help you make your first contribution to Hedera.
πΎ Description of the issue
There is a class
SignedState.java
. This class is the top level object of the state and has a field where signatures are added to it as they are collected. It collects signatures in this class level field:Once enough signatures are collected, the state is considered "signed". The name of this class is misleading because it implies that the state is always signed, but there is time before it collects enough signatures during which it is NOT signed. See in the
SignedState.java
constructor thesigSet
is initialized with no signatures:sigSet = new SigSet();
Signatures are added to the
sigSet
later, as they are collected, using this method:Steps to reproduce
Find the
SignedState
class. Observe the emptysigSet
in the constructor.Proposed Solution:
Refactor the
SignedState.java
class toSignableState.java
. This new name is more accurate and clear, indicating that it is an object that can collect signatures but does not imply how many have been collected.The refactor should include all test classes with the term
SignedState
in the name.Leave the
SignedStateInfo.java
class alone. There is another ticket for removing this unused interface.π Step by step guide to do a contribution
If you have never contributed to an open source project at GitHub, the following step-by-step guide will introduce you to the workflow. More information and concrete samples for shell commands for each step can be found in our CONTRIBUTING.md file. A more detailed general documentation of the GitHub PR workflow can be found here.
sign-off
information to the commit to accept the "Developer Certificate of Origin" (https://developercertificate.org). More details can be found in our CONTRIBUTING.mdπ Contribute to Hacktoberfest
Solve this issue as part of the Hacktoberfest event and get a chance to receive cool goodies like a T-Shirt. π½
π€ Additional Information
If you have any questions, just ask us directly in this issue by adding a comment. You can join our community chat at Discord. A general manual about open-source contributions can be found here.