diff --git a/DevelopmentNotes.md b/DevelopmentNotes.md index 82d6755..af3be98 100644 --- a/DevelopmentNotes.md +++ b/DevelopmentNotes.md @@ -31,9 +31,6 @@ other - num address evolution throught time -- fix error in exploreBlockchain.go, when getting the tx.Vin -tx 8f04960da36beaa928b9693f7dca4afae5a6122bb6874d409a1156e4c6c55024 has 4 vin, but exploreBlockchain is only getting the first - - pagination in address network generation - stop rendering dots of sankey, when view change diff --git a/README.md b/README.md index ff3a9ac..9d66f91 100644 --- a/README.md +++ b/README.md @@ -102,19 +102,10 @@ Webapp will run on 127.0.0.1:8080 ### Some screenshots Some screenshots can be old, and can contain errors. -![goBlockchainDataAnalysis](https://raw.githubusercontent.com/arnaucode/goBlockchainDataAnalysis/master/screenshots/goBlockchainDataAnalysis00_new.png "goBlockchainDataAnalysis") - ![goBlockchainDataAnalysis](https://raw.githubusercontent.com/arnaucode/goBlockchainDataAnalysis/master/screenshots/goBlockchainDataAnalysis00.png "goBlockchainDataAnalysis") -![goBlockchainDataAnalysis](https://raw.githubusercontent.com/arnaucode/goBlockchainDataAnalysis/master/screenshots/goBlockchainDataAnalysis06.gif "goBlockchainDataAnalysis") - -![goBlockchainDataAnalysis](https://raw.githubusercontent.com/arnaucode/goBlockchainDataAnalysis/master/screenshots/goBlockchainDataAnalysis05.png "goBlockchainDataAnalysis") - - ![goBlockchainDataAnalysis](https://raw.githubusercontent.com/arnaucode/goBlockchainDataAnalysis/master/screenshots/goBlockchainDataAnalysis01.png "goBlockchainDataAnalysis") - ![goBlockchainDataAnalysis](https://raw.githubusercontent.com/arnaucode/goBlockchainDataAnalysis/master/screenshots/goBlockchainDataAnalysis02.png "goBlockchainDataAnalysis") - -![goBlockchainDataAnalysis](https://raw.githubusercontent.com/arnaucode/goBlockchainDataAnalysis/master/screenshots/goBlockchainDataAnalysis04.png "goBlockchainDataAnalysis") +![goBlockchainDataAnalysis](https://raw.githubusercontent.com/arnaucode/goBlockchainDataAnalysis/master/screenshots/goBlockchainDataAnalysis03.gif "goBlockchainDataAnalysis") diff --git a/exploreBlockchain.go b/exploreBlockchain.go index d5912f1..1140673 100644 --- a/exploreBlockchain.go +++ b/exploreBlockchain.go @@ -125,70 +125,70 @@ func explore(client *rpcclient.Client, blockHash string) { txVi, err := client.GetRawTransactionVerbose(th) check(err) - if len(txVi.Vout[Vi.Vout].ScriptPubKey.Addresses) > 0 { - //add tx to newBlock - newBlock.Tx = append(newBlock.Tx, blockTx.Txid) - - //Tx save - for _, originAddr := range txVi.Vout[Vi.Vout].ScriptPubKey.Addresses { - originAddresses = append(originAddresses, originAddr) - - var newVin Vin - newVin.Txid = blockTx.Txid - newVin.Amount = txVi.Vout[Vi.Vout].Value - newVin.Address = originAddr - newTx.Vin = append(newTx.Vin, newVin) - - var n1 NodeModel - n1.Id = originAddr - n1.Label = originAddr - n1.Title = originAddr - n1.Group = strconv.FormatInt(block.Height, 10) - n1.Value = 1 - n1.Shape = "dot" - n1.Type = "address" - saveNode(nodeCollection, n1) - - //Address - var addr AddressModel - addr.Hash = originAddr - addr.InBittrex = false - saveAddress(addr) - - for k, outputAddr := range outputAddresses { - var eIn EdgeModel - eIn.From = originAddr - eIn.To = txHash - eIn.Label = txVi.Vout[Vi.Vout].Value - eIn.Txid = blockTx.Txid - eIn.Arrows = "to" - eIn.BlockHeight = block.Height - saveEdge(edgeCollection, eIn) - - var eOut EdgeModel - eOut.From = txHash - eOut.To = outputAddr - eOut.Label = outputAmount[k] - eOut.Txid = blockTx.Txid - eOut.Arrows = "to" - eOut.BlockHeight = block.Height - saveEdge(edgeCollection, eOut) - - //date analysis - //dateAnalysis(e, tx.Time) - //hour analysis - hourAnalysis(eIn, blockTx.Time) - - //newTx.To = outputAddr - - } + //if len(txVi.Vout[Vi.Vout].ScriptPubKey.Addresses) > 0 { + //add tx to newBlock + newBlock.Tx = append(newBlock.Tx, blockTx.Txid) + + //Tx save + for _, originAddr := range txVi.Vout[Vi.Vout].ScriptPubKey.Addresses { + originAddresses = append(originAddresses, originAddr) + + var newVin Vin + newVin.Txid = blockTx.Txid + newVin.Amount = txVi.Vout[Vi.Vout].Value + newVin.Address = originAddr + newTx.Vin = append(newTx.Vin, newVin) + + var n1 NodeModel + n1.Id = originAddr + n1.Label = originAddr + n1.Title = originAddr + n1.Group = strconv.FormatInt(block.Height, 10) + n1.Value = 1 + n1.Shape = "dot" + n1.Type = "address" + saveNode(nodeCollection, n1) + + //Address + var addr AddressModel + addr.Hash = originAddr + addr.InBittrex = false + saveAddress(addr) + + for k, outputAddr := range outputAddresses { + var eIn EdgeModel + eIn.From = originAddr + eIn.To = txHash + eIn.Label = txVi.Vout[Vi.Vout].Value + eIn.Txid = blockTx.Txid + eIn.Arrows = "to" + eIn.BlockHeight = block.Height + saveEdge(edgeCollection, eIn) + + var eOut EdgeModel + eOut.From = txHash + eOut.To = outputAddr + eOut.Label = outputAmount[k] + eOut.Txid = blockTx.Txid + eOut.Arrows = "to" + eOut.BlockHeight = block.Height + saveEdge(edgeCollection, eOut) + + //date analysis + //dateAnalysis(e, tx.Time) + //hour analysis + hourAnalysis(eIn, blockTx.Time) + + //newTx.To = outputAddr + } - saveTx(newTx) - } else { - originAddresses = append(originAddresses, "origin") } + /*} else { + originAddresses = append(originAddresses, "origin") + }*/ } + saveTx(newTx) fmt.Print("originAddresses: ") fmt.Println(len(originAddresses)) fmt.Print("outputAddresses: ") diff --git a/screenshots/goBlockchainDataAnalysis00.png b/screenshots/goBlockchainDataAnalysis00.png index be076dd..0cd308c 100644 Binary files a/screenshots/goBlockchainDataAnalysis00.png and b/screenshots/goBlockchainDataAnalysis00.png differ diff --git a/screenshots/goBlockchainDataAnalysis00_new.png b/screenshots/goBlockchainDataAnalysis00_new.png deleted file mode 100644 index a210cb2..0000000 Binary files a/screenshots/goBlockchainDataAnalysis00_new.png and /dev/null differ diff --git a/screenshots/goBlockchainDataAnalysis01.png b/screenshots/goBlockchainDataAnalysis01.png index a0a81b2..dfc2b3b 100644 Binary files a/screenshots/goBlockchainDataAnalysis01.png and b/screenshots/goBlockchainDataAnalysis01.png differ diff --git a/screenshots/goBlockchainDataAnalysis02.png b/screenshots/goBlockchainDataAnalysis02.png index 56dc4e5..729036b 100644 Binary files a/screenshots/goBlockchainDataAnalysis02.png and b/screenshots/goBlockchainDataAnalysis02.png differ diff --git a/screenshots/goBlockchainDataAnalysis03.gif b/screenshots/goBlockchainDataAnalysis03.gif new file mode 100644 index 0000000..5e6973b Binary files /dev/null and b/screenshots/goBlockchainDataAnalysis03.gif differ diff --git a/screenshots/goBlockchainDataAnalysis04.png b/screenshots/goBlockchainDataAnalysis04.png deleted file mode 100644 index d3eb94c..0000000 Binary files a/screenshots/goBlockchainDataAnalysis04.png and /dev/null differ diff --git a/screenshots/goBlockchainDataAnalysis05.png b/screenshots/goBlockchainDataAnalysis05.png deleted file mode 100644 index 833983c..0000000 Binary files a/screenshots/goBlockchainDataAnalysis05.png and /dev/null differ diff --git a/screenshots/goBlockchainDataAnalysis06.gif b/screenshots/goBlockchainDataAnalysis06.gif deleted file mode 100644 index a5dcef6..0000000 Binary files a/screenshots/goBlockchainDataAnalysis06.gif and /dev/null differ diff --git a/screenshots/new/goBlockchainDataAnalysis00.png b/screenshots/new/goBlockchainDataAnalysis00.png deleted file mode 100644 index 0cd308c..0000000 Binary files a/screenshots/new/goBlockchainDataAnalysis00.png and /dev/null differ diff --git a/screenshots/new/goBlockchainDataAnalysis01png b/screenshots/new/goBlockchainDataAnalysis01png deleted file mode 100644 index 729036b..0000000 Binary files a/screenshots/new/goBlockchainDataAnalysis01png and /dev/null differ diff --git a/screenshots/new/goBlockchainDataAnalysis02.png b/screenshots/new/goBlockchainDataAnalysis02.png deleted file mode 100644 index dfc2b3b..0000000 Binary files a/screenshots/new/goBlockchainDataAnalysis02.png and /dev/null differ diff --git a/web/views/addressNetwork/addressNetwork.html b/web/views/addressNetwork/addressNetwork.html index 3278d0d..9a2de77 100644 --- a/web/views/addressNetwork/addressNetwork.html +++ b/web/views/addressNetwork/addressNetwork.html @@ -1,6 +1,6 @@
-
+

All addresses ({{addresses.length}})

@@ -17,7 +17,7 @@
-
+

Address history Network Map {{selectedAddress.id}}, BlockHeight: {{selectedAddress.group}}