Skip to content

remove unused parameters from config block#113

Merged
tock-ibm merged 2 commits into
hyperledger:mainfrom
cendhu:rm-para-config-block
May 13, 2026
Merged

remove unused parameters from config block#113
tock-ibm merged 2 commits into
hyperledger:mainfrom
cendhu:rm-para-config-block

Conversation

@cendhu

@cendhu cendhu commented May 12, 2026

Copy link
Copy Markdown
Contributor

Type of change

  • Improvement (improvement to code, performance, etc)

Description

Remove legacy Fabric ACLs and no-capability gates

  • drop lifecycle, lscc, and legacy default ACL resources
  • remove sample config capabilities and ACL entries
  • allow Fabric-X configs without capabilities
  • use consensus type instead of capabilities for BFT handling
  • update tests for no-capability Fabric-X baseline

Additional details (Optional)

Related issues

@cendhu cendhu force-pushed the rm-para-config-block branch from 669b89d to 4dd70d8 Compare May 12, 2026 07:28
@coveralls

coveralls commented May 12, 2026

Copy link
Copy Markdown

Coverage Status

coverage: 82.684% (+0.3%) from 82.408% — cendhu:rm-para-config-block into hyperledger:main

Signed-off-by: Senthilnathan <cendhu@gmail.com>
@cendhu cendhu force-pushed the rm-para-config-block branch from 4dd70d8 to d971c17 Compare May 12, 2026 07:41
@cendhu cendhu requested review from liran-funaro and tock-ibm May 12, 2026 07:46

@liran-funaro liran-funaro left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. @tock-ibm should also review.
I'm only worried that removing the ACL will remove the only reference we have for the upcoming ACL work. But we can always look it up in Fabric.

@cendhu

cendhu commented May 12, 2026

Copy link
Copy Markdown
Contributor Author

LGTM. @tock-ibm should also review. I'm only worried that removing the ACL will remove the only reference we have for the upcoming ACL work. But we can always look it up in Fabric.

Yes, we can refer the Fabric code. This PR retains the ACL core library and removes only the usage.

}

bftEnabled := bundle.ChannelConfig().Capabilities().ConsensusTypeBFT()
cfg, ok := bundle.OrdererConfig()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

check the ok and if it is false emit an error like in the original code err := errors.New("no orderer section in config block")

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed. Added ok check — returns error "no orderer section in config block" when OrdererConfig() returns false. See e4a448f.

Comment thread tools/configtxgen/encoder.go Outdated
Comment on lines 188 to 190
if len(conf.Addresses) > 0 && channelCapabilities["V3_0"] {
return nil, errors.Errorf("global orderer endpoints exist, but can not be used with V3_0 capability: %v", conf.Addresses)
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

remove this V3_0 check as well, make sure there are no global endpoints regardless

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed. Removed V3_0 capability check — global orderer endpoints are now rejected unconditionally. Also removed V3_0 gating in NewOrdererOrgGroup — missing org endpoints are now always an error. Kept channelCapabilities parameter in both signatures for future reuse. See e4a448f.

cendhu added a commit to cendhu/fabric-x-common that referenced this pull request May 13, 2026
- Check ok from OrdererConfig() and return error when false
  ('no orderer section in config block')
- Remove V3_0 capability gating: reject global orderer endpoints
  unconditionally in NewOrdererGroup
- Remove V3_0 capability gating: require org endpoints unconditionally
  in NewOrdererOrgGroup
- Keep channelCapabilities parameter for future reuse
- Update tests for new unconditional validation behavior

Signed-off-by: Senthilnathan <cendhu@gmail.com>
- Check ok from OrdererConfig() and return error when false
  ('no orderer section in config block')
- Remove V3_0 capability gating: reject global orderer endpoints
  unconditionally in NewOrdererGroup
- Remove V3_0 capability gating: require org endpoints unconditionally
  in NewOrdererOrgGroup
- Keep channelCapabilities parameter for future reuse
- Update tests for new unconditional validation behavior

Signed-off-by: Senthilnathan <cendhu@gmail.com>
@cendhu cendhu force-pushed the rm-para-config-block branch from e4a448f to 85447af Compare May 13, 2026 09:19
@tock-ibm tock-ibm merged commit c948ab2 into hyperledger:main May 13, 2026
6 checks passed
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.

remove irrelevant config parameter from configtx.yaml

4 participants