-
Notifications
You must be signed in to change notification settings - Fork 445
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CE-286] Necessary file for Deploying Fabric cluster
1. Files under Resource dir will be shared among the Pods belong to same Fabric cluster. 2. Template fils will be render to deployment file accroding to the Fabric cluster information. Change-Id: I35ba97acf2bbc9ad91295ecf897fc333bd66118d Signed-off-by: luke <jiahaochen1993@gmail.com>
- Loading branch information
1 parent
99f3793
commit e07d543
Showing
125 changed files
with
2,775 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
199 changes: 199 additions & 0 deletions
199
...ent/k8s/cluster_resources/resources/chaincodes/chaincode_example02/chaincode_example02.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,199 @@ | ||
/* | ||
Copyright IBM Corp. 2016 All Rights Reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package main | ||
|
||
//WARNING - this chaincode's ID is hard-coded in chaincode_example04 to illustrate one way of | ||
//calling chaincode from a chaincode. If this example is modified, chaincode_example04.go has | ||
//to be modified as well with the new ID of chaincode_example02. | ||
//chaincode_example05 show's how chaincode ID can be passed in as a parameter instead of | ||
//hard-coding. | ||
|
||
import ( | ||
"fmt" | ||
"strconv" | ||
|
||
"github.com/hyperledger/fabric/core/chaincode/shim" | ||
pb "github.com/hyperledger/fabric/protos/peer" | ||
) | ||
|
||
// SimpleChaincode example simple Chaincode implementation | ||
type SimpleChaincode struct { | ||
} | ||
|
||
func (t *SimpleChaincode) Init(stub shim.ChaincodeStubInterface) pb.Response { | ||
fmt.Println("ex02 Init") | ||
_, args := stub.GetFunctionAndParameters() | ||
var A, B string // Entities | ||
var Aval, Bval int // Asset holdings | ||
var err error | ||
|
||
if len(args) != 4 { | ||
return shim.Error("Incorrect number of arguments. Expecting 4") | ||
} | ||
|
||
// Initialize the chaincode | ||
A = args[0] | ||
Aval, err = strconv.Atoi(args[1]) | ||
if err != nil { | ||
return shim.Error("Expecting integer value for asset holding") | ||
} | ||
B = args[2] | ||
Bval, err = strconv.Atoi(args[3]) | ||
if err != nil { | ||
return shim.Error("Expecting integer value for asset holding") | ||
} | ||
fmt.Printf("Aval = %d, Bval = %d\n", Aval, Bval) | ||
|
||
// Write the state to the ledger | ||
err = stub.PutState(A, []byte(strconv.Itoa(Aval))) | ||
if err != nil { | ||
return shim.Error(err.Error()) | ||
} | ||
|
||
err = stub.PutState(B, []byte(strconv.Itoa(Bval))) | ||
if err != nil { | ||
return shim.Error(err.Error()) | ||
} | ||
|
||
return shim.Success(nil) | ||
} | ||
|
||
func (t *SimpleChaincode) Invoke(stub shim.ChaincodeStubInterface) pb.Response { | ||
fmt.Println("ex02 Invoke") | ||
function, args := stub.GetFunctionAndParameters() | ||
if function == "invoke" { | ||
// Make payment of X units from A to B | ||
return t.invoke(stub, args) | ||
} else if function == "delete" { | ||
// Deletes an entity from its state | ||
return t.delete(stub, args) | ||
} else if function == "query" { | ||
// the old "Query" is now implemtned in invoke | ||
return t.query(stub, args) | ||
} | ||
|
||
return shim.Error("Invalid invoke function name. Expecting \"invoke\" \"delete\" \"query\"") | ||
} | ||
|
||
// Transaction makes payment of X units from A to B | ||
func (t *SimpleChaincode) invoke(stub shim.ChaincodeStubInterface, args []string) pb.Response { | ||
var A, B string // Entities | ||
var Aval, Bval int // Asset holdings | ||
var X int // Transaction value | ||
var err error | ||
|
||
if len(args) != 3 { | ||
return shim.Error("Incorrect number of arguments. Expecting 3") | ||
} | ||
|
||
A = args[0] | ||
B = args[1] | ||
|
||
// Get the state from the ledger | ||
// TODO: will be nice to have a GetAllState call to ledger | ||
Avalbytes, err := stub.GetState(A) | ||
if err != nil { | ||
return shim.Error("Failed to get state") | ||
} | ||
if Avalbytes == nil { | ||
return shim.Error("Entity not found") | ||
} | ||
Aval, _ = strconv.Atoi(string(Avalbytes)) | ||
|
||
Bvalbytes, err := stub.GetState(B) | ||
if err != nil { | ||
return shim.Error("Failed to get state") | ||
} | ||
if Bvalbytes == nil { | ||
return shim.Error("Entity not found") | ||
} | ||
Bval, _ = strconv.Atoi(string(Bvalbytes)) | ||
|
||
// Perform the execution | ||
X, err = strconv.Atoi(args[2]) | ||
if err != nil { | ||
return shim.Error("Invalid transaction amount, expecting a integer value") | ||
} | ||
Aval = Aval - X | ||
Bval = Bval + X | ||
fmt.Printf("Aval = %d, Bval = %d\n", Aval, Bval) | ||
|
||
// Write the state back to the ledger | ||
err = stub.PutState(A, []byte(strconv.Itoa(Aval))) | ||
if err != nil { | ||
return shim.Error(err.Error()) | ||
} | ||
|
||
err = stub.PutState(B, []byte(strconv.Itoa(Bval))) | ||
if err != nil { | ||
return shim.Error(err.Error()) | ||
} | ||
|
||
return shim.Success(nil) | ||
} | ||
|
||
// Deletes an entity from state | ||
func (t *SimpleChaincode) delete(stub shim.ChaincodeStubInterface, args []string) pb.Response { | ||
if len(args) != 1 { | ||
return shim.Error("Incorrect number of arguments. Expecting 1") | ||
} | ||
|
||
A := args[0] | ||
|
||
// Delete the key from the state in ledger | ||
err := stub.DelState(A) | ||
if err != nil { | ||
return shim.Error("Failed to delete state") | ||
} | ||
|
||
return shim.Success(nil) | ||
} | ||
|
||
// query callback representing the query of a chaincode | ||
func (t *SimpleChaincode) query(stub shim.ChaincodeStubInterface, args []string) pb.Response { | ||
var A string // Entities | ||
var err error | ||
|
||
if len(args) != 1 { | ||
return shim.Error("Incorrect number of arguments. Expecting name of the person to query") | ||
} | ||
|
||
A = args[0] | ||
|
||
// Get the state from the ledger | ||
Avalbytes, err := stub.GetState(A) | ||
if err != nil { | ||
jsonResp := "{\"Error\":\"Failed to get state for " + A + "\"}" | ||
return shim.Error(jsonResp) | ||
} | ||
|
||
if Avalbytes == nil { | ||
jsonResp := "{\"Error\":\"Nil amount for " + A + "\"}" | ||
return shim.Error(jsonResp) | ||
} | ||
|
||
jsonResp := "{\"Name\":\"" + A + "\",\"Amount\":\"" + string(Avalbytes) + "\"}" | ||
fmt.Printf("Query Response:%s\n", jsonResp) | ||
return shim.Success(Avalbytes) | ||
} | ||
|
||
func main() { | ||
err := shim.Start(new(SimpleChaincode)) | ||
if err != nil { | ||
fmt.Printf("Error starting Simple chaincode: %s", err) | ||
} | ||
} |
Binary file added
BIN
+283 Bytes
src/agent/k8s/cluster_resources/resources/channel-artifacts/Org1MSPanchors.tx
Binary file not shown.
Binary file added
BIN
+283 Bytes
src/agent/k8s/cluster_resources/resources/channel-artifacts/Org2MSPanchors.tx
Binary file not shown.
Binary file added
BIN
+406 Bytes
src/agent/k8s/cluster_resources/resources/channel-artifacts/channel.tx
Binary file not shown.
71 changes: 71 additions & 0 deletions
71
src/agent/k8s/cluster_resources/resources/channel-artifacts/configtx.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
--- | ||
Profiles: | ||
|
||
OrdererGenesis: | ||
Orderer: | ||
<<: *OrdererDefaults | ||
Organizations: | ||
- *OrdererOrg | ||
Consortiums: | ||
SampleConsortium: | ||
Organizations: | ||
- *Org2 | ||
- *Org1 | ||
DefaultChannel: | ||
Consortium: SampleConsortium | ||
Application: | ||
<<: *ApplicationDefaults | ||
Organizations: | ||
- *Org2 | ||
- *Org1 | ||
|
||
################################################################################ | ||
# Section: Organizations | ||
################################################################################ | ||
Organizations: | ||
- &OrdererOrg | ||
#Name: OrdererOrgMSP | ||
#ID: OrdererOrgMSP | ||
Name: OrdererMSP | ||
ID: OrdererMSP | ||
MSPDir: crypto-config/ordererOrganizations/ordererorg/msp | ||
|
||
- &Org2 | ||
Name: Org2MSP | ||
ID: Org2MSP | ||
MSPDir: crypto-config/peerOrganizations/org2/msp | ||
AnchorPeers: | ||
#- Host: peer0.Org2 | ||
- Host: peer0-org2 | ||
Port: 7051 | ||
- &Org1 | ||
Name: Org1MSP | ||
ID: Org1MSP | ||
MSPDir: crypto-config/peerOrganizations/org1/msp | ||
AnchorPeers: | ||
#- Host: peer0.Org1 | ||
- Host: peer0-org1 | ||
Port: 7051 | ||
|
||
################################################################################ | ||
# SECTION: Orderer | ||
################################################################################ | ||
Orderer: &OrdererDefaults | ||
OrdererType: solo | ||
Addresses: | ||
#- orderer0.ordererorg:7050 | ||
- orderer0:7050 | ||
Kafka: | ||
Brokers: | ||
BatchTimeout: 2s | ||
BatchSize: | ||
MaxMessageCount: 10 | ||
AbsoluteMaxBytes: 98 MB | ||
PreferredMaxBytes: 512 KB | ||
Organizations: | ||
|
||
################################################################################ | ||
# SECTION: Application | ||
################################################################################ | ||
Application: &ApplicationDefaults | ||
Organizations: |
Binary file added
BIN
+8.51 KB
src/agent/k8s/cluster_resources/resources/channel-artifacts/genesis.block
Binary file not shown.
14 changes: 14 additions & 0 deletions
14
...sources/resources/crypto-config/ordererOrganizations/ordererorg/ca/ca.ordererorg-cert.pem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIICKzCCAdKgAwIBAgIRAIcX/S5EiiJ1OIlM25uLnAEwCgYIKoZIzj0EAwIwZzEL | ||
MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG | ||
cmFuY2lzY28xEzARBgNVBAoTCm9yZGVyZXJvcmcxFjAUBgNVBAMTDWNhLm9yZGVy | ||
ZXJvcmcwHhcNMTgwNDA1MTU0NDA1WhcNMjgwNDAyMTU0NDA1WjBnMQswCQYDVQQG | ||
EwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZyYW5jaXNj | ||
bzETMBEGA1UEChMKb3JkZXJlcm9yZzEWMBQGA1UEAxMNY2Eub3JkZXJlcm9yZzBZ | ||
MBMGByqGSM49AgEGCCqGSM49AwEHA0IABG6lPdbHKzmbQVXvVYKo8I6erTi6unr7 | ||
/de0ivsSZddrMhmLmy0rHaU4tlM3Iudvir15tROfEMYMCjqEUaCe3hujXzBdMA4G | ||
A1UdDwEB/wQEAwIBpjAPBgNVHSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8w | ||
KQYDVR0OBCIEIMqm7RMTfzS7rpWdNN/lo1vgzgmYxJDKVfWL8zbzD6i8MAoGCCqG | ||
SM49BAMCA0cAMEQCICSljDFEd3Eek/Uw7hZRRpGcYcDBSLX9Q35pwLR3/9cyAiAo | ||
2w4ol5/1nkmaKyM6kZaRPmaMIBLZaBIRIsYzQvS3EQ== | ||
-----END CERTIFICATE----- |
5 changes: 5 additions & 0 deletions
5
...zations/ordererorg/ca/caa6ed13137f34bbae959d34dfe5a35be0ce0998c490ca55f58bf336f30fa8bc_sk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
-----BEGIN PRIVATE KEY----- | ||
MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgJhcu5BIuWoW/r3gv | ||
I3nBDgof2neHY8vX+ZY994bzyiyhRANCAARupT3Wxys5m0FV71WCqPCOnq04urp6 | ||
+/3XtIr7EmXXazIZi5stKx2lOLZTNyLnb4q9ebUTnxDGDAo6hFGgnt4b | ||
-----END PRIVATE KEY----- |
Binary file added
BIN
+8.51 KB
...s/cluster_resources/resources/crypto-config/ordererOrganizations/ordererorg/genesis.block
Binary file not shown.
13 changes: 13 additions & 0 deletions
13
...es/crypto-config/ordererOrganizations/ordererorg/msp/admincerts/Admin@ordererorg-cert.pem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIICCDCCAa6gAwIBAgIRAMhn0nq2GeTis/NKhpEYwX0wCgYIKoZIzj0EAwIwZzEL | ||
MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG | ||
cmFuY2lzY28xEzARBgNVBAoTCm9yZGVyZXJvcmcxFjAUBgNVBAMTDWNhLm9yZGVy | ||
ZXJvcmcwHhcNMTgwNDA1MTU0NDA1WhcNMjgwNDAyMTU0NDA1WjBVMQswCQYDVQQG | ||
EwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZyYW5jaXNj | ||
bzEZMBcGA1UEAwwQQWRtaW5Ab3JkZXJlcm9yZzBZMBMGByqGSM49AgEGCCqGSM49 | ||
AwEHA0IABOAu9HUPl74StuOjflYh1vIYlBx8DMGsxfm2O6c106p8kxT0d2Anm+B6 | ||
k4oHw2VKT3goqt1BJ6KAUn0tG+mHqr2jTTBLMA4GA1UdDwEB/wQEAwIHgDAMBgNV | ||
HRMBAf8EAjAAMCsGA1UdIwQkMCKAIMqm7RMTfzS7rpWdNN/lo1vgzgmYxJDKVfWL | ||
8zbzD6i8MAoGCCqGSM49BAMCA0gAMEUCIQD+Nj5t5lOdXaDi6D/EGrT8iAnCf0FQ | ||
n/jxcVfyn3XSvQIgVLOf5J2J6E0G6Y/lDzZwpTrx91jHSGyqttcsvmF9oA8= | ||
-----END CERTIFICATE----- |
14 changes: 14 additions & 0 deletions
14
...esources/crypto-config/ordererOrganizations/ordererorg/msp/cacerts/ca.ordererorg-cert.pem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIICKzCCAdKgAwIBAgIRAIcX/S5EiiJ1OIlM25uLnAEwCgYIKoZIzj0EAwIwZzEL | ||
MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG | ||
cmFuY2lzY28xEzARBgNVBAoTCm9yZGVyZXJvcmcxFjAUBgNVBAMTDWNhLm9yZGVy | ||
ZXJvcmcwHhcNMTgwNDA1MTU0NDA1WhcNMjgwNDAyMTU0NDA1WjBnMQswCQYDVQQG | ||
EwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZyYW5jaXNj | ||
bzETMBEGA1UEChMKb3JkZXJlcm9yZzEWMBQGA1UEAxMNY2Eub3JkZXJlcm9yZzBZ | ||
MBMGByqGSM49AgEGCCqGSM49AwEHA0IABG6lPdbHKzmbQVXvVYKo8I6erTi6unr7 | ||
/de0ivsSZddrMhmLmy0rHaU4tlM3Iudvir15tROfEMYMCjqEUaCe3hujXzBdMA4G | ||
A1UdDwEB/wQEAwIBpjAPBgNVHSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8w | ||
KQYDVR0OBCIEIMqm7RMTfzS7rpWdNN/lo1vgzgmYxJDKVfWL8zbzD6i8MAoGCCqG | ||
SM49BAMCA0cAMEQCICSljDFEd3Eek/Uw7hZRRpGcYcDBSLX9Q35pwLR3/9cyAiAo | ||
2w4ol5/1nkmaKyM6kZaRPmaMIBLZaBIRIsYzQvS3EQ== | ||
-----END CERTIFICATE----- |
14 changes: 14 additions & 0 deletions
14
...es/crypto-config/ordererOrganizations/ordererorg/msp/tlscacerts/tlsca.ordererorg-cert.pem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIICMTCCAdegAwIBAgIQeE3qCFjIsB+vsDGP+i6YVDAKBggqhkjOPQQDAjBqMQsw | ||
CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy | ||
YW5jaXNjbzETMBEGA1UEChMKb3JkZXJlcm9yZzEZMBcGA1UEAxMQdGxzY2Eub3Jk | ||
ZXJlcm9yZzAeFw0xODA0MDUxNTQ0MDVaFw0yODA0MDIxNTQ0MDVaMGoxCzAJBgNV | ||
BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNp | ||
c2NvMRMwEQYDVQQKEwpvcmRlcmVyb3JnMRkwFwYDVQQDExB0bHNjYS5vcmRlcmVy | ||
b3JnMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEHn2l0BrRwNfYzdafJc6sFUTf | ||
LkKzzj/lMzISs5WcF3qJrQkR5u4zLaT4srKDeejeRq3Q+RlwWRyg2OLjg/AdsaNf | ||
MF0wDgYDVR0PAQH/BAQDAgGmMA8GA1UdJQQIMAYGBFUdJQAwDwYDVR0TAQH/BAUw | ||
AwEB/zApBgNVHQ4EIgQgZ+Rnb+pZrDhvkg8yFRY5uaYXOd7tiNy8roV6QABHfL4w | ||
CgYIKoZIzj0EAwIDSAAwRQIhAMWab6Qg+Jc2JG8quBz4n+iF2nYivuXoIhdE3oRX | ||
qVUoAiBVJtZAi6dy3CV5w8/OpBJq6x5zySGbGqjaNZ9SLvIkYw== | ||
-----END CERTIFICATE----- |
13 changes: 13 additions & 0 deletions
13
...izations/ordererorg/orderers/orderer0.ordererorg/msp/admincerts/Admin@ordererorg-cert.pem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIICCDCCAa6gAwIBAgIRAMhn0nq2GeTis/NKhpEYwX0wCgYIKoZIzj0EAwIwZzEL | ||
MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG | ||
cmFuY2lzY28xEzARBgNVBAoTCm9yZGVyZXJvcmcxFjAUBgNVBAMTDWNhLm9yZGVy | ||
ZXJvcmcwHhcNMTgwNDA1MTU0NDA1WhcNMjgwNDAyMTU0NDA1WjBVMQswCQYDVQQG | ||
EwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZyYW5jaXNj | ||
bzEZMBcGA1UEAwwQQWRtaW5Ab3JkZXJlcm9yZzBZMBMGByqGSM49AgEGCCqGSM49 | ||
AwEHA0IABOAu9HUPl74StuOjflYh1vIYlBx8DMGsxfm2O6c106p8kxT0d2Anm+B6 | ||
k4oHw2VKT3goqt1BJ6KAUn0tG+mHqr2jTTBLMA4GA1UdDwEB/wQEAwIHgDAMBgNV | ||
HRMBAf8EAjAAMCsGA1UdIwQkMCKAIMqm7RMTfzS7rpWdNN/lo1vgzgmYxJDKVfWL | ||
8zbzD6i8MAoGCCqGSM49BAMCA0gAMEUCIQD+Nj5t5lOdXaDi6D/EGrT8iAnCf0FQ | ||
n/jxcVfyn3XSvQIgVLOf5J2J6E0G6Y/lDzZwpTrx91jHSGyqttcsvmF9oA8= | ||
-----END CERTIFICATE----- |
Oops, something went wrong.