Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
102 changes: 102 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: Bug Report
description: Create a report to help us improve.
title: "[BUG]: <short-description>"
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
## Thanks for submitting a bug report! 😊

Before submitting, please:
1. **Search existing issues** to see if your issue has already been reported.
2. **Consult the Resources**:
- [Documentation Overview](https://github.com/hyperledger-labs/fabric-token-sdk/blob/main/docs/README.md)
- [Development Guidelines](https://github.com/hyperledger-labs/fabric-token-sdk/blob/main/docs/development/development.md)
- [Testing Guide](https://github.com/hyperledger-labs/fabric-token-sdk/blob/main/docs/development/testing.md)
3. **Join [Hyperledger Discord](https://discord.gg/hyperledger)** and ask in the `#fabric-token-sdk` channel if you're unsure.

---

- type: textarea
id: description
attributes:
label: 👾 Description
description: What happened and what did you expect to happen?
validations:
required: true

- type: textarea
id: reproduce
attributes:
label: 🛠️ Steps to reproduce
description: Steps to reproduce the behavior.
placeholder: |
1. Setup the network with `make ...`
2. Run the command `tokengen ...`
3. See error: `...`
validations:
required: true

- type: textarea
id: logs
attributes:
label: 📋 Logs and Screenshots
description: Attach any logs or screenshots relevant to the problem.
placeholder: |
```bash
# Paste relevant logs here
```
validations:
required: false

- type: dropdown
id: network
attributes:
label: 🌐 Network Environment
description: Which network environment did the issue occur on?
options:
- Local (NWO / Integration Test)
- Fabric
- FabricX
- Other
validations:
required: true

- type: input
id: sdk-version
attributes:
label: 📦 Fabric Token SDK Version
description: Which version or commit hash are you using?
placeholder: e.g. v1.0.0 or 5a3f2b1
validations:
required: true

- type: input
id: go-version
attributes:
label: 🐹 Go Version
description: Output of `go version`.
placeholder: e.g. go1.22.2 darwin/arm64
validations:
required: true

- type: dropdown
id: os
attributes:
label: 💻 Operating System
description: Which OS did the issue occur on?
options:
- Linux (Ubuntu/Debian)
- Linux (Other)
- macOS
- Windows (WSL2)
- Other
validations:
required: true

- type: textarea
id: additional
attributes:
label: ➕ Additional context
description: Add any other context about the problem here.
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: true
contact_links:
- name: Hyperledger Discord
url: https://discord.gg/hyperledger
about: Join the #fabric-token-sdk channel for real-time discussion.
- name: Documentation
url: https://github.com/hyperledger-labs/fabric-token-sdk/blob/main/docs/README.md
about: Read the official documentation.
53 changes: 53 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Feature
description: Suggest an idea for this project
labels: [enhancement]
body:
- type: markdown
attributes:
value: |
## Thanks for submitting a feature request! 😊

Before submitting:
* **Search existing issues** and discussions to see if something similar has been discussed previously.
* **Consult the Resources**:
- [Documentation Overview](https://github.com/hyperledger-labs/fabric-token-sdk/blob/main/docs/README.md)
- [Development Guidelines](https://github.com/hyperledger-labs/fabric-token-sdk/blob/main/docs/development/development.md)
- [Testing Guide](https://github.com/hyperledger-labs/fabric-token-sdk/blob/main/docs/development/testing.md)
* **Consider opening a GitHub discussion** first to gather feedback and reach consensus.
* If this is a major architectural change, please provide as much detail as possible.

---

- type: textarea
id: problem
attributes:
label: Problem
description: What is the problem you are trying to solve?
placeholder: I'm always frustrated when ...
validations:
required: true

- type: textarea
id: solution
attributes:
label: Solution
description: What solution do you propose to solve the problem?
placeholder: |
- Add a config property
- Change the schema
- ...
validations:
required: true

- type: textarea
id: alternatives
attributes:
label: Alternatives
description: What alternative solutions have you considered?
placeholder: I considered using ... but ...

- type: textarea
id: additional
attributes:
label: Additional Context
description: Add any other context or screenshots about the feature request here.
134 changes: 134 additions & 0 deletions .github/ISSUE_TEMPLATE/good_first_issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
name: Good First Issue
description: Create a Good First Issue for new contributors
title: "[Good First Issue]: "
labels: ["good first issue"]
assignees: []
body:
- type: markdown
attributes:
value: |
---
## **Thanks for creating a good first issue!** 😊

We truly appreciate your time and effort. This template helps create a **Good First Issue (GFI)**: a small, well-scoped task that helps new contributors learn the codebase and workflow.
---

- type: textarea
id: intro
attributes:
label: 🆕🐥 Newcomer Friendly
description: Who is this issue for?
value: |
This **[Good First Issue](https://github.com/hyperledger-labs/fabric-token-sdk/issues?q=is%3Aissue%20state%3Aopen%20label%3A%22good%20first%20issue%22)** is a guided, well-scoped task intended for new human contributors to the Fabric Token SDK.

#### What you’ll do
- ✅ Understand the project structure
- ✅ Practice the standard Hyperledger contribution workflow
- ✅ Submit and merge your first Pull Request

#### Support
A maintainer or mentor actively monitors this issue and will help **guide it to completion**.

> [!IMPORTANT]
> **This issue does not require deep blockchain knowledge.**
> - No prior Hyperledger Fabric experience needed
> - **Basic Go and Git are sufficient**

> [!NOTE]
> ⏱️ **Typical time to complete:** 30–90 minutes (once setup is done)
> 🧩 **Difficulty:** Small, well-contained change
> 🎓 **Best for:** New contributors

- type: textarea
id: issue
attributes:
label: 👾 Issue description
description: |
Describe the issue clearly. Explain why this change is useful.
Avoid jargon where possible. Links to code are very welcome.
placeholder: |
Describe the problem here...
validations:
required: true

- type: textarea
id: solution
attributes:
label: 💡 Proposed Solution
description: Describe what a good solution looks like at a high level.
placeholder: |
Briefly explain the fix...
validations:
required: true

- type: textarea
id: implementation
attributes:
label: 🛠️ Implementation Steps
description: |
Provide guided steps to help the contributor:
- Which files to change
- Which functions are involved
- Expected output/result
value: |
- [ ] Step 1: ...
- [ ] Step 2: ...
- [ ] Step 3: Verify with `make unit-tests`
validations:
required: true

- type: textarea
id: setup_guide
attributes:
label: 📋 Setup Guide
description: Quick links for setting up the environment.
value: |
#### Setup the Fabric Token SDK
- [ ] **Fork & Clone**: Follow the [Contributing Guide](https://github.com/hyperledger-labs/fabric-token-sdk/blob/main/CONTRIBUTING.md)
- [ ] **Install Tools**: Run `make install-tools`
validations:
required: true

- type: textarea
id: contribution_workflow
attributes:
label: 📋 Contribution Workflow
description: Step-by-step for new contributors.
value: |
- [ ] **Claim the issue**: Comment "I would like to work on this" to be assigned.
- [ ] **Create a branch**: `git checkout -b feature/my-fix`
- [ ] **Implement & Test**: Run `make unit-tests` or specific integration tests.
- [ ] **Commit with DCO**: Use `git commit -s -m "feat: description"` (The `-s` is mandatory).
- [ ] **Push & PR**: Push to your fork and open a Pull Request.
validations:
required: true

- type: textarea
id: acceptance_criteria
attributes:
label: ✅ Acceptance Criteria
value: |
- [ ] The issue is solved as described.
- [ ] Unit tests pass (`make unit-tests`, `make unit-tests-race`, and `make unit-tests-regression`).
- [ ] Linting passes (`make lint` and `make checks`).
- [ ] Commits are signed off (`-s`).
validations:
required: true

- type: textarea
id: getting_help
attributes:
label: 🧭 Getting Help
value: |
If you get stuck, don't hesitate to ask!
- Comment on this issue.
- Join us on **Discord**: [#fabric-token-sdk](https://discord.gg/hyperledger)

- type: markdown
attributes:
value: |
---
### 📚 Useful Resources
- [Documentation Overview](https://github.com/hyperledger-labs/fabric-token-sdk/blob/main/docs/README.md)
- [Development Guidelines](https://github.com/hyperledger-labs/fabric-token-sdk/blob/main/docs/development/development.md)
- [Testing Guide](https://github.com/hyperledger-labs/fabric-token-sdk/blob/main/docs/development/testing.md)
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v8
with:
version: v2.10.1
version: v2.11.4
args: --timeout=30m
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ go.work
go.work.sum
fabric-samples/
fabric-smart-client/
/.bob/
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ lint-auto-fix:
# install golangci-lint
install-linter-tool:
@echo "Installing golangci Linter"
@curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $(HOME)/go/bin v2.10.1
@curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $(HOME)/go/bin v2.11.4

.PHONY: fmt
fmt: ## Run gofmt on the entire project
Expand Down
8 changes: 6 additions & 2 deletions cmd/tokengen/cobra/certfier/keypairgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ func keyPairGen() error {
if err != nil {
return errors.Wrapf(err, "failed unmarshalling public parameters loaded from [%s], len [%d]", ppPath, len(ppRaw))
}
err = pp.Validate()
if err != nil {
return errors.Wrapf(err, "failed validating public parameters loaded from [%s]", ppPath)
}
ppm, err := s.NewPublicParametersManager(pp)
if err != nil {
return errors.Wrapf(err, "failed instantiating public parameters manager")
Expand All @@ -91,10 +95,10 @@ func keyPairGen() error {
skPath := filepath.Join(output, "certifier.sk")
pkPath := filepath.Join(output, "certifier.pk")
fmt.Printf("Store key-pair to [%s,%s]...\n", skPath, pkPath)
if err := os.WriteFile(skPath, skRaw, 0600); err != nil {
if err := os.WriteFile(skPath, skRaw, 0600); err != nil { //nolint:gosec
return errors.Wrap(err, "failed writing certifier secret key to file")
}
if err := os.WriteFile(pkPath, pkRaw, 0600); err != nil {
if err := os.WriteFile(pkPath, pkRaw, 0600); err != nil { //nolint:gosec
return errors.Wrap(err, "failed writing certifier public key to file")
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/tokengen/cobra/pp/zkatdlognoghv1/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func Update(args *UpdateArgs) error {
if _, err := os.Stat(path); err == nil {
return errors.Errorf("%s exists in current directory. Specify another output folder with -o", fileName)
}
if err := os.WriteFile(path, raw, 0755); err != nil {
if err := os.WriteFile(path, raw, 0755); err != nil { //nolint:gosec
return errors.Wrap(err, "failed writing public parameters to file")
}

Expand Down
2 changes: 1 addition & 1 deletion docs/development/tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Reference: https://golangci-lint.run
Installation:
```bash
# binary will be $(go env GOPATH)/bin/golangci-lint
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.1.6
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.11.4

golangci-lint --version
```
Expand Down
Loading