1

Ultimate Go: Advanced Engineering Episode 19

 1 year ago
source link: https://www.ardanlabs.com/blog/2023/01/ultimate-go-advanced-engineering-episode-19.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Ultimate Go: Advanced Engineering Episode 19

Author image

Cheikh Seck

January 24, 2023

Introduction

In episode 18, Bill defined the Go type that will represent a transaction and implemented the methods to validate one. While developing the transaction type, Bill states that he’ll be borrowing concepts from Ethereum to ensure that he’s building a reference implementation. Bill’s transaction type has a field named nonce, similar to Ethereum, that ensures transactions are executed in order. The nonce value of the last transaction is stored in his accounting database and later compared for additional verification.

In this video, Bill will implement the data structure that will house a user’s account. The first step he takes is to define the data structure of an account and give a brief walkthrough of the reasoning behind his design. Next, Bill will add a factory function to abstract initializing an account on the system. Watch and learn how you can define an account on your blockchain and the minimum set of fields required for operation.

Things you will learn in this video

  • How to define an account type.
  • Properly model the account data structure.

Video


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK