Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiple peer client support #10

Merged
merged 1 commit into from
Jun 10, 2020

Conversation

SamYuan1990
Copy link
Member

@SamYuan1990 SamYuan1990 commented Mar 16, 2020

support multiple peer client as endorsement police "org1 and org2"

@SamYuan1990
Copy link
Member Author

go run main.go config.json 100
Start sending transactions...

Time 0.18s Block 54 Tx 10
Time 0.20s Block 55 Tx 10
Time 0.24s Block 56 Tx 10
Time 0.26s Block 57 Tx 10
Time 0.27s Block 58 Tx 10
Time 0.30s Block 59 Tx 10
Time 0.32s Block 60 Tx 10
Time 0.34s Block 61 Tx 10
Time 0.35s Block 62 Tx 10
Time 0.37s Block 63 Tx 10
tx: 100, duration: 365.319234ms, tps: 273.733192

infra/client.go Outdated Show resolved Hide resolved
@SamYuan1990
Copy link
Member Author

SamYuan1990 commented Mar 18, 2020

@guoger , please help check pipeline error
seems due to go.mod?
and btw, refactored with better tps~
in fact, making my local fabric hang up...

Copy link
Member

@guoger guoger left a comment

Choose a reason for hiding this comment

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

Looks much simpler than previous iteration, thx

pls remove unneeded code

infra/proposer.go Outdated Show resolved Hide resolved
infra/proposer.go Show resolved Hide resolved
infra/assembler.go Outdated Show resolved Hide resolved
infra/assembler.go Show resolved Hide resolved
infra/client.go Outdated Show resolved Hide resolved
infra/proposer.go Outdated Show resolved Hide resolved
config.json Outdated Show resolved Hide resolved
infra/proposal.go Outdated Show resolved Hide resolved
infra/proposer.go Outdated Show resolved Hide resolved
@SamYuan1990 SamYuan1990 changed the title Full parallel multiple peer client support Mar 21, 2020
infra/assembler.go Outdated Show resolved Hide resolved
Copy link
Member

@guoger guoger left a comment

Choose a reason for hiding this comment

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

as i commented inline, we need to supply correct crypto materials (priv_key, certificate, etc) for different peers. As code currently stands, it would fail to establish tls connections

infra/proposer.go Show resolved Hide resolved
@guoger
Copy link
Member

guoger commented Jun 7, 2020

also, i believe i've fixed azure pipeline. pls do a rebase

Copy link
Member

@guoger guoger left a comment

Choose a reason for hiding this comment

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

other than several nits in code, i'm seeing ~25% performance regression.. i suspect that's caused by excessive lock/unlock... need more proofs though

infra/proposer.go Outdated Show resolved Hide resolved
infra/proposer.go Show resolved Hide resolved
infra/proposer.go Outdated Show resolved Hide resolved
infra/proposer.go Outdated Show resolved Hide resolved
infra/proposer.go Outdated Show resolved Hide resolved
Copy link
Member

@guoger guoger left a comment

Choose a reason for hiding this comment

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

LGTM

although it's rather confusing to have both config.json and config_sample.json with almost identical content..

"version": "",
"args": ["query","a"],
"mspid": "Org1MSP",
"private_key": "./crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/keystore/4d75bedcf454389483dfe0efbf12602b64d8c0e2903451c688b1d5d9ba38e655_sk",
Copy link
Member

Choose a reason for hiding this comment

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

in newer fabric, private key file is renamed to priv_sk (which is quite convenient for us)

@guoger guoger merged commit 55b753b into Hyperledger-TWGC:master Jun 10, 2020
@SamYuan1990 SamYuan1990 deleted the full_parallel branch August 4, 2020 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants