Giter VIP home page Giter VIP logo

blockchain_with_go's Introduction

Blockchain with go

blockchain_with_go's People

Contributors

agwab avatar young-jang avatar hihiboss avatar

Stargazers

DHOT Networks - Evolving Technologies... avatar  avatar  avatar Junoh Shin avatar 이준범 avatar Eui-Joon avatar  avatar

Watchers

James Cloos avatar  avatar  avatar

blockchain_with_go's Issues

Implements NewUTXO

Componet
utxo.go

Detail
NewUTXO get TxOutput and height from coinbase
Need to more discuss....

serialize / deserialize

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.

[bug]

TestNewUTXOSet and TestNewBlockChain is conflicted!

머클트리 구현

Component
blockchain/merkletree.go

Detail
머클트리 구현, 테스트케이스 구현

[Config] refac

Componet
conf/

Proposal Detail
After #33 is complete, refac codes by apply configuration.

[wallet] 결정적 지갑 시드 구현

Componet
wallet.go

Proposal Detail
현재는 간단하게 non-deterministic으로 구현하는 방향이지만 deterministic한 wallet도 고려해 볼만하다고 생각합니다. seed를 어떻게 생성하고 지갑은 어떤식으로 구성할지 생각해보면 좋을 것 같습니다.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.