Skip to content

Instantly share code, notes, and snippets.

@minyk
Last active September 4, 2018 08:31
Show Gist options
  • Save minyk/9badd004296dfc66074b546e5e0f0325 to your computer and use it in GitHub Desktop.
Save minyk/9badd004296dfc66074b546e5e0f0325 to your computer and use it in GitHub Desktop.
HL Fabric block data fetch with cendhu/fetch-block

build

  • Get source
$ go get -u github.com/cendhu/fetch-block
  • Get govendor
$ go get -u github.com/kardianos/govendor
  • build
$ cd $GOPATH/src/github.com/cendhu/fetch-block/src
$ make

Edit config

  • Edit config.yaml for peer, msp, tls
peer:
    #id denotes the name of peer
    id: peer0
    #event-address denotes the ipaddress-of-peer:eventPort.
    #Each peer's eventhub listen on port 7053 which is the default
    #port given in fabric/sampleconfig/core.yaml
    event-address: peer0.org1.example.com:7053
msp:
    #path contains the absolute path to the msp configuration files such
    #as key, cacerts, rootcerts. For dev mode, use peer0-msp-for-dev
    path: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/[email protected]/msp
    #localMspId denotes the MSP identity. For dev mode, use DEFAULT instead
    #of Org0MSP
    localMspId: Org1MSP
tls:
    #disable tls for dev mode
    enabled: false
    cert:
        file: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/[email protected]/tls/server.crt
    key:
        file: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/[email protected]/tls/server.key
    rootcert:
        file: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/[email protected]/tls/ca.crt
    serverhostoverride: peer0
log:
    event: true
    block: true
    blockperf: true

Run

  • Run fetchBlock
$ ./fetchBlock
Enter experiment name (creates folder of this name in working dir):
  • input directory name for saving data. ex: test
  • Running like this:
Peer Event Address: peer0.org1.example.com:7053
Local MSP Directory: /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/[email protected]/msp
Local MSP ID: Org1MSP
Log:
  Event: true
  Block: true
  Blockperf: true
Starting Client
Listening for the event...

Got a block. Processing.
Received Block [1] from ChannelId [mychannel]Got a block. Processing.
Received Block [2] from ChannelId [mychannel]
  • The fetcher listen from event address, make some actions(invoke) with chaincodes.
  • Block data gathered into test like this:
$  ls -la test/
total 108
drwxr-xr-x  7 root root   224 Sep  4 08:07 .
drwxr-xr-x 13 root root   416 Sep  4 08:19 ..
-rw-r--r--  1 root root 34273 Sep  4 08:07 mychannel_blk#1.json
-rw-r--r--  1 root root 33951 Sep  4 08:07 mychannel_blk#2.json
-rw-r--r--  1 root root   402 Sep  4 08:07 perf_mychannel_blk#1.json
-rw-r--r--  1 root root   402 Sep  4 08:07 perf_mychannel_blk#2.json
-rw-r--r--  1 root root 25998 Sep  4 08:14 throughput.txt
{
"header": {
"number": 2,
"previous_hash": "bSz9R3rJMtv9+ma2ZYfIKf4xcg8Q4YdKDcRL0OrUH7o=",
"data_hash": "wPU2S7IPlCIHrvNqH+MQnixVddTeOYkuUUdeDOUNTSo="
},
"transactions": [
{
"signature": "MEUCIQCO18gsHb6BfCJud5JL9sVN+UW7BNV9Nd5gbmirHMbAzgIgZ0u+jS8j1CmQxZkZfBAiRO0NamZjry2eq8YDSSN+MTA=",
"channel_header": {
"type": 3,
"timestamp": {
"seconds": 1536048451,
"nanos": 431100600
},
"channel_id": "mychannel",
"tx_id": "bbb554a24a7d030600a2d5992ff7cec7d8b0a6b1707dc4add98a6c1e49d427df",
"chaincode_id": {
"name": "coin"
}
},
"signature_header": {
"Certificate": {
"Raw": "MIICGDCCAb+gAwIBAgIQFSxnLAGsu04zrFkAEwzn6zAKBggqhkjOPQQDAjBzMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eub3JnMS5leGFtcGxlLmNvbTAeFw0xNzA4MzEwOTE0MzJaFw0yNzA4MjkwO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d3brGpXNl5JfA==",
"RawSubjectPublicKeyInfo": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEV1dfmKxsFKWo7o6DNBIaIVebCCPAM9C/sLBt4pJRre9pWE987DjXZoZ3glc4+DoPMtTmBRqbPVwYcUvpbYY8pw==",
"RawSubject": "MFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNpc2NvMR8wHQYDVQQDDBZBZG1pbkBvcmcxLmV4YW1wbGUuY29t",
"RawIssuer": "MHMxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMRwwGgYDVQQDExNjYS5vcmcxLmV4YW1wbGUuY29t",
"Signature": "MEQCIFzMtugBFPxlDD3wjLP50I0DBNWcQRwGGbShLkUd+tSbAiBIPQTmXSKIqEYryQvmVM7yVJ5F7qNh5ForsS7ImxsbRA==",
"SignatureAlgorithm": 10,
"PublicKeyAlgorithm": 3,
"PublicKey": {
"Curve": {
"P": 115792089210356248762697446949407573530086143415290314195533631308867097853951,
"N": 115792089210356248762697446949407573529996955224135760342422259061068512044369,
"B": 41058363725152142129326129780047268409114441015993725554835256314039467401291,
"Gx": 48439561293906451759052585252797914202762949526041747995844080717082404635286,
"Gy": 36134250956749795798585127919587881956611106672985015071877198253568414405109,
"BitSize": 256,
"Name": "P-256"
},
"X": 39505593303352909704274381309371441742584117566856576088988341388698985803247,
"Y": 47648880248815335814243911663559548451884697271489804493875622850479396371623
},
"Version": 3,
"SerialNumber": 28144341548005397272216655295746467819,
"Issuer": {
"Country": [
"US"
],
"Organization": [
"org1.example.com"
],
"OrganizationalUnit": null,
"Locality": [
"San Francisco"
],
"Province": [
"California"
],
"StreetAddress": null,
"PostalCode": null,
"SerialNumber": "",
"CommonName": "ca.org1.example.com",
"Names": [
{
"Type": [
2,
5,
4,
6
],
"Value": "US"
},
{
"Type": [
2,
5,
4,
8
],
"Value": "California"
},
{
"Type": [
2,
5,
4,
7
],
"Value": "San Francisco"
},
{
"Type": [
2,
5,
4,
10
],
"Value": "org1.example.com"
},
{
"Type": [
2,
5,
4,
3
],
"Value": "ca.org1.example.com"
}
],
"ExtraNames": null
},
"Subject": {
"Country": [
"US"
],
"Organization": null,
"OrganizationalUnit": null,
"Locality": [
"San Francisco"
],
"Province": [
"California"
],
"StreetAddress": null,
"PostalCode": null,
"SerialNumber": "",
"CommonName": "[email protected]",
"Names": [
{
"Type": [
2,
5,
4,
6
],
"Value": "US"
},
{
"Type": [
2,
5,
4,
8
],
"Value": "California"
},
{
"Type": [
2,
5,
4,
7
],
"Value": "San Francisco"
},
{
"Type": [
2,
5,
4,
3
],
"Value": "[email protected]"
}
],
"ExtraNames": null
},
"NotBefore": "2017-08-31T09:14:32Z",
"NotAfter": "2027-08-29T09:14:32Z",
"KeyUsage": 1,
"Extensions": [
{
"Id": [
2,
5,
29,
15
],
"Critical": true,
"Value": "AwIHgA=="
},
{
"Id": [
2,
5,
29,
19
],
"Critical": true,
"Value": "MAA="
},
{
"Id": [
2,
5,
29,
35
],
"Critical": false,
"Value": "MCKAIEI5qg3NdtruuLoM2nAYUdFFBNMarRst3dusalc2Xkl8"
}
],
"ExtraExtensions": null,
"UnhandledCriticalExtensions": null,
"ExtKeyUsage": null,
"UnknownExtKeyUsage": null,
"BasicConstraintsValid": true,
"IsCA": false,
"MaxPathLen": -1,
"MaxPathLenZero": false,
"SubjectKeyId": null,
"AuthorityKeyId": "QjmqDc122u64ugzacBhR0UUE0xqtGy3d26xqVzZeSXw=",
"OCSPServer": null,
"IssuingCertificateURL": null,
"DNSNames": null,
"EmailAddresses": null,
"IPAddresses": null,
"URIs": null,
"PermittedDNSDomainsCritical": false,
"PermittedDNSDomains": null,
"ExcludedDNSDomains": null,
"PermittedIPRanges": null,
"ExcludedIPRanges": null,
"PermittedEmailAddresses": null,
"ExcludedEmailAddresses": null,
"PermittedURIDomains": null,
"ExcludedURIDomains": null,
"CRLDistributionPoints": null,
"PolicyIdentifiers": null
},
"nonce": "5y00NgC1j8auhFMqVX4U+zTRbi+arJHe"
},
"tx_action_signature_header": {
"Certificate": {
"Raw": "MIICGDCCAb+gAwIBAgIQFSxnLAGsu04zrFkAEwzn6zAKBggqhkjOPQQDAjBzMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eub3JnMS5leGFtcGxlLmNvbTAeFw0xNzA4MzEwOTE0MzJaFw0yNzA4MjkwOTE0MzJaMFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNpc2NvMR8wHQYDVQQDDBZBZG1pbkBvcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEV1dfmKxsFKWo7o6DNBIaIVebCCPAM9C/sLBt4pJRre9pWE987DjXZoZ3glc4+DoPMtTmBRqbPVwYcUvpbYY8p6NNMEswDgYDVR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgQjmqDc122u64ugzacBhR0UUE0xqtGy3d26xqVzZeSXwwCgYIKoZIzj0EAwIDRwAwRAIgXMy26AEU/GUMPfCMs/nQjQME1ZxBHAYZtKEuRR361JsCIEg9BOZdIoioRivJC+ZUzvJUnkXuo2HkWiuxLsibGxtE",
"RawTBSCertificate": "MIIBv6ADAgECAhAVLGcsAay7TjOsWQATDOfrMAoGCCqGSM49BAMCMHMxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMRwwGgYDVQQDExNjYS5vcmcxLmV4YW1wbGUuY29tMB4XDTE3MDgzMTA5MTQzMloXDTI3MDgyOTA5MTQzMlowWzELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lzY28xHzAdBgNVBAMMFkFkbWluQG9yZzEuZXhhbXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAARXV1+YrGwUpajujoM0EhohV5sII8Az0L+wsG3iklGt72lYT3zsONdmhneCVzj4Og8y1OYFGps9XBhxS+lthjyno00wSzAOBgNVHQ8BAf8EBAMCB4AwDAYDVR0TAQH/BAIwADArBgNVHSMEJDAigCBCOaoNzXba7ri6DNpwGFHRRQTTGq0bLd3brGpXNl5JfA==",
"RawSubjectPublicKeyInfo": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEV1dfmKxsFKWo7o6DNBIaIVebCCPAM9C/sLBt4pJRre9pWE987DjXZoZ3glc4+DoPMtTmBRqbPVwYcUvpbYY8pw==",
"RawSubject": "MFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNpc2NvMR8wHQYDVQQDDBZBZG1pbkBvcmcxLmV4YW1wbGUuY29t",
"RawIssuer": "MHMxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMRwwGgYDVQQDExNjYS5vcmcxLmV4YW1wbGUuY29t",
"Signature": "MEQCIFzMtugBFPxlDD3wjLP50I0DBNWcQRwGGbShLkUd+tSbAiBIPQTmXSKIqEYryQvmVM7yVJ5F7qNh5ForsS7ImxsbRA==",
"SignatureAlgorithm": 10,
"PublicKeyAlgorithm": 3,
"PublicKey": {
"Curve": {
"P": 115792089210356248762697446949407573530086143415290314195533631308867097853951,
"N": 115792089210356248762697446949407573529996955224135760342422259061068512044369,
"B": 41058363725152142129326129780047268409114441015993725554835256314039467401291,
"Gx": 48439561293906451759052585252797914202762949526041747995844080717082404635286,
"Gy": 36134250956749795798585127919587881956611106672985015071877198253568414405109,
"BitSize": 256,
"Name": "P-256"
},
"X": 39505593303352909704274381309371441742584117566856576088988341388698985803247,
"Y": 47648880248815335814243911663559548451884697271489804493875622850479396371623
},
"Version": 3,
"SerialNumber": 28144341548005397272216655295746467819,
"Issuer": {
"Country": [
"US"
],
"Organization": [
"org1.example.com"
],
"OrganizationalUnit": null,
"Locality": [
"San Francisco"
],
"Province": [
"California"
],
"StreetAddress": null,
"PostalCode": null,
"SerialNumber": "",
"CommonName": "ca.org1.example.com",
"Names": [
{
"Type": [
2,
5,
4,
6
],
"Value": "US"
},
{
"Type": [
2,
5,
4,
8
],
"Value": "California"
},
{
"Type": [
2,
5,
4,
7
],
"Value": "San Francisco"
},
{
"Type": [
2,
5,
4,
10
],
"Value": "org1.example.com"
},
{
"Type": [
2,
5,
4,
3
],
"Value": "ca.org1.example.com"
}
],
"ExtraNames": null
},
"Subject": {
"Country": [
"US"
],
"Organization": null,
"OrganizationalUnit": null,
"Locality": [
"San Francisco"
],
"Province": [
"California"
],
"StreetAddress": null,
"PostalCode": null,
"SerialNumber": "",
"CommonName": "[email protected]",
"Names": [
{
"Type": [
2,
5,
4,
6
],
"Value": "US"
},
{
"Type": [
2,
5,
4,
8
],
"Value": "California"
},
{
"Type": [
2,
5,
4,
7
],
"Value": "San Francisco"
},
{
"Type": [
2,
5,
4,
3
],
"Value": "[email protected]"
}
],
"ExtraNames": null
},
"NotBefore": "2017-08-31T09:14:32Z",
"NotAfter": "2027-08-29T09:14:32Z",
"KeyUsage": 1,
"Extensions": [
{
"Id": [
2,
5,
29,
15
],
"Critical": true,
"Value": "AwIHgA=="
},
{
"Id": [
2,
5,
29,
19
],
"Critical": true,
"Value": "MAA="
},
{
"Id": [
2,
5,
29,
35
],
"Critical": false,
"Value": "MCKAIEI5qg3NdtruuLoM2nAYUdFFBNMarRst3dusalc2Xkl8"
}
],
"ExtraExtensions": null,
"UnhandledCriticalExtensions": null,
"ExtKeyUsage": null,
"UnknownExtKeyUsage": null,
"BasicConstraintsValid": true,
"IsCA": false,
"MaxPathLen": -1,
"MaxPathLenZero": false,
"SubjectKeyId": null,
"AuthorityKeyId": "QjmqDc122u64ugzacBhR0UUE0xqtGy3d26xqVzZeSXw=",
"OCSPServer": null,
"IssuingCertificateURL": null,
"DNSNames": null,
"EmailAddresses": null,
"IPAddresses": null,
"URIs": null,
"PermittedDNSDomainsCritical": false,
"PermittedDNSDomains": null,
"ExcludedDNSDomains": null,
"PermittedIPRanges": null,
"ExcludedIPRanges": null,
"PermittedEmailAddresses": null,
"ExcludedEmailAddresses": null,
"PermittedURIDomains": null,
"ExcludedURIDomains": null,
"CRLDistributionPoints": null,
"PolicyIdentifiers": null
},
"nonce": "5y00NgC1j8auhFMqVX4U+zTRbi+arJHe"
},
"chaincode_spec": {
"type": 1,
"chaincode_id": {
"name": "coin"
},
"input": {
"Args": [
"transfer",
"{\"to\": \"usera\", \"value\": 2}"
]
}
},
"endorsements": [
{
"signature_header": {
"Certificate": null,
"nonce": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNHakNDQWNDZ0F3SUJBZ0lSQVBsd0YvclVaVVA5bXFONHdTbWw0aXN3Q2dZSUtvWkl6ajBFQXdJd2N6RUwKTUFrR0ExVUVCaE1DVlZNeEV6QVJCZ05WQkFnVENrTmhiR2xtYjNKdWFXRXhGakFVQmdOVkJBY1REVk5oYmlCRwpjbUZ1WTJselkyOHhHVEFYQmdOVkJBb1RFRzl5WnpFdVpYaGhiWEJzWlM1amIyMHhIREFhQmdOVkJBTVRFMk5oCkxtOXlaekV1WlhoaGJYQnNaUzVqYjIwd0hoY05NVGN3T0RNeE1Ea3hORE15V2hjTk1qY3dPREk1TURreE5ETXkKV2pCYk1Rc3dDUVlEVlFRR0V3SlZVekVUTUJFR0ExVUVDQk1LUTJGc2FXWnZjbTVwWVRFV01CUUdBMVVFQnhNTgpVMkZ1SUVaeVlXNWphWE5qYnpFZk1CMEdBMVVFQXhNV2NHVmxjakF1YjNKbk1TNWxlR0Z0Y0d4bExtTnZiVEJaCk1CTUdCeXFHU000OUFnRUdDQ3FHU000OUF3RUhBMElBQkhpaHhXNmtzM0IyKzVYZGJBVnEzQ0JneFJSUloyMngKenpwcW5EODZuS2t6N2ZCRWxCdWhsWGwySzZyVHh5WTJPQk9CMHRzOGtlcVo5M3h1ZVJHeW1yYWpUVEJMTUE0RwpBMVVkRHdFQi93UUVBd0lIZ0RBTUJnTlZIUk1CQWY4RUFqQUFNQ3NHQTFVZEl3UWtNQ0tBSUVJNXFnM05kdHJ1CnVMb00ybkFZVWRGRkJOTWFyUnN0M2R1c2FsYzJYa2w4TUFvR0NDcUdTTTQ5QkFNQ0EwZ0FNRVVDSVFENGowUm4KZTFycmQwRlNDenNSNnUrSXV1UEs1ZEkva1IvYmg3K1ZMZjBUTmdJZ0NmVXRrSnZmdnpWRXdaTEZvRnlqb0h0cgp0dnd6TlVTMVUwaEVxSWFEZW80PQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg=="
},
"signature": "MEUCIQCSvcvWFIf4B1yluiv/9c04ZKPMsoRyHQbll1a8ELBE3wIgJSDggHPDsmI7sfv3cJI6M/erhi9TOphp17ZbJDyK5rk="
}
],
"proposal_hash": "mfc6XxvVEnnC2UqjppcWAlj3odwfn4GdE2LVF2QqxE0=",
"events": {
"chaincode_id": "coin",
"tx_id": "bbb554a24a7d030600a2d5992ff7cec7d8b0a6b1707dc4add98a6c1e49d427df",
"event_name": "Transfer",
"payload": "eyJmcm9tIjoiQWRtaW5Ab3JnMS5leGFtcGxlLmNvbSIsInRvIjoidXNlcmEiLCJ2YWx1ZSI6Mn0="
},
"response": {
"status": 200
},
"validation_code": 0,
"validation_code_name": "VALID"
}
],
"block_creator_signature": {
"signature_header": {
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aBgNVBAMTE29yZGVyZXIuZXhhbXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAARQ4kbOlqzGNLkQmZsUh78a04kkCjqaEmovJhP08G9VJ1pD9NCUw2WosRmAU/rBz0K2tSn9YOdn8zbMumgM+ORyo00wSzAOBgNVHQ8BAf8EBAMCB4AwDAYDVR0TAQH/BAIwADArBgNVHSMEJDAigCCgYGpKhgoeMckKI3iNpvO2t0kl7Q0jBhr0iZQJukauag==",
"RawSubjectPublicKeyInfo": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUOJGzpasxjS5EJmbFIe/GtOJJAo6mhJqLyYT9PBvVSdaQ/TQlMNlqLEZgFP6wc9CtrUp/WDnZ/M2zLpoDPjkcg==",
"RawSubject": "MFgxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNpc2NvMRwwGgYDVQQDExNvcmRlcmVyLmV4YW1wbGUuY29t",
"RawIssuer": "MGkxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNpc2NvMRQwEgYDVQQKEwtleGFtcGxlLmNvbTEXMBUGA1UEAxMOY2EuZXhhbXBsZS5jb20=",
"Signature": "MEQCIB7FNX+I87rpes2BmP15/x+V+YA3u/7vHWcSX1sFzhjbAiAm17esns0s2nDhUA5LwD8+f9zmCOWCi0k5flopX2v6sg==",
"SignatureAlgorithm": 10,
"PublicKeyAlgorithm": 3,
"PublicKey": {
"Curve": {
"P": 115792089210356248762697446949407573530086143415290314195533631308867097853951,
"N": 115792089210356248762697446949407573529996955224135760342422259061068512044369,
"B": 41058363725152142129326129780047268409114441015993725554835256314039467401291,
"Gx": 48439561293906451759052585252797914202762949526041747995844080717082404635286,
"Gy": 36134250956749795798585127919587881956611106672985015071877198253568414405109,
"BitSize": 256,
"Name": "P-256"
},
"X": 36584824015162433651776896336630651698193266576537266522208011864095719380263,
"Y": 40828224775278251242332370758899930694113843111310764872224729095755745780850
},
"Version": 3,
"SerialNumber": 231226078089601860654554597932713485170,
"Issuer": {
"Country": [
"US"
],
"Organization": [
"example.com"
],
"OrganizationalUnit": null,
"Locality": [
"San Francisco"
],
"Province": [
"California"
],
"StreetAddress": null,
"PostalCode": null,
"SerialNumber": "",
"CommonName": "ca.example.com",
"Names": [
{
"Type": [
2,
5,
4,
6
],
"Value": "US"
},
{
"Type": [
2,
5,
4,
8
],
"Value": "California"
},
{
"Type": [
2,
5,
4,
7
],
"Value": "San Francisco"
},
{
"Type": [
2,
5,
4,
10
],
"Value": "example.com"
},
{
"Type": [
2,
5,
4,
3
],
"Value": "ca.example.com"
}
],
"ExtraNames": null
},
"Subject": {
"Country": [
"US"
],
"Organization": null,
"OrganizationalUnit": null,
"Locality": [
"San Francisco"
],
"Province": [
"California"
],
"StreetAddress": null,
"PostalCode": null,
"SerialNumber": "",
"CommonName": "orderer.example.com",
"Names": [
{
"Type": [
2,
5,
4,
6
],
"Value": "US"
},
{
"Type": [
2,
5,
4,
8
],
"Value": "California"
},
{
"Type": [
2,
5,
4,
7
],
"Value": "San Francisco"
},
{
"Type": [
2,
5,
4,
3
],
"Value": "orderer.example.com"
}
],
"ExtraNames": null
},
"NotBefore": "2017-08-31T09:14:32Z",
"NotAfter": "2027-08-29T09:14:32Z",
"KeyUsage": 1,
"Extensions": [
{
"Id": [
2,
5,
29,
15
],
"Critical": true,
"Value": "AwIHgA=="
},
{
"Id": [
2,
5,
29,
19
],
"Critical": true,
"Value": "MAA="
},
{
"Id": [
2,
5,
29,
35
],
"Critical": false,
"Value": "MCKAIKBgakqGCh4xyQojeI2m87a3SSXtDSMGGvSJlAm6Rq5q"
}
],
"ExtraExtensions": null,
"UnhandledCriticalExtensions": null,
"ExtKeyUsage": null,
"UnknownExtKeyUsage": null,
"BasicConstraintsValid": true,
"IsCA": false,
"MaxPathLen": -1,
"MaxPathLenZero": false,
"SubjectKeyId": null,
"AuthorityKeyId": "oGBqSoYKHjHJCiN4jabztrdJJe0NIwYa9ImUCbpGrmo=",
"OCSPServer": null,
"IssuingCertificateURL": null,
"DNSNames": null,
"EmailAddresses": null,
"IPAddresses": null,
"URIs": null,
"PermittedDNSDomainsCritical": false,
"PermittedDNSDomains": null,
"ExcludedDNSDomains": null,
"PermittedIPRanges": null,
"ExcludedIPRanges": null,
"PermittedEmailAddresses": null,
"ExcludedEmailAddresses": null,
"PermittedURIDomains": null,
"ExcludedURIDomains": null,
"CRLDistributionPoints": null,
"PolicyIdentifiers": null
},
"nonce": "uA9GNCfT3wl297EBkS3qPq5VTlTV7njb"
},
"signature": "MEQCIFtFmNgx0WI2Dj/KsWj8CfqsjFhbcbeRq5muIv33k1bTAiBba0SKzWVV8XBNWrpUagaU3knr1244Q5M/3gSDrybI+Q=="
},
"last_config_block_number": {
"signature_data": {
"signature_header": {
"Certificate": {
"Raw": "MIICDDCCAbOgAwIBAgIRAK30hdRcBxQJYNPqPkiFo3IwCgYIKoZIzj0EAwIwaTELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRcwFQYDVQQDEw5jYS5leGFtcGxlLmNvbTAeFw0xNzA4MzEwOTE0MzJaFw0yNzA4MjkwOTE0MzJaMFgxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNpc2NvMRwwGgYDVQQDExNvcmRlcmVyLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUOJGzpasxjS5EJmbFIe/GtOJJAo6mhJqLyYT9PBvVSdaQ/TQlMNlqLEZgFP6wc9CtrUp/WDnZ/M2zLpoDPjkcqNNMEswDgYDVR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgoGBqSoY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YDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNpc2NvMRQwEgYDVQQKEwtleGFtcGxlLmNvbTEXMBUGA1UEAxMOY2EuZXhhbXBsZS5jb20=",
"Signature": "MEQCIB7FNX+I87rpes2BmP15/x+V+YA3u/7vHWcSX1sFzhjbAiAm17esns0s2nDhUA5LwD8+f9zmCOWCi0k5flopX2v6sg==",
"SignatureAlgorithm": 10,
"PublicKeyAlgorithm": 3,
"PublicKey": {
"Curve": {
"P": 115792089210356248762697446949407573530086143415290314195533631308867097853951,
"N": 115792089210356248762697446949407573529996955224135760342422259061068512044369,
"B": 41058363725152142129326129780047268409114441015993725554835256314039467401291,
"Gx": 48439561293906451759052585252797914202762949526041747995844080717082404635286,
"Gy": 36134250956749795798585127919587881956611106672985015071877198253568414405109,
"BitSize": 256,
"Name": "P-256"
},
"X": 36584824015162433651776896336630651698193266576537266522208011864095719380263,
"Y": 40828224775278251242332370758899930694113843111310764872224729095755745780850
},
"Version": 3,
"SerialNumber": 231226078089601860654554597932713485170,
"Issuer": {
"Country": [
"US"
],
"Organization": [
"example.com"
],
"OrganizationalUnit": null,
"Locality": [
"San Francisco"
],
"Province": [
"California"
],
"StreetAddress": null,
"PostalCode": null,
"SerialNumber": "",
"CommonName": "ca.example.com",
"Names": [
{
"Type": [
2,
5,
4,
6
],
"Value": "US"
},
{
"Type": [
2,
5,
4,
8
],
"Value": "California"
},
{
"Type": [
2,
5,
4,
7
],
"Value": "San Francisco"
},
{
"Type": [
2,
5,
4,
10
],
"Value": "example.com"
},
{
"Type": [
2,
5,
4,
3
],
"Value": "ca.example.com"
}
],
"ExtraNames": null
},
"Subject": {
"Country": [
"US"
],
"Organization": null,
"OrganizationalUnit": null,
"Locality": [
"San Francisco"
],
"Province": [
"California"
],
"StreetAddress": null,
"PostalCode": null,
"SerialNumber": "",
"CommonName": "orderer.example.com",
"Names": [
{
"Type": [
2,
5,
4,
6
],
"Value": "US"
},
{
"Type": [
2,
5,
4,
8
],
"Value": "California"
},
{
"Type": [
2,
5,
4,
7
],
"Value": "San Francisco"
},
{
"Type": [
2,
5,
4,
3
],
"Value": "orderer.example.com"
}
],
"ExtraNames": null
},
"NotBefore": "2017-08-31T09:14:32Z",
"NotAfter": "2027-08-29T09:14:32Z",
"KeyUsage": 1,
"Extensions": [
{
"Id": [
2,
5,
29,
15
],
"Critical": true,
"Value": "AwIHgA=="
},
{
"Id": [
2,
5,
29,
19
],
"Critical": true,
"Value": "MAA="
},
{
"Id": [
2,
5,
29,
35
],
"Critical": false,
"Value": "MCKAIKBgakqGCh4xyQojeI2m87a3SSXtDSMGGvSJlAm6Rq5q"
}
],
"ExtraExtensions": null,
"UnhandledCriticalExtensions": null,
"ExtKeyUsage": null,
"UnknownExtKeyUsage": null,
"BasicConstraintsValid": true,
"IsCA": false,
"MaxPathLen": -1,
"MaxPathLenZero": false,
"SubjectKeyId": null,
"AuthorityKeyId": "oGBqSoYKHjHJCiN4jabztrdJJe0NIwYa9ImUCbpGrmo=",
"OCSPServer": null,
"IssuingCertificateURL": null,
"DNSNames": null,
"EmailAddresses": null,
"IPAddresses": null,
"URIs": null,
"PermittedDNSDomainsCritical": false,
"PermittedDNSDomains": null,
"ExcludedDNSDomains": null,
"PermittedIPRanges": null,
"ExcludedIPRanges": null,
"PermittedEmailAddresses": null,
"ExcludedEmailAddresses": null,
"PermittedURIDomains": null,
"ExcludedURIDomains": null,
"CRLDistributionPoints": null,
"PolicyIdentifiers": null
},
"nonce": "iA2V3M2w0KaKyrmm6SprXZ7oH2SoGPzf"
},
"signature": "MEUCIQDPzpHlct2lnyKELbYb0c07wAPmt4mhjO39LQ6iK8fWzQIgVC8+fE0AexuTlyxZU0pTNbvoBhpmJszWLsNCZrSOXBA="
}
},
"transaction_filter": "AA==",
"orderer_kafka_metadata": {}
}
{
"BlockNumber": 0,
"NumValidTx": 1,
"NumInvalidTx": 0,
"BlockDurationNs": 2050813000,
"TxValidationStats": {
"VALID": 1
},
"TxPerfs": [
{
"TxId": "bbb554a24a7d030600a2d5992ff7cec7d8b0a6b1707dc4add98a6c1e49d427df",
"ProposalSubmissionTime": "2018-09-04T08:07:31.4311006Z",
"TxCommitTime": "2018-09-04T08:07:33.4819136Z",
"LatencyNs": 2050813000
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment