Skip to content

Instantly share code, notes, and snippets.

@julienrbrt
julienrbrt / json-to-go-zed-task.md
Last active July 28, 2025 13:47
JSON-to-Go Zed Editor Task

JSON-to-Go Zed Editor

This is a Zed Task for JSON-to-Go. I was using the VSCode extension prior to moving to Zed.

Adding this snippet to your ~/.config/zed/tasks.json plus a shortcut in the ~/.config/zed/keymap.json brings back most of the basic functionalities.

Another prerequisite is to have node installed and the json-to-go.js script placed at the location defined in your tasks.json

@julienrbrt
julienrbrt / sdk_gov_v1_052.md
Last active June 4, 2025 09:31
Gov/v1 Client Updates (v0.52)

Gov/v1 Client Updates

Note

v0.52 has been cancelled. I am just publishing this here, as I am cleaning up my local notes.

Abstract

The next version of the x/gov module adds the following features that will impact clients:

  • A new SPAM voting option
@julienrbrt
julienrbrt / sdk_v2_migration.md
Last active June 4, 2025 09:32
Migrate modules to server/v2

Migrating from sdk.Context to Core Services

Note

v0.52 has been cancelled. I am just publishing this here, as I am cleaning up my local notes.

Overview

This document outlines the migration process from the sdk.Context in the Cosmos SDK to the new core services architecture. The new approach eliminates the need for context unwrapping and introduces an appmodule.Environment struct, in cosmossdk.io/core v1, that contains all core services.

Key Changes

@julienrbrt
julienrbrt / sdk_v2.md
Created June 4, 2025 09:21
Comparing Cosmos SDK 0.50 to Cosmos SDK v2

Comparing Cosmos SDK 0.50 to Cosmos SDK v2

Introduction

The Cosmos SDK always been a framework for building blockchain applications. It is the core of the app chain vision. As the ecosystem grows, and users are asking for more features and performance, building upon a battle tested software built in 2016, started to show its limit. Binary Builders started to design and build the future of the Cosmos SDK, for setting tomorrow instead of catching up today.

This document compares the current version 0.50 with the upcoming v2, focusing on challenges, motivations, advantages, and design principles.

How things work today

func TestEndBlockerProposalHandlerFailed(t *testing.T) {
suite := createTestSuite(t)
app := suite.App
ctx := app.BaseApp.NewContext(false, tmproto.Header{})
addrs := simtestutil.AddTestAddrs(suite.BankKeeper, suite.StakingKeeper, ctx, 1, valTokens)
SortAddresses(addrs)
stakingMsgSvr := stakingkeeper.NewMsgServerImpl(suite.StakingKeeper)
header := tmproto.Header{Height: app.LastBlockHeight() + 1}
@julienrbrt
julienrbrt / migrate_simapp.sh
Last active September 9, 2022 23:21
migrate simapp with cosmovisor hacky test script
#!/bin/bash
# Usage SIMD_BIN=$(which simd) SIMD_NEW_BIN=<path to new binary> ./migrate_simapp.sh
go install https://github.com/cosmos/cosmos-sdk/cosmosvisor/cmd/cosmovisor@latest
if [[ -z $SIMD_BIN || -z $SIMD_NEW_BIN ]]; then
echo "SIMD_BIN and SIMD_NEW_BIN must be set."
exit 1
fi
@julienrbrt
julienrbrt / go-stdlib-interface-selected.md
Created January 22, 2020 15:35 — forked from asukakenji/go-stdlib-interface-selected.md
Go (Golang) Standard Library Interfaces (Selected)

Go (Golang) Standard Library Interfaces (Selected)

This is not an exhaustive list of all interfaces in Go's standard library. I only list those I think are important. Interfaces defined in frequently used packages (like io, fmt) are included. Interfaces that have significant importance are also included.

All of the following information is based on go version go1.8.3 darwin/amd64.