Skip to content

fix: auto-fill chaincode sequence with default value of 1#784

Open
khanak0509 wants to merge 22 commits into
hyperledger-cello:mainfrom
khanak0509:feature/chaincode-sequence-autofill
Open

fix: auto-fill chaincode sequence with default value of 1#784
khanak0509 wants to merge 22 commits into
hyperledger-cello:mainfrom
khanak0509:feature/chaincode-sequence-autofill

Conversation

@khanak0509
Copy link
Copy Markdown

Fixes #769

When creating a chaincode, the sequence is always 1 for a brand new chaincode. There's no reason to ask users to manually type it every time - it just adds unnecessary friction and room for mistakes.
This PR removes the sequence input from the upload form in the dashboard and defaults it to 1
automatically across the backend.

changes -
•src/dashboard/src/pages/ChainCode/forms/UploadForm.js - removed the sequence
InputNumber field from the chaincode creation form

• src/api-engine/chaincode/models.py -added default=1 to the sequence field on the
Chaincode model

• src/api-engine/chaincode/serializers.py - marked sequence as not required and
defaulted to 1 in ChaincodeCreateBody

• src/agents/hyperledger-fabric/chaincode/serializers.py - same change in
ChaincodeCreationSerializer

Copilot AI review requested due to automatic review settings May 9, 2026 15:05
@khanak0509 khanak0509 force-pushed the feature/chaincode-sequence-autofill branch from ba81764 to 7571476 Compare May 9, 2026 15:09
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@yeasy yeasy requested review from YoungHypo and dodo920306 May 10, 2026 17:13
YoungHypo and others added 18 commits May 10, 2026 23:17
…t Dockerfile

The agent Dockerfile hardcoded linux-amd64 for the Fabric binary download,
causing cryptogen to crash with SIGTRAP on ARM64 hosts (e.g., Apple Silicon).

- Use dpkg --print-architecture for reliable arch detection
- Fail build on unsupported architectures instead of silently defaulting to amd64
- Add curl --fail flag to catch HTTP errors early

Signed-off-by: haibo <haibo942us@gmail.com>
Signed-off-by: khanak0509 <kkhanak512@gmail.com>
Signed-off-by: khanak0509 <kkhanak512@gmail.com>
Signed-off-by: khanak0509 <kkhanak512@gmail.com>
Some info of the postman collection is unnecessary for
the newman test, so they shouldn't be pushed on Git.

Signed-off-by: dodo920306 <dodo920306@gmail.com>
Signed-off-by: khanak0509 <kkhanak512@gmail.com>
Signed-off-by: dodo920306 <dodo920306@gmail.com>
Signed-off-by: khanak0509 <kkhanak512@gmail.com>
Signed-off-by: dodo920306 <dodo920306@gmail.com>
Signed-off-by: khanak0509 <kkhanak512@gmail.com>
The pipeline names can be more specific about their
actual purposes.

Signed-off-by: dodo920306 <dodo920306@gmail.com>
Signed-off-by: khanak0509 <kkhanak512@gmail.com>
Rename workflow files according to their new action name.

Signed-off-by: dodo920306 <dodo920306@gmail.com>
Signed-off-by: khanak0509 <kkhanak512@gmail.com>
Signed-off-by: dodo920306 <dodo920306@gmail.com>
Signed-off-by: khanak0509 <kkhanak512@gmail.com>
Signed-off-by: dodo920306 <dodo920306@gmail.com>
Signed-off-by: khanak0509 <kkhanak512@gmail.com>
Signed-off-by: dodo920306 <dodo920306@gmail.com>
Signed-off-by: khanak0509 <kkhanak512@gmail.com>
Signed-off-by: dodo920306 <dodo920306@gmail.com>
Signed-off-by: khanak0509 <kkhanak512@gmail.com>
Signed-off-by: dodo920306 <dodo920306@gmail.com>
Signed-off-by: khanak0509 <kkhanak512@gmail.com>
In order to use the latest docker (29+), Hyperledger Fabric
used in this project is bumped to 2.5.15

Signed-off-by: dodo920306 <dodo920306@gmail.com>
Signed-off-by: khanak0509 <kkhanak512@gmail.com>
Signed-off-by: dodo920306 <dodo920306@gmail.com>
Signed-off-by: khanak0509 <kkhanak512@gmail.com>
Signed-off-by: dodo920306 <dodo920306@gmail.com>
Signed-off-by: khanak0509 <kkhanak512@gmail.com>
Signed-off-by: dodo920306 <dodo920306@gmail.com>
Signed-off-by: khanak0509 <kkhanak512@gmail.com>
Signed-off-by: dodo920306 <dodo920306@gmail.com>
Signed-off-by: khanak0509 <kkhanak512@gmail.com>
Since the postman delay API only allows clients to delay
for at most 10 seconds, the expected 60 seconds delay
is unavailable. Thus, the maximum retry time is increased
from 5 to 30 to still keep waiting for 5 minutes for the
chaincode to be installed and approved.

Signed-off-by: dodo920306 <dodo920306@gmail.com>
Signed-off-by: khanak0509 <kkhanak512@gmail.com>
Signed-off-by: dodo920306 <dodo920306@gmail.com>
Signed-off-by: khanak0509 <kkhanak512@gmail.com>
Signed-off-by: dodo920306 <dodo920306@gmail.com>
Signed-off-by: khanak0509 <kkhanak512@gmail.com>
@khanak0509 khanak0509 force-pushed the feature/chaincode-sequence-autofill branch from 58f9d43 to 9adc1fe Compare May 10, 2026 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Todo: Chaincode Sequence auto-fill

4 participants