-
Notifications
You must be signed in to change notification settings - Fork 412
First draft, don't-cover-everything-but-yet-a-good-start-CONTRIBUTING.md #470
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
First draft, don't-cover-everything-but-yet-a-good-start-CONTRIBUTING.md #470
Conversation
@ariard thanks for taking a first pass at this. I did a quick initial review:
|
CONTRIBUTING.md
Outdated
Deeply tied with the security aspect, Rust-Lightning developers take testing | ||
really seriouslt. Due to the modular nature of the project writing new functional | ||
tests is easy and well-coverage of the codebase is a long-term goal. |
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.
I'd also like to see more unit testing in order to promote less complex, modular design.
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.
Yes add a line on it
1818a30
to
15df6b1
Compare
CONTRIBUTING.md
Outdated
|
||
In general commits should be atomic and diffs should be easy to read. | ||
For this reason do not mix ant formatting fixes or code moves with | ||
actual code changes. |
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.
Further, each commit, individually, should compile and pass tests, in order to ensure git bisect and other automated tools function properly.
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.
Can you add this line?
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.
Done,
CONTRIBUTING.md
Outdated
Architecture | ||
------------ | ||
|
||
XXX: (here or in readme ?) |
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.
Probably readme, at least in general, though specific "fuzzers live in fuzz/src, with message fuzers in ..." kind of stuff could go here.
CONTRIBUTING.md
Outdated
helps prevent user loss of funds. If you think vulnerability is with regard to the spec | ||
please inform other Lightning implementations diligently. | ||
|
||
XXX: (what process ?) |
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.
Pre-0.1 we can probably say "open github issue". Post-0.1 we should have some list of PGP keys and suggest emailing (to something not on gmail).
Cool! I left a few high-level comments. Indeed, we'll need someone to go over it for grammar, but I'm probably not the one to do that either lol. |
Also, we should add a line explaining that we use Travis to enforce MSRV of Rust 1.22.0 for the lightning/ workspace (though not for lightning-net-tokio or fuzzers). |
Do we want to state "we dont make syscalls" somewhere in the README or CONTRIBUTING doc or elsewhere, so that new contributors understand this important principle of the design? |
I think this should live in the README under something like |
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.
I would also suggest adopting some sort of commit-prefixing protocol, e.g. conventional commits or similar variant (like what bitcoin core uses). This can help delineate the type of change being made.
Speaking of commits, I'd like to see some guidelines around both commit messages and PR descriptions. When exploring the git log recently, I noticed the why for many commits was not given, which makes it difficult to understand the rationale for a change. Sometimes I was able to ascertain this information from the PR description, but often not. Having clear guidelines about what goes into a commit message and PR description would benefit posterity, including our future selves. |
Linus has a solid guideline. |
15df6b1
to
49bfed9
Compare
Thanks all for your review, updated with your comments. @moneyball sorry miss #479, you mention LDK but don't link to any other thinh so take opportunity of this PR to add a link to LDK slack in README.md |
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.
LGTM, nitted the grammar here and there.
49bfed9
to
d16ee5e
Compare
Thanks for review, addressed your comments Matt! |
Thanks for passing this along! Some of that is a bit project specific, though. Could we possibly use the same guidelines as Bitcoin Core: https://chris.beams.io/posts/git-commit/ I'd be up for considering conventional commits (your other suggestion), also. I haven't put much thought into it yet. Do others have experience with them? |
We're piloting a variant of conventional commits at my work. Got some pushback from other developers because it requires some additional work on their part and it's hard to prove the value it provides. Because of this, I think using the same or similar guidelines as Bitcoin Core would be the most beneficial. |
Anyone may participate in peer review which is expressed by comments in the pull | ||
request. Typically reviewers will review the code for obvious errors, as well as | ||
test out the patch set and opine on the technical merits of the patch. PR should | ||
be reviewed first on the conceptual level before focusing on code style or grammar | ||
fixes. |
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.
Would it be worth stating the criteria used for merging? Or leave to a follow up?
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.
Good question, @TheBlueMatt should we enforce the at-least 2-ACK for any substantial changes ?
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.
I was kinda figuring leave it as a followup - we just dumped 4 new full-time contributors on the project, so I was kinda waiting until folks were up to speed and felt more comfortable with the codebase then we'd revisit it and do something like 2 acks from regular contributors or so (like rust-bitcoin).
d16ee5e
to
0dedb38
Compare
Updated 0dedb38 with last comments fixed, specially referring to Bitcoin Core git commit convention instead of Linus one. |
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.
Aside from the two comments, looks good.
0dedb38
to
34871ea
Compare
Two comments fixed at 34871ea |
A CONTRIBUTING.md, a code formatter, mutation testing. We just have to run Travis on SPARC-32 and we have a real open source project.
Close #468