Skip to content

fix block validation policy encoding for arma#107

Merged
tock-ibm merged 2 commits into
hyperledger:mainfrom
moradna:fix-block-verification-policy-orderer
Apr 26, 2026
Merged

fix block validation policy encoding for arma#107
tock-ibm merged 2 commits into
hyperledger:mainfrom
moradna:fix-block-verification-policy-orderer

Conversation

@moradna

@moradna moradna commented Apr 26, 2026

Copy link
Copy Markdown
Contributor

Type of change

  • Bug fix

Description

  • Fix block validation policy for arma by encoding it from the consenter set.
  • Fix minor typo.

Related issues

Signed-off-by: Natalie Morad <natalie.morad@ibm.com>
@coveralls

coveralls commented Apr 26, 2026

Copy link
Copy Markdown

Coverage Status

coverage: 82.378% (-0.004%) from 82.382% — moradna:fix-block-verification-policy-orderer into hyperledger:main

@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. Only minor comments.

Comment thread sampleconfig/configtx.yaml Outdated
Rule: MAJORITY Admins
# BlockValidation specifies what signatures must be included in the block
# from the orderer for the peer to validate it.
# For BFT-based orderers, BlockValidation is defined by the consenter set.

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.

Suggested change
# For BFT-based orderers, BlockValidation is defined by the consenter set.
# For BFT-based orderers, BlockValidation is defined automatically by the consenter set.

# For this end, an orderer endpoints may contain the following fields:
# - host (required) the party's host.
# - port (required) the party's post.
# - port (required) the party's port.

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.

nice catch

consenterProtos, err := consenterProtosFromConfig(conf.ConsenterMapping)
if err != nil {
return nil, errors.Errorf("cannot load consenter config for orderer type %s: %s", ConsensusTypeBFT, err)
return nil, errors.Errorf("cannot load consenter config for orderer type %s: %s", ConsensusTypeArma, err)

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.

nice catch

Comment on lines 749 to -754
Policies:
<<: *DefaultOrdererPolicies
# We require MAJORITY for BFT.
BlockValidation:
Type: ImplicitMeta
Rule: MAJORITY Writers

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.

No need for the <<:. Can be converted to

Policies: *DefaultOrdererPolicies

Signed-off-by: Natalie Morad <natalie.morad@ibm.com>
@tock-ibm tock-ibm merged commit d5be85e into hyperledger:main Apr 26, 2026
7 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.

Encode BFT BlockValidation policy for Arma

4 participants