Skip to content

Conversation

@liran-funaro
Copy link
Contributor

@liran-funaro liran-funaro commented Dec 18, 2025

Type of change

  • New feature
  • Improvement (improvement to code, performance, etc)

Description

  • Introduce support for MSP load generation

Additional Info

Following is the micro benchmark for endorsing and verifying with the MSP using 3 peer organizations.

goos: linux
goarch: amd64
pkg: github.com/hyperledger/fabric-x-committer/utils/signature/sigtest
cpu: Intel(R) Core(TM) i9-14900K

BenchmarkDigest-32    			  466413	      2487 ns/op	402,091 TX/sec

BenchmarkSign/ECDSA-32         	   50209	     22191 ns/op	 45,063 TX/sec
BenchmarkSign/BLS-32           	   17622	     67974 ns/op	 14,712 TX/sec
BenchmarkSign/EDDSA-32         	   73783	     14747 ns/op	 67,810 TX/sec
BenchmarkSign/MSP-32           	   17944	     63762 ns/op	 15,683 TX/sec

BenchmarkVerify/ECDSA-32       	   25924	     44132 ns/op	 22,659 TX/sec
BenchmarkVerify/BLS-32         	    2367	    474782 ns/op	  2,106 TX/sec
BenchmarkVerify/EDDSA-32       	   40964	     28859 ns/op	 34,651 TX/sec
BenchmarkVerify/MSP-32         	    8385	    138661 ns/op	  7,212 TX/sec

Related issues


// PeerOrganizationCount may specify the number of peer organizations to generate if the CryptoMaterialPath
// is not provided.
PeerOrganizationCount uint32 `mapstructure:"peer-organization-count"`
Copy link
Contributor

Choose a reason for hiding this comment

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

I just realized that CreateConfigBlockWithCrypto always uses TwoOrgsSampleFabricX profile. What does 4 peer organization count means in two org profile?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is nothing special about TwoOrgsSampleFabricX.
We need a sample that has the following main ingredients.

    SomeSample:
        <<: *ChannelDefaults
        Orderer:
            <<: *OrdererDefaults
            OrdererType: arma
            Organizations:
                - <<: *SomeOrg
        Application: *ApplicationDefaults

We need at least one organization as a template org to create all the organizations. Currently, we use the first Orderer-organization.
So a sample with no Application-organizations will also work fine.
The alternative is to use the default value for everything (from the sample file) and let the user specify the template organization to use from the sample file.
This can improve clarity as to what is taken from the sample file.
This CreateDefaultConfigBlockWithCrypto() method (from the common repo) is already tailored for Fabric-X, so it would be a stretch to use ARMA's and the scalable-committer's default value.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see. It is good to be clear about what is being used from the sample file. I admit I’ve forgotten why TwoOrgsSampleFabricX is used here, given I reviewed the PR that handled crypto material creation along with the config block before vacation.

MetaNamespaceVerificationKey: metaPolicy.GetThresholdRule().GetPublicKey(),
OrdererEndpoints: policy.OrdererEndpoints,
ChannelID: policy.ChannelID,
PeerOrganizationCount: policy.PeerOrganizationCount,
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the relation between TwoOrgsProfile and PeerOrganizationCount?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Using TwoOrgsProfile does not affect the number of peer organizations that will be created. It is only decided by PeerOrganizationCount.

Copy link
Contributor

@cendhu cendhu left a comment

Choose a reason for hiding this comment

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

LGTM.

@cendhu cendhu merged commit 02c14ea into hyperledger:main Jan 7, 2026
12 checks passed
@liran-funaro liran-funaro deleted the loadgen-msp-crypto branch January 7, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[loadgen] Use MSP to sign transactions

2 participants