Skip to content

Commit cccb5a5

Browse files
authored
Merge branch 'main' into fix-2062-idemix-km-nil-error
2 parents 4d32207 + 0b8ac52 commit cccb5a5

119 files changed

Lines changed: 4921 additions & 414 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/scorecard.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: "OpenSSF Scorecard"
2+
3+
# The README Scorecard badge is intentionally NOT added yet: api.scorecard.dev only
4+
# serves data for a repository after this workflow has run on the default branch with
5+
# publish_results: true. Until then the badge renders "invalid repo path". Add
6+
# https://api.scorecard.dev/projects/github.com/LFDT-Panurus/panurus/badge
7+
# to the README badge row once the first run on `main` has completed.
8+
9+
on:
10+
# Re-run when branch protection changes, since Branch-Protection is a scored check.
11+
branch_protection_rule:
12+
schedule:
13+
- cron: '27 6 * * 1'
14+
push:
15+
branches: [ "main" ]
16+
17+
# Least privilege by default; the job below elevates only what it needs.
18+
permissions: read-all
19+
20+
jobs:
21+
analysis:
22+
name: Scorecard analysis
23+
runs-on: ubuntu-latest
24+
permissions:
25+
# Required to upload the results to code-scanning.
26+
security-events: write
27+
# Required by publish_results, which signs the results for the public API
28+
# that serves the README badge.
29+
id-token: write
30+
31+
steps:
32+
- name: "Checkout code"
33+
uses: actions/checkout@v4
34+
with:
35+
persist-credentials: false
36+
37+
- name: "Run analysis"
38+
uses: ossf/scorecard-action@v2.4.4
39+
with:
40+
results_file: results.sarif
41+
results_format: sarif
42+
# Must stay true: without it the api.securityscorecards.dev endpoint
43+
# serves no data and the README badge renders "invalid repo path".
44+
publish_results: true
45+
46+
- name: "Upload artifact"
47+
uses: actions/upload-artifact@v4
48+
with:
49+
name: SARIF file
50+
path: results.sarif
51+
retention-days: 5
52+
53+
- name: "Upload to code-scanning"
54+
uses: github/codeql-action/upload-sarif@v4
55+
with:
56+
sarif_file: results.sarif

.github/workflows/token-validation-benchmark.yml

Lines changed: 53 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,24 @@ name: Token Validation Benchmark
2828
# If a run is interrupted, clear leftover containers before retrying:
2929
# docker rm -f $(docker ps -aq --filter ancestor=catthehacker/ubuntu:act-latest)
3030
on:
31-
# pull_request_target runs in the BASE repo context, so GITHUB_TOKEN keeps
32-
# write access even for fork PRs — which is what lets the compare job post its
33-
# comment. The tradeoff is that this event is inherently more dangerous: the
34-
# benchmark job below checks out and runs the PR HEAD (untrusted) code. To
35-
# keep that safe, the default token here is read-only (see permissions), and
36-
# pull-requests: write is granted ONLY to the trusted compare job that never
37-
# runs PR code. Do not add secrets or write scopes to the benchmark job.
38-
pull_request_target:
31+
# The benchmark job below checks out and runs the PR HEAD (untrusted fork)
32+
# code, so this workflow runs on `pull_request`, NOT `pull_request_target`:
33+
# fork PRs run in the fork's untrusted context with a read-only GITHUB_TOKEN
34+
# and no access to secrets, and `actions/checkout` pulls the fork's PR code
35+
# directly (no `allow-unsafe-pr-checkout` needed). This workflow only produces
36+
# artifacts; posting the PR comment happens in the companion
37+
# `token-validation-benchmark-comment.yml`, which runs on `workflow_run` in the
38+
# trusted base-repo context and therefore has `pull-requests: write` even for
39+
# fork PRs.
40+
pull_request:
3941
workflow_dispatch:
4042

41-
# Read-only by default. The benchmark job runs untrusted PR head code, so it
42-
# must not have a write-capable token. Write access is scoped per-job on the
43-
# compare job (below), which only runs trusted base-repo code.
43+
# Read-only by default: the benchmark job runs untrusted fork code and must not
44+
# have a write-capable token. pull-requests: write is scoped per-job on the
45+
# compare job (below). Under `pull_request` that write scope is effective only
46+
# for same-repo PRs; for fork PRs the token stays read-only, so the compare
47+
# job's comment step fails harmlessly (it is continue-on-error) and the
48+
# companion workflow_run workflow posts the comment from the trusted context.
4449
permissions:
4550
contents: read
4651

@@ -191,17 +196,18 @@ jobs:
191196
needs: benchmark
192197
runs-on: ubuntu-latest
193198
# Write scope lives HERE, not at the top level, because this job runs only
194-
# trusted base-repo code (the checkout below takes the default base ref, and
195-
# it never checks out or executes PR head code). The benchmark job keeps the
196-
# read-only default token.
199+
# trusted base-repo code (it never checks out or executes PR head code). The
200+
# benchmark job keeps the read-only default token. On fork PRs the token is
201+
# read-only regardless, so the comment step below cannot post — that is why
202+
# the comment step itself is continue-on-error and the companion workflow_run
203+
# workflow handles commenting for forks. The job as a whole is NOT
204+
# continue-on-error: a detected regression fails it (see the final step).
197205
permissions:
198206
contents: read
199207
pull-requests: write
200-
continue-on-error: true
201208
steps:
202-
# No ref specified: under pull_request_target this checks out the BASE
203-
# repo/branch (trusted), which is exactly what we want for the code that
204-
# holds the write token.
209+
# No ref specified: checks out this workflow's ref (the base repo), NOT the
210+
# PR head, so the compare script we run is trusted.
205211
- name: Checkout code
206212
uses: actions/checkout@v4
207213

@@ -221,15 +227,44 @@ jobs:
221227
run: pip install pandas
222228

223229
- name: Build comparison report
230+
id: report
224231
run: |
232+
# Always build and print the report so it is visible in the job log,
233+
# regardless of whether a regression is detected. The script exits 3
234+
# when it detects a regression, 0 otherwise; any other non-zero code is
235+
# a real failure and must propagate. Capture the code without letting
236+
# `set -e` abort the step on the expected exit 3.
237+
set +e
225238
python cmd/benchmarking/compare_benchmarks.py \
226239
--input-dir "$OUTPUT_DIR" \
227240
--base-tag '_base_' \
228241
--pr-tag '_pr_' \
229242
--delta "$DELTA" \
230243
--output comment.md
244+
rc=$?
245+
set -e
231246
247+
case "$rc" in
248+
0) echo "degraded=false" >> "$GITHUB_OUTPUT" ;;
249+
3) echo "degraded=true" >> "$GITHUB_OUTPUT" ;;
250+
*) echo "compare_benchmarks.py failed with exit code $rc" >&2
251+
exit "$rc" ;;
252+
esac
253+
254+
# Only comment when there is a regression to report. On fork PRs the token
255+
# is read-only and this step cannot post, so it is continue-on-error; the
256+
# companion workflow_run workflow handles commenting for forks.
232257
- name: Post comparison comment
258+
if: steps.report.outputs.degraded == 'true'
259+
continue-on-error: true
233260
env:
234261
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
235262
run: gh pr comment "${{ github.event.pull_request.number }}" --body-file comment.md
263+
264+
# Fail the job on regression, after the comment has been posted, so the
265+
# PR check turns red and the degradation is not silently accepted.
266+
- name: Fail on regression
267+
if: steps.report.outputs.degraded == 'true'
268+
run: |
269+
echo "::error::Token validation benchmark detected a performance regression (see report above)."
270+
exit 1

.golangci.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ linters:
1616
- govet # Vet examines Go source code and reports suspicious constructs. It is roughly the same as 'go vet' and uses its passes. [auto-fix]
1717
- importas # Enforces consistent import aliases. [auto-fix]
1818
- intrange # Intrange is a linter to find places where for loops could make use of an integer range. [auto-fix]
19+
- ireturn # Accept Interfaces, Return Concrete Types.
1920
- loggercheck # Checks key value pairs for common logger libraries (kitlog,klog,logr,slog,zap).
21+
- lll # Reports long lines. [fast]
2022
- mirror # Reports wrong mirror patterns of bytes/strings usage. [auto-fix]
2123
- misspell # Finds commonly misspelled English words. [fast, auto-fix]
2224
- nakedret # Checks that functions with naked returns are not longer than a maximum size (can be zero). [fast, auto-fix]
@@ -89,6 +91,25 @@ linters:
8991
- github.com/prometheus/client_golang/prometheus.Counter
9092
- github.com/prometheus/client_golang/prometheus.Gauge
9193
- github.com/prometheus/client_golang/prometheus.Histogram
94+
# Third-party interfaces we are obliged to return: either the signature is fixed by an
95+
# interface we implement (Pagination, bccsp.Key, KeyStore) or it is the framework's own
96+
# constructor convention (view.View, view.Session). Returning a concrete type instead is
97+
# not an option in these cases, so allow them rather than carry a nolint at every site.
98+
- github.com/hyperledger-labs/fabric-smart-client/platform/common/driver.Pagination
99+
- github.com/hyperledger-labs/fabric-smart-client/platform/view/view.View
100+
- github.com/hyperledger-labs/fabric-smart-client/platform/view/view.Session
101+
- github.com/hyperledger/fabric-lib-go/bccsp.Key
102+
- github.com/hyperledger/fabric-lib-go/bccsp.BCCSP
103+
- github.com/hyperledger/fabric-lib-go/bccsp.HashOpts
104+
- github.com/IBM/idemix/bccsp/types.BCCSP
105+
- github.com/IBM/idemix/bccsp/types.KeyStore
106+
- go.opentelemetry.io/otel/trace.Span
107+
- github.com/hyperledger/fabric-lib-go/common/metrics.Gauge
108+
- github.com/hyperledger/fabric-lib-go/common/metrics.Histogram
109+
- github.com/hyperledger-labs/fabric-smart-client/platform/common/driver.ConfigService
110+
- github.com/hyperledger-labs/fabric-smart-client/integration/nwo/api.ViewClient
111+
- github.com/hyperledger-labs/fabric-smart-client/integration/nwo/api.Platform
112+
- github.com/hyperledger-labs/fabric-smart-client/integration/nwo/api.Context
92113
lll:
93114
# Max line length, lines longer will be reported.
94115
line-length: 240

ADOPTERS.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
[//]: # (SPDX-License-Identifier: CC-BY-4.0)
2+
3+
# Adopters
4+
5+
This file lists organizations and projects using Panurus, together with a publicly verifiable
6+
reference for each entry.
7+
8+
## Are you using Panurus?
9+
10+
Please add yourself. Adopter lists help the community understand where Panurus is deployed, guide
11+
roadmap priorities, and give new users confidence in the project.
12+
13+
To be added:
14+
15+
1. Open a pull request editing this file.
16+
2. Add a row to the table below.
17+
3. Include a **publicly verifiable reference** — a link to an announcement, blog post, paper, press
18+
release, conference talk, or public repository. Entries without a public reference cannot be
19+
accepted, as required by the
20+
[LFDT project consistency guidelines][lfdt-consistency].
21+
4. Only add your organization if you are authorized to do so on its behalf.
22+
23+
If you would rather not be listed publicly but are happy for the maintainers to know, say so in a
24+
[GitHub Discussion](https://github.com/LFDT-Panurus/panurus/discussions) instead.
25+
26+
## Adopters
27+
28+
| Organization / Project | Type of use | Status | Reference |
29+
|------------------------|-------------|--------|-----------|
30+
31+
_No adopters are listed yet. Entries require a publicly verifiable reference — see above._
32+
33+
**Status** is one of:
34+
35+
- **Production** — deployed in a production environment.
36+
- **Pilot** — deployed in a limited pilot or proof of concept.
37+
- **Evaluating** — under active evaluation.
38+
39+
<!--
40+
Example row:
41+
42+
| Example Bank | Tokenized deposits on Fabric | Pilot | https://example.org/press/tokenized-deposit-pilot |
43+
-->
44+
45+
[lfdt-consistency]: https://github.com/LF-Decentralized-Trust/governance/blob/main/tac/guidelines/project-consistency-guidelines.md

CODE_OF_CONDUCT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Code of Conduct Guidelines
22
==========================
33

4-
Please review the Hyperledger [Code of Conduct](https://www.lfdecentralizedtrust.org/code-of-conduct)
4+
Please review the LF Decentralized Trust [Code of Conduct](https://www.lfdecentralizedtrust.org/code-of-conduct)
55
before participating. It is important that we keep things civil.
66

77
<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.

MAINTAINERS.md

Lines changed: 82 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,91 @@
1-
Maintainers
2-
===========
1+
[//]: # (SPDX-License-Identifier: CC-BY-4.0)
32

4-
**Active Maintainers**
3+
# Maintainers
54

6-
| Name | GitHub | Chat | email |
7-
|--------------------|--------------------------------------|-------------|-----------------------------|
8-
| Angelo De Caro | [adecaro][adecaro] | adecaro | <adc@zurich.ibm.com> |
9-
| Kaoutar Elkhiyaoui | [KElkhiyaoui][KElkhiyaoui] | KElkhiyaoui | <kao@zurich.ibm.com> |
10-
| Arne Rutjes | [arner][arner] | arner | <arne.rutjesISC@nl.ibm.com> |
11-
| Alexandros Filios | [alexandrosfilios][alexandrosfilios] | lio | <alexandros.filios@alumni.ethz.ch> |
12-
| Akram Bitar | [AkramBitar][AkramBitar] | akrambitar | <akram@il.ibm.com> |
5+
Changes to either list below are made by pull request against this file. After such a pull request
6+
is merged, the corresponding GitHub team (`panurus-maintainers`) must be updated manually to match.
137

14-
**Emeritus Maintainers**
8+
## Active Maintainers
159

16-
| Name | GitHub | Chat | email
17-
|------|--------|------|----------------------
18-
| Alessandro Sorniotti | [ale-linux][ale-linux] | aso | <ale.linux@sopit.net>
19-
| Elli Androulaki | [elli-androulaki][elli-androulaki] | elli-androulaki | <lli@zurich.ibm.com>
20-
| Mathilde Ffrench | [mffrench][mffrench] | mffrench | <mathilde.ffrench@fr.ibm.com>
10+
| Name | GitHub ID | Scope | LFID | Discord ID | Email | Company Affiliation |
11+
|------|-----------|-------|------|------------|-------|---------------------|
12+
| Angelo De Caro | [adecaro][adecaro] | Maintainer | | adecaro | <adc@zurich.ibm.com> | IBM |
13+
| Kaoutar Elkhiyaoui | [KElkhiyaoui][KElkhiyaoui] | Maintainer | | KElkhiyaoui | <kao@zurich.ibm.com> | IBM |
14+
| Arne Rutjes | [arner][arner] | Maintainer | | arner | <arne.rutjesISC@nl.ibm.com> | IBM |
15+
| Alexandros Filios | [alexandrosfilios][alexandrosfilios] | Maintainer | | lio | <alexandros.filios@alumni.ethz.ch> | Independent |
16+
| Akram Bitar | [AkramBitar][AkramBitar] | Maintainer | | akrambitar | <akram@il.ibm.com> | IBM |
17+
18+
## Emeritus Maintainers
19+
20+
| Name | GitHub ID | Scope | LFID | Discord ID | Email | Company Affiliation |
21+
|------|-----------|-------|------|------------|-------|---------------------|
22+
| Alessandro Sorniotti | [ale-linux][ale-linux] | Maintainer | | aso | <ale.linux@sopit.net> | IBM |
23+
| Elli Androulaki | [elli-androulaki][elli-androulaki] | Maintainer | | elli-androulaki | <lli@zurich.ibm.com> | IBM |
24+
| Mathilde Ffrench | [mffrench][mffrench] | Maintainer | | mffrench | <mathilde.ffrench@fr.ibm.com> | IBM |
25+
26+
## Scopes
27+
28+
Panurus uses a single maintainer scope covering the whole repository.
29+
30+
| Scope | Definition | GitHub Role | GitHub Team |
31+
|-------|------------|-------------|-------------|
32+
| Maintainer | Maintainer for the entire repository | Maintain | `panurus-maintainers` |
33+
34+
## Maintainer Duties
35+
36+
Maintainers are expected to:
37+
38+
- Review and merge pull requests, and keep CI green.
39+
- Triage incoming issues.
40+
- Participate in project calls and technical discussions.
41+
- Contribute to the mid-year project update and annual review filed with the LFDT TAC.
42+
- Mentor contributors working toward maintainership.
43+
44+
Members of the security team carry the additional responsibilities described in
45+
[SECURITY.md](SECURITY.md).
46+
47+
## How to Become a Maintainer
48+
49+
Candidates for maintainership are expected to have:
50+
51+
- a sustained history of substantive contributions to Panurus — code, review, documentation, or
52+
release engineering,
53+
- demonstrated good judgement in code review, and
54+
- familiarity with the project's architecture and contribution process
55+
(see [CONTRIBUTING.md](CONTRIBUTING.md)).
56+
57+
The process is:
58+
59+
1. An existing active maintainer sponsors the candidate.
60+
2. The sponsor opens a pull request adding the candidate to the **Active Maintainers** table above,
61+
with a justification in the pull request description summarising the candidate's contributions.
62+
3. Current active maintainers have **two weeks** to review and raise objections.
63+
4. Approval requires a majority of active maintainers, with no sustained objection.
64+
5. Once merged, the `panurus-maintainers` GitHub team is updated to grant access.
65+
66+
An emeritus maintainer may return to active status by the same process, without requiring a new
67+
sponsor.
68+
69+
## How Maintainers are Removed or Moved to Emeritus Status
70+
71+
A maintainer may be moved to emeritus status:
72+
73+
- **At their own request** — open a pull request moving your row to the **Emeritus Maintainers**
74+
table. This needs no further approval.
75+
- **Through inactivity** — a maintainer with no meaningful contribution or review activity for
76+
**twelve months** may be proposed for emeritus status.
77+
- **For conduct** — a violation of the [Code of Conduct](CODE_OF_CONDUCT.md) may result in removal.
78+
79+
Proposals follow the same path as additions: a pull request against this file with a justification,
80+
a two-week comment window, and approval by a majority of active maintainers. Moving to emeritus
81+
status is not a judgement on past contributions; it reflects current activity, and the door back is
82+
described above.
2183

22-
[elli-androulaki]: https://github.com/elli-androulaki
2384
[adecaro]: https://github.com/adecaro
2485
[KElkhiyaoui]: https://github.com/KElkhiyaoui
25-
[mffrench]: https://github.com/mffrench
26-
[ale-linux]: https://github.com/ale-linux
2786
[arner]: https://github.com/arner
2887
[alexandrosfilios]: https://github.com/alexandrosfilios
29-
[AkramBitar]: https://github.com/AkramBitar
88+
[AkramBitar]: https://github.com/AkramBitar
89+
[ale-linux]: https://github.com/ale-linux
90+
[elli-androulaki]: https://github.com/elli-androulaki
91+
[mffrench]: https://github.com/mffrench

0 commit comments

Comments
 (0)