cau-clink / blockchain_with_go Goto Github PK
View Code? Open in Web Editor NEWCAU Blockchain academy CLINK : blockchain with go-language
CAU Blockchain academy CLINK : blockchain with go-language
Componet
utxo.go
Detail
NewUTXO
get TxOutput
and height from coinbase
Need to more discuss....
Component
blockchain/utxo.go
Detail
pubkeyHash
Before
func Serialize(object interface{}) ([]byte, error) {
data, err := json.Marshal(object)
if err != nil {
panic(fmt.Sprintf("Error encoding : %s", err))
}
return data, nil
}
func Deserialize(serializedBytes []byte, object interface{}) error {
if len(serializedBytes) == 0 {
return nil
}
err := json.Unmarshal(serializedBytes, object)
if err != nil {
panic(fmt.Sprintf("Error decoding : %s", err))
}
return err
}
After
func (tx *UTXO) Serialize() ([]byte, error) {
var encoded bytes.Buffer
enc := gob.NewEncoder(&encoded)
err := enc.Encode(tx)
if err != nil {
return nil, err
}
return encoded.Bytes(), nil
}
func DeserializeUtxo(data []byte) (*UTXO, error) {
var utxo UTXO
decoder := gob.NewDecoder(bytes.NewReader(data))
err := decoder.Decode(&utxo)
if err != nil {
return nil, err
}
return &utxo, nil
}
Modified way has duplicated code... and before code has to implement additional custom marshall code.
Component
transaction.go
Componet
wallet
Component
blockchain/block.go
Detail
Hash 함수 구현
Component
transaction.go
Detail
Hash() 함수 구현
Reference
https://steemit.com/kr/@niipoong/id-create-bitcoin-txid
Component
util.cryptograph.go
Detail
개인키, 공개키 생성 함수 구현
Componet
conf/
Proposal Detail
Component
blockchain/blockchain.go
Detail
block
Component
wallet.go
Detail
비트코인 주소를 생성하는 함수 수현
Reference
https://en.bitcoin.it/wiki/Technical_background_of_version_1_Bitcoin_addresses
Component
block.go
Detail
Unmarshal 할 때 string to []byte 구현, UnmarshalJSON 구현 필요
Reference
https://blog.golang.org/json-and-go
TestNewUTXOSet
and TestNewBlockChain
is conflicted!
Component
util/cryptograph.go
Detail
Component
blockchain/merkletree.go
Detail
머클트리 구현, 테스트케이스 구현
Componet
conf/
Proposal Detail
After #33 is complete, refac codes by apply configuration.
Component
wallet.go
Detail
공개키 -> 주소 생성
Reference
https://en.bitcoin.it/wiki/Technical_background_of_version_1_Bitcoin_addresses
Component
utxo.go
Detail
Update
MethodUpdate
Method's test caseComponet
wallet.go
Proposal Detail
현재는 간단하게 non-deterministic으로 구현하는 방향이지만 deterministic한 wallet도 고려해 볼만하다고 생각합니다. seed를 어떻게 생성하고 지갑은 어떤식으로 구성할지 생각해보면 좋을 것 같습니다.
Componet
transaction
Proposal Detail
In bitcoin, blockheight can be seen only by coinbase transaction!
It will be implemented after implements script!
Reference
http://learnmeabitcoin.com/glossary/coinbase-transaction
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.