Skip to content

Commit 602699c

Browse files
authored
fix linting issues and update some PIPs (#125)
* fix linting issues and update some PIPs * fix linting issues and update some PIPs * fix linting issues and update some PIPs
1 parent c968ada commit 602699c

37 files changed

+555
-544
lines changed

.editorconfig

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
insert_final_newline = true
6+
trim_trailing_whitespace = true

.github/CONTRIBUTING.md

-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
Please review [PIP-1](https://pips.Pactus.org/PIPs/pip-1) for PIP guidelines.
2-
3-
<!-- RATIONALE FOR THIS FILE: IT IS DISPLAYED WHEN YOU CREATE AN ISSUE OR MAKE A PR -->

.github/workflows/ci.yml

+16-31
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,8 @@ name: Continuous Integration
22

33
on:
44
pull_request:
5-
types:
6-
- opened
7-
- reopened
8-
- synchronize
9-
- ready_for_review
10-
- edited
5+
branches:
6+
- main
117

128
concurrency:
139
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
@@ -36,7 +32,7 @@ jobs:
3632
name: pr_number
3733
path: pr/
3834

39-
htmlproofer:
35+
html-proofer:
4036
name: HTMLProofer
4137
runs-on: ubuntu-20.04
4238

@@ -77,7 +73,7 @@ jobs:
7773
check-modified-files-only: yes
7874
base-branch: main
7975

80-
codespell:
76+
code-spell:
8177
name: CodeSpell
8278
runs-on: ubuntu-latest
8379

@@ -105,31 +101,20 @@ jobs:
105101
skip: .git,Gemfile.lock,**/*.png,**/*.gif,**/*.jpg,**/*.svg,.codespell-whitelist,vendor,_site,_config.yml,style.css
106102

107103

108-
markdownlint:
109-
name: Markdown Linter
104+
markdown-lint:
105+
name: Lining Markdown files
110106
runs-on: ubuntu-latest
111107
steps:
112-
- name: Checkout PIP Repository
113-
uses: actions/checkout@47fbe2df0ad0e27efb67a70beac3555f192b062f
108+
- name: Clone repository
109+
uses: actions/checkout@v4
114110

115-
- name: Get Changed Files
116-
id: changed
117-
continue-on-error: true
118-
run: |
119-
echo "CHANGED_FILES<<EOF" >> $GITHUB_ENV
120-
gh pr diff ${{ github.event.number }} --name-only | grep -E -x '[^/]+\.md|PIPs/pip-[0-9]+\.md' >> $GITHUB_ENV
121-
echo "EOF" >> $GITHUB_ENV
122-
env:
123-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
124-
125-
- name: Lint
126-
uses: DavidAnson/markdownlint-cli2-action@v16
127-
if: steps.changed.outcome == 'success'
111+
- name: Setup Ruby
112+
uses: ruby/setup-ruby@v1
128113
with:
129-
command: config
130-
globs: |
131-
config/.markdownlint.yaml
132-
${{ env.CHANGED_FILES }}
114+
ruby-version: '3.0'
133115

134-
- name: Markdown link check
135-
uses: gaurav-nelson/github-action-markdown-link-check@v1
116+
- name: Install mdl
117+
run: gem install mdl
118+
119+
- name: Linting markdowns
120+
run: mdl --style=./config/.mdlrc.rb ./PIPs

.github/workflows/jekyll-label-bot.yml

-20
This file was deleted.

PIPs/pip-1.md

+49-19
Original file line numberDiff line numberDiff line change
@@ -9,39 +9,69 @@ created: 2023-07-10
99

1010
## What is an PIP?
1111

12-
Pactus Improvement Proposals (PIPs) serve as a comprehensive framework for outlining and defining the standards
13-
for the Pactus platform's ongoing development and enhancement. These proposals cover various aspects of the platform,
14-
including core protocol specifications and client application programming interfaces (APIs). By establishing a clear
15-
and consistent set of guidelines, PIPs ensure seamless interoperability and extensibility across the Pactus ecosystem,
12+
Pactus Improvement Proposals (PIPs) serve as a comprehensive framework for outlining and defining the standards
13+
for the Pactus platform's ongoing development and enhancement. These proposals cover various aspects of the platform,
14+
including core protocol specifications and client application programming interfaces (APIs). By establishing a clear
15+
and consistent set of guidelines, PIPs ensure seamless interoperability and extensibility across the Pactus ecosystem,
1616
fostering a robust and efficient environment for developers and users alike.
1717

1818
## PIP Rationale
1919

20-
We intend PIPs to be the primary mechanisms for proposing new features, for collecting community technical input on an issue, and for documenting the design decisions that have gone into Pactus. Because the PIPs are maintained as text files in a versioned repository, their revision history is the historical record of the feature proposal.
20+
We intend PIPs to be the primary mechanisms for proposing new features, for collecting community technical input on an issue,
21+
and for documenting the design decisions that have gone into Pactus.
22+
Because the PIPs are maintained as text files in a versioned repository,
23+
their revision history is the historical record of the feature proposal.
2124

22-
For Pactus implementers, PIPs are a convenient way to track the progress of their implementation. Ideally, each implementation maintainer would list the PIPs that they have implemented. This will give end users a convenient way to know the current status of a given implementation or library.
25+
For Pactus implementers, PIPs are a convenient way to track the progress of their implementation.
26+
Ideally, each implementation maintainer would list the PIPs that they have implemented.
27+
This will give end users a convenient way to know the current status of a given implementation or library.
2328

2429
## PIP Types
2530

2631
There are three types of PIP:
2732

28-
**Standards Track** PIP: Describes any change that affects most or all Pactus implementations, such as—a change to the network protocol, a change in block or transaction validity rules, proposed application standards/conventions, or any change or addition that affects the interoperability of applications using Pactus. Standards Track PIPs consist of three parts—a design document, an implementation, and (if warranted) an update to the formal specification. Furthermore, Standards Track PIPs can be broken down into the following categories:
33+
**Standards Track** PIP:
34+
Describes any change that affects most or all Pactus implementations, such as—a change to the network protocol,
35+
a change in block or transaction validity rules, proposed application standards/conventions,
36+
or any change or addition that affects the interoperability of applications using Pactus.
37+
Standards Track PIPs consist of three parts—a design document, an implementation, and
38+
(if warranted) an update to the formal specification.
39+
Furthermore, Standards Track PIPs can be broken down into the following categories:
2940

30-
* *Core*: Improvements requiring a consensus fork, as well as changes that are not necessarily consensus critical but may be relevant to "core dev" discussions or any change to transaction, block, address or their new versions.
41+
* *Core*: Improvements requiring a consensus fork, as well as changes that are not necessarily consensus critical but
42+
may be relevant to "core dev" discussions or any change to transaction, block, address or their new versions.
3143

3244
* *Networking*: Includes improvements around Pactus networking protocol.
3345

34-
* *Interface*: Includes improvements around clients, API/RPCs specifications, and how users and applications interact with the blockchain. The label "interface" aligns with the interfaces repo, and discussion should primarily occur in that repository before a PIP is submitted to the PIPs repository.
35-
36-
* *PRC*: Application-level standards and conventions, including contract standards such as token standards, name registries, URI schemes, library/package formats, and wallet formats.
37-
38-
**Meta PIP**: Describes a process surrounding Pactus or proposes a change to (or an event in) a process. Process PIPs are like Standards Track PIPs but apply to areas other than the Pactus protocol itself. They may propose an implementation, but not to Pactus's codebase; they often require community consensus; unlike Informational PIPs, they are more than recommendations, and users are typically not free to ignore them. Examples include procedures, guidelines, changes to the decision-making process, and changes to the tools or environment used in Pactus development. Any meta-PIP is also considered a Process PIP.
39-
40-
**Informational** PIP: Describes a Pactus design issue, or provides general guidelines or information to the Pactus community, but does not propose a new feature. Informational PIPs do not necessarily represent Pactus community consensus or a recommendation, so users and implementers are free to ignore Informational PIPs or follow their advice.
41-
42-
It is highly recommended that a single PIP contain a single key proposal or new idea. The more focused the PIP, the more successful it tends to be. A change to one client doesn't require a PIP; a change that affects multiple clients, or defines a standard for multiple apps to use, does.
43-
44-
A PIP must meet certain minimum criteria. It must be a clear and complete description of the proposed enhancement. The enhancement must represent a net improvement. The proposed implementation, if applicable, must be solid and must not complicate the protocol unduly.
46+
* *Interface*: Includes improvements around clients, API/RPCs specifications, and how users and
47+
applications interact with the blockchain.
48+
The label "interface" aligns with the interfaces repo, and discussion should primarily occur
49+
in that repository before a PIP is submitted to the PIPs repository.
50+
51+
* *PRC*: Application-level standards and conventions, including contract standards such as
52+
* token standards, name registries, URI schemes, library/package formats, and wallet formats.
53+
54+
**Meta PIP**: Describes a process surrounding Pactus or proposes a change to (or an event in) a process.
55+
Process PIPs are like Standards Track PIPs but apply to areas other than the Pactus protocol itself.
56+
They may propose an implementation, but not to Pactus's codebase; they often require community consensus;
57+
unlike Informational PIPs, they are more than recommendations, and users are typically not free to ignore them.
58+
Examples include procedures, guidelines, changes to the decision-making process,
59+
and changes to the tools or environment used in Pactus development.
60+
Any meta-PIP is also considered a Process PIP.
61+
62+
**Informational** PIP: Describes a Pactus design issue, or provides general guidelines or
63+
information to the Pactus community, but does not propose a new feature.
64+
Informational PIPs do not necessarily represent Pactus community consensus or a recommendation,
65+
so users and implementers are free to ignore Informational PIPs or follow their advice.
66+
67+
It is highly recommended that a single PIP contain a single key proposal or new idea.
68+
The more focused the PIP, the more successful it tends to be.
69+
A change to one client doesn't require a PIP; a change that affects multiple clients,
70+
or defines a standard for multiple apps to use, does.
71+
72+
A PIP must meet certain minimum criteria. It must be a clear and complete description of the proposed enhancement.
73+
The enhancement must represent a net improvement. The proposed implementation,
74+
if applicable, must be solid and must not complicate the protocol unduly.
4575

4676
## PIP Status Terms
4777

PIPs/pip-10.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ and broadcasting for almost $n^2$ messages in the Precommit phase.
3030

3131
## Specification
3232

33-
In each height, the consensus protocol is executed by $3f+1$ validators, and execution is organized into a sequence of rounds.
34-
Within a round, a single validator is designated as the proposer responsible for collecting transactions and creating a proposal block.
33+
In each height, the consensus protocol is executed by $3f+1$ validators,
34+
and execution is organized into a sequence of rounds.
35+
Within a round, a single validator is designated as the proposer responsible for collecting transactions and
36+
creating a proposal block.
3537
The proposer then broadcasts a proposal message that includes the proposal block to other validators.
3638
Other validators, once they receive the proposal message, validate it and broadcast the $PREPARE$ message to other validators.
3739

@@ -74,7 +76,7 @@ If the most significant bit of the round number is set to 1, the certificate is
7476
It should then be validated with $3f+1$ votes from the validators in the Prepare step.
7577
If set to zero, it should be validated with $2f+1$ votes from the validators in the Precommit step.
7678

77-
## References:
79+
## References
7880

7981
1. [Zyzzyva: Speculative Byzantine Fault Tolerance](https://www.cs.cornell.edu/lorenzo/papers/kotla07Zyzzyva.pdf)
8082
2. [Bosco: One-Step Byzantine Asynchronous Consensus](https://link.springer.com/chapter/10.1007/978-3-540-87779-0_30)

0 commit comments

Comments
 (0)