Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate different tx types #15

Open
dabasov opened this issue Oct 15, 2019 · 0 comments
Open

Validate different tx types #15

dabasov opened this issue Oct 15, 2019 · 0 comments

Comments

@dabasov
Copy link
Collaborator

dabasov commented Oct 15, 2019

validate transactions, now if we change tx type we can cause panic

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x7f76ca]

goroutine 625 [running]:
github.com/gagarinchain/network/blockchain/state.(*Snapshot).Put(0xc0004a7180, 0x80892b9cbe850ca6, 0xde19cef82cf8d3db, 0xc029e8f312, 0x0)
/app/blockchain/state/snapshot.go:71 +0x3a
github.com/gagarinchain/network/blockchain/state.(*Record).Update(0xc0004a7240, 0x80892b9cbe850ca6, 0xde19cef82cf8d3db, 0x29e8f312, 0x0, 0xc00037de01, 0xc0000c6f18)
/app/blockchain/state/record.go:117 +0x2fc
github.com/gagarinchain/network/blockchain/state.(*Record).ApplyTransaction(0xc0004a7240, 0xc000232dc0, 0x0, 0x0)
/app/blockchain/state/record.go:295 +0x1e8
github.com/gagarinchain/network/blockchain.(*Blockchain).collectTransactions(0xc000288480, 0xc0004a7240, 0xc000138ce0)
/app/blockchain/blockchain.go:635 +0x324
github.com/gagarinchain/network/blockchain.(*Blockchain).newBlock(0xc000288480, 0xc0001c3e00, 0xc000383680, 0xc0001c1740, 0x13, 0x20, 0xc000077601, 0x4)
/app/blockchain/blockchain.go:596 +0xa8b
github.com/gagarinchain/network/blockchain.(*Blockchain).NewBlock(...)
/app/blockchain/blockchain.go:583
github.com/gagarinchain/network/hotstuff.(*Protocol).OnPropose(0xc0002883f0, 0xeaf120, 0xc00006d860)
/app/hotstuff/protocol.go:363 +0x321
github.com/gagarinchain/network/hotstuff.(*StaticPacer).FireEvent(0xc000200160, 0x0, 0x0, 0x4)
/app/hotstuff/pacer.go:299 +0xb53
github.com/gagarinchain/network/hotstuff.(*Protocol).OnReceiveVote(0xc0002883f0, 0xeaf0e0, 0xc000038030, 0xc0003903a0, 0x0, 0x0)
/app/hotstuff/protocol.go:309 +0x5b6
github.com/gagarinchain/network/hotstuff.(*Protocol).handleMessage(0xc0002883f0, 0xeaf0e0, 0xc000038030, 0xc0005381c0, 0x1, 0x1)
/app/hotstuff/protocol.go:444 +0x5a4
github.com/gagarinchain/network/hotstuff.(*StaticPacer).Run(0xc000200160, 0xeaf0e0, 0xc000038030, 0xc000078120, 0xc000078180)
/app/hotstuff/pacer.go:221 +0x845
created by main.(*Context).Bootstrap
/app/run/initializer.go:243 +0x90b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant