Articles Blockchain

Rebuilding Trust with Technology After a Crisis
Blockchain Dev Security Thinking

Rebuilding Trust with Technology After a Crisis

💔 When Trust Breaks Down We’ve all seen what happens when people lose faith in their leaders and institutions. Protests erupt, communities divide, and frustration spills into the streets. At the heart of it, people just want the same things: honesty, safety, opportunity, and a voice in shaping their future.

Read More
มาสร้าง Blockchain ของเราเองกันเถอะ ( 2 ) , Mining
Blockchain

มาสร้าง Blockchain ของเราเองกันเถอะ ( 2 ) , Mining

Mining ( ขุด ) คือกระบวนการสร้าง block. ใหม่ แล้วเพิ่มเข้าไปใน blockchain มีขั้นตอนการทำงานดังต่อไปนี้ เรามาดู code ของ function เหล่านี้กันดีกว่า เราควรจะเริ่มดูที่ hashBlock function ซึ่งถูกเรียกใช้บ่อย function นี้ไม่มีอะไรซับซ้อนมาก แค่ทำการ hash ค่าของ previousBlockHash + nonce + currentBlockData ด้วย sha256 proofOfWork function คือการหา hash ที่ขึ้นต้นด้วย 0000 ให้เจอ เราจะเห็นว่า nonce คือตัวแปรที่เพิ่มค่าไปเรื่อยๆ ใน while loop เมื่อเราเจอ nonce ที่ถูกต้องแล้ว function ก็จะ return กลับมาดู code ที่พูดในตอนแรกจะเห็นได้ว่า createNewBlock เพียงแค่รับ […]

Read More