6 error-related problems I’m trying to solve

Dark forest
Dark forest
Photo by Geran de Klerk on Unsplash.

I love Go and have been writing code with it for nearly a decade, but dealing with errors has always been a struggle. My previous company was one of the first companies in the world to use Golang in production and I’ve battled with how best to handle errors since day one. Somehow things just never felt right, so lately I started really experimenting with them to make using them feel OK.

These are the problems I wanted to solve:

  • How do I get a stack trace where the error occurred?
  • When and where should I write log output for the errors? …


This is a repost of the original from Feb. 22, 2018. The original was changed along with moving the GoChain blog to the GoChain website. I’m putting this here to have the original up for public reference.

Image for post
Image for post

GoChain uses a Proof of Reputation (PoR) consensus model that depends on the reputation of the participants to keep the network secure. A participant (a block signer) must have a reputation important enough that they would face significant financial and brand consequences if they were to attempt to cheat the system. …


Bumping the version on merge and more

Image for post
Image for post
Photo by the author.

I’ve written articles in the past about how to version things, but things change. This is the latest and greatest on versioning your code in 2020.

I’m going to assume you’re using a CI tool for this article, and the examples will be based on GitHub Actions. However, you should be able to easily apply them to any CI tool. I’ll also assume you’re using a git-like service like GitHub for pull requests or some kind of code review.

Many modern tools are now using git tags as the de facto place to version your code. …


Our blog has found a new home, please continue to follow us at https://gochain.io/blog/

Image for post
Image for post

Signing off…


Image for post
Image for post

Central bank digital currencies (CBDC) are coming whether you like it or not. The efficiencies that will be gained from issuing digital currency can’t be ignored and I do believe that it’s just a matter of when, not if, at this point. You can read my previous post about why we need them, this post is focused on how to get them right.

I’ve read dozens of reports and articles from central banks, the international monetary fund, the world economic forum and other major players in the world economy about CBDCs. I’ve met with government officials that are researching and/or experimenting in this area. I’ve met with a central bank. I’m working with a company that is building CBDC technology for central banks. I founded a blockchain company that builds and operates a high performance public blockchain network with Fortune 250 companies like Lenovo and Dish Network running nodes on it. …


Image for post
Image for post

Over 22% of adults in the world have no bank account or payment service account. The few that do are faced with astronomically high fees just to use their own money. The average cost to use an ATM in the United States is $4.92. To put this rate in practice, if you need to spend $100 using an ATM, you will immediately lose 5%. Just to access your own money. …


Image for post
Image for post

By Travis Reeder on ALTCOIN MAGAZINE

There are pros and cons to everything and while there are a lot of advantages to decentralization, one major disadvantage is performance.

Image for post
Image for post

Decentralized: Slow

  • Bitcoin, Ethereum and most major current blockchains
  • ~10 transactions per second

Semi-centralized: Medium Fast (100x faster)

Much faster, but still not fast enough for day to day use.

Centralized: Fast (10,000 faster)

  • Centralized databases are several orders of magnitude faster than semi-centralized databases. This includes MySQL, MongoDB and almost every other database that people use today.
  • ~100,000 transactions per second (1, 2)

The OG blockchains were all very decentralized, meaning anyone could operate a node and contribute to the network (mining). The whole concept was new and blockchain enabled things that weren’t possible before, which is an amazing feat. …


Image for post
Image for post

Currently most apps/services use messaging systems behind the scenes while exposing functionality to the world via a REST API. Some of those REST endpoints may just pass along the request directly to the messaging system if it’s something that’s going to take a bit of time, then either notify something when it’s done or let the client check the status of it via another REST endpoint.

While working with Mulesoft on the concept of Evented API’s and working with the AsyncAPI project, I’ve been thinking about what it would take to expose messaging directly to third parties like we do synchronous APIs with REST. …


Have your Dockerized apps automatically build and deploy with this short tutorial

Image for post
Image for post

It’s easy to have your Dockerized apps automatically build and deploy to Google Cloud Run, an awesome service for deploying apps when you don’t want to think about infrastructure.

First, create a new project on the Google Cloud Console and copy your project ID to use throughout this post. Let’s get started!

Deploy Manually to Get Everything Ready

Set your project ID on the command line:

gcloud config set project $PROJECT_ID

Now, let’s push our app’s Docker image to the Google Container Registry for our project. Go to Container Registry in the console and enable the API, then:

docker build -t gcr.io/$PROJECT_ID/hello .
docker push gcr.io/$PROJECT_ID/hello

Next, we need to get it running with Cloud Run. …


Image for post
Image for post

You can think of a cryptocurrency transaction much like a paper check. Using a paper check, you fill in the details, sign it, then you give it to someone. So far no actual money has changed hands, you’ve just given the recipient a promise for that amount of money… assuming you have enough in your account to cover it.

A cryptocurrency transaction is very similar. You fill in almost the same details, you sign it, then you submit it to a blockchain. …

About

Travis Reeder

Founder, CTO at GoChain - Building and breaking things

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store