itpeople-blockchain / auction Goto Github PK
View Code? Open in Web Editor NEWITPeople Blockchain - Art Auction Demo
ITPeople Blockchain - Art Auction Demo
Pre-condition: Launched Peer and chaincode
Issue: Bid numbers are overriding.
Steps to Reproduce:
Run Below commands as is:
Expected: Application should restrict user not to submit bids with new amount on old bid numbers.
I setup fabric on vagrant.
I was able to run this command successfully.
cd $GOPATH/src/github.com/hyperledger/fabric
make peer
peer node start --peer-chaincodedev
But getting error in 2nd command:
Using go version go1.7.3 linux/amd64
cd $GOPATH/src/github.com/hyperledger/fabric/auction/art/artchaincode
go build
Output:
# github.com/hyperledger/fabric/auction/art/artchaincode
./art_app.go:304: cannot use new(SimpleChaincode) (type *SimpleChaincode) as type shim.Chaincode in argument to shim.Start:
*SimpleChaincode does not implement shim.Chaincode (wrong type for Init method)
have Init(shim.ChaincodeStubInterface, string, []string) ([]byte, error)
want Init(shim.ChaincodeStubInterface) peer.Response
./art_app.go:325: stub.DeleteTable undefined (type shim.ChaincodeStubInterface has no field or method DeleteTable)
./art_app.go:1991: undefined: shim.ColumnDefinition
./art_app.go:1994: undefined: shim.ColumnDefinition
./art_app.go:1998: undefined: shim.ColumnDefinition
./art_app.go:2002: stub.CreateTable undefined (type shim.ChaincodeStubInterface has no field or method CreateTable)
./art_app.go:2023: undefined: shim.Column
./art_app.go:2026: undefined: shim.Column
./art_app.go:2030: undefined: shim.Column
./art_app.go:2372: undefined: shim.Row
./art_app.go:2030: too many errors
What I am doing wrong here?
copy.image filename
is creating after executing ./PostAuctionRequest. Is this valid?
vagrant@hyperledger-devenv:v0.0.10-35326c2:/opt/gopath/src/github.com/hyperledger/fabric/auction/art/scripts$ ./PostAuctionRequest
2016/06/29 04:30:17 Load docker HostConfig: %+v &{[] [] [] [] false map[] [] false [] [] [] [] host { 0} [] { map[]} false [] 0 0 0 false 0 0 0 0 []}
04:30:17.840 [crypto] main -> INFO 002 Log level recognized 'info', set to INFO
26eff7cb-1c3b-429d-a11a-a1693d4c6a49
2016/06/29 04:30:17 Load docker HostConfig: %+v &{[] [] [] [] false map[] [] false [] [] [] [] host { 0} [] { map[]} false [] 0 0 0 false 0 0 0 0 []}
04:30:17.990 [crypto] main -> INFO 002 Log level recognized 'info', set to INFO
9125033e-ae3e-467a-9ffb-0896b271e632
ex:
-rwxrwxrwx 1 vagrant vagrant 1043689 Jun 29 04:30 copy.art1.png*
-rwxrwxrwx 1 vagrant vagrant 1246203 Jun 29 04:30 copy.mad-fb.jpg*
Hi,
I try to use the auction example below :
https://github.com/ITPeople-Blockchain/auction
I successfully launch the ordere peer, but the Membership Service Provider (MSP) manager cannot find the msp of the chain.
Some of you already encountered this issue ?
ls -l $CORE_PEER_MSPCONFIGPATH
=>
drwxrwxr-x. ... admincerts
drwxrwxr-x. ... cacerts
drwxrwxr-x. ... keystore
drwxrwxr-x. ... signcerts
###Terminal 1 : ./orderer => OK
###Terminal 2 : peer node start -o 127.0.0.1:7050 => OK
###Terminal 3 => KO
peer chaincode invoke 127.0.0.1:7050 -n mycc -c '{"Args":["iPostUser","100", "USER", "Ashley Hart", "TRD", "Morrisville Parkway,
#216
, Morrisville, NC 27560", "9198063535", "[email protected]", "SUNTRUST", "0001732345", "0234678", "2017-01-02 15:04:05"]}'
=> ...
2017-04-19 14:59:04.077 CEST [msp] Setup -> INFO 015 MSP manager setup complete, setup 1 msps
Error: Error endorsing chaincode: rpc error: code = 2 desc = could not get msp for chain [testchainid]
Open an Auction with Auction ID 1111 and Item 1000.. Submit bid with Auction ID 1111 and item 1900.. I could see Bid is successful on Item 1900 which is not on Auction.
getting this when trying to install upstream libraries
git clone [email protected]:ITPeople-Blockchain/auction.git
cd /home/stens/src/gopath/src/github.com/ITPeople-Blockchain/auction
go get -v -t ./...
github.com/hyperledger/fabric (download)
package itpUtils: unrecognized import path "itpUtils" (import path does not begin with hostname)
Hello - I have Hyperledger Fabric 1.0 installed and am trying to get this demo to work. I'm having an issue and am guessing it might be because I'm missing something in my environment. Both links in the README documentation for setting up "Development Environment" and "Sandbox Environment" are not working. Are they available elsewhere?
Issue Description:
Open Auction items are not closing after auction timeout.
Steps to Reproduce:
Pre-Condition: launch Peer and Chaincode
PostAuctionRequest and OpenAuctionRequestForBids
Number of Keys retrieved : 2
Number of rows retrieved : 0
JSONtoAucReq error: unexpected end of JSON input
CloseAuction(): Proceeding to process the highest bid { }
CloseAuction(): Converting Bid to tran { POSTTRAN SALE 2016-06-28 23:30:57 The Highest Bidder does not always win}
CloseAuction(): Proceeding to process the Transaction [ POSTTRAN SALE 2016-06-28 23:30:57 The Highest Bidder does not always win]
CreateTransactionRequest() : Transaction Request: { POSTTRAN SALE 2016-06-28 23:30:57 The Highest Bidder does not always win}
23:30:57.968 [shim] DEBU : [10ba1f84]Sending GET_STATE
23:30:57.968 [shim] DEBU : [10ba1f84]Received message RESPONSE from shim
23:30:57.968 [shim] DEBU : [10ba1f84]Handling ChaincodeMessage of type: RESPONSE(state:transaction)
23:30:57.968 [shim] DEBU : [10ba1f84]before send
23:30:57.968 [shim] DEBU : [10ba1f84]after send
23:30:57.968 [shim] DEBU : [10ba1f84]Received RESPONSE, communicated (state:transaction)
23:30:57.968 [shim] DEBU : [10ba1f84]GetState received payload RESPONSE
Length or number of rows retrieved 0
Error retrieving data record for Key = Error : {"Error":"Failed retrieving data . "}
ValidateMember() : Failed - Cannot find valid owner record for ART
PostTransaction() : Failed Buyer not Registered in Blockchain
CloseAuction(): PostTransaction() Failed
23:30:57.969 [shim] ERRO : [10ba1f84]Transaction execution failed. Sending ERROR
23:30:57.969 [shim] DEBU : [10ba1f84]Move state message ERROR
23:30:57.969 [shim] DEBU : [10ba1f84]Handling ChaincodeMessage of type: ERROR(state:transaction)
23:30:57.969 [shim] DEBU : [10ba1f84]send state message ERROR
23:33:12.025 [shim] DEBU : [ff781005]Received message QUERY from shim
23:33:12.025 [shim] DEBU : [ff781005]Handling ChaincodeMessage of type: QUERY(state:ready)
ID Extracted and Type = 2016
Args supplied : [2016]
GetListOfOpenAucs
vagrant@hyperledger-devenv:v0.0.10-35326c2:/opt/gopath/src/github.com/hyperledger/fabric/auction/art/scripts$ $PEER chaincode query -l golang -n mycc -c '{"Function": "GetListOfOpenAucs", "Args": ["2016"]}'
2016/06/28 23:38:36 Load docker HostConfig: %+v &{[] [] [] [] false map[] [] false [] [] [] [] host { 0} [] { map[]} false [] 0 0 0 false 0 0 0 0 []}
23:38:36.875 [crypto] main -> INFO 002 Log level recognized 'info', set to INFO
[{"AuctionID":"1111","RecType":"AUCREQ","ItemID":"1800","AuctionHouseID":"200","SellerID":"400","RequestDate":"04012016","ReservePrice":"1200","BuyItNowPrice":"1800","Status":"OPEN","OpenDate":"2016-06-28 23:29:56","CloseDate":"2016-06-28 23:30:56"}]
vagrant@hyperledger-devenv:v0.0.10-35326c2:/opt/gopath/src/github.com/hyperledger/fabric/auction/art/scripts$
This code is really good thanks.
we can make it more readable spliting the code in multiples files, like this repo: https://github.com/IBM-Blockchain/fabric-boilerplate/tree/master/src/build-chaincode
The branch:master supports the x86_64-1.0.0-snapshot-8d3275f for hyperledge/fabric ?
GetListOfItemsOnAuc
- Function name is misleading.
Pre-Condition: Launch Peer and Chaincode
Description:
$PEER chaincode query -l golang -n mycc -c '{"Function": "GetListOfItemsOnAuc", "Args": ["2016"]}'
Issue Descripton:
Current OwnerID is not changing in GetListOfItemsOnAuc
function after Transfer an Item.
Pre-Condition:
Launch Peer and chaincode
Steps to reproduce:
Run below commands:
$PEER chaincode query -l golang -n mycc -c '{"Function": "GetListOfItemsOnAuc", "Args": ["2016"]}'
$PEER chaincode query -l golang -n mycc -c '{"Function": "GetItem", "Args": ["1000"]}'
(edit the script with owner ID)Actual Result:
The invoke of chaincode would be executed on multi validators. The output of time.Now() would not be the same.
bidTime := time.Now().Format("2006-01-02 15:04:05")
aBid = Bid{args[0], args[1], args[2], args[3], args[4], args[5], bidTime}
fmt.Println("CreateBidObject() : Bid Object : ", aBid)
according to your operation
orderer
INFO 002 intermediate certs folder not found at [/data/go/src/github.com/hyperledger/fabric/sampleconfig/msp/intermediatecerts]
./PostUsers
panic: Error when setting up MSP from directory /opt/gopath/src/github.com/hyperledger/fabric/msp/sampleconfig: err Could not load a valid signer certificate from directory /opt/gopath/src/github.com/hyperledger/fabric/msp/sampleconfig/signcerts, err stat /opt/gopath/src/github.com/hyperledger/fabric/msp/sampleconfig/signcerts: no such file or directory
i don't know,can you tell me
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.