Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am nathanielhourt on github.
  • I am themodprobe (https://keybase.io/themodprobe) on keybase.
  • I have a public key ASCyiRRl6LqsboM1kyIKn4a8EwJxqjrE5Aa30DMsUmJ81wo

To claim this, I am signing this object:

#include <graphene/protocol/operations.hpp>
#include <fc/reflect/reflect.hpp>
namespace typelist = fc::typelist;
// Transform type reflection into the type
struct get_type { template<typename T> struct transform { using type = typename T::type; }; };
// Get a list of member types for a given type (contains duplicates)
@nathanielhourt
nathanielhourt / bts-dapps.md
Last active March 30, 2021 17:31
BitShares as a Dapp Platform

A Vision for BitShares as a Dapp Platform

There has been discussion recently about making BitShares more accessible to dapp (decentralized application) developers. This discussion has been primarily focused around creating additional documentation to help developers understand how BitShares works today, how it is implemented, and how they could utilize the blockchain infrastructure for their dapps.

Unfortunately, however, BitShares, as it exists today, was designed as a decentralized financial services platform, and is not well-suited to general dapp development. While it is theoretically possible to develop dapps that leverage BitShares infrastructure for decentralization, the blockchain lacks major facilities for decentralized application development, leaving developers to invent these solutions for themselves. In light of this fact, mere documentation is not sufficient to make BitShares an inviting platform for decentralized application development.

The Status o

@nathanielhourt
nathanielhourt / Tanks&Taps.md
Last active June 28, 2019 19:05
New BSIP: Tanks and Taps: A General Solution for Smart Contract Asset Handling
BSIP: TBD
Title: Tanks and Taps: A General Solution for Smart Contract Asset Handling
Authors: Nathan Hourt <nat.hourt@gmail.com>
Status: Draft
Type: Protocol
Created: 2019-05-31
Discussion: TBD

Abstract

This BSIP proposes the addition of novel, generally-applicable asset handling functionality to BitShares. These additions will support the development of a wide range of financial decentralized applications (dapps), advancing BitShares as an alternative platform to existing Turing Complete Smart Contract Platforms (TCSCPs) for dapp development. Although TCSCPs will continue to offer more flexible capabilities, the proposed infrastructure will offer a simple, ready-to-use interface to dapp developers which will facilitate more rapid development and a reduced time to market compared with generic Turing Complete platforms, which require dapps to define their own infrastructure. Furthermore, dapps utilizing the proposed infrastructure will share a consistent, easy-to-visualize asset

@nathanielhourt
nathanielhourt / subscriptions.md
Created May 5, 2019 23:45
BitShares Ticket-Based Subscriptions API

This document describes a ticket-based BitShares subscription API. Subscription APIs allow light clients which do not maintain their own comprehensive chain state databases to request to be notified by nodes that do maintain comprehensive databases of updates to particular objects of interest within the database.

Context and Motivation

The ticket-based subscription API described herein is a newer alternative to the original subscription API. The original API worked on the assumption that a client which wishes to subscribe to any objects will wish to be subscribed to all objects it ever requests. In practice, this assumption is not valid, which leads to subscriptions to many objects which are of no interest to the client, thereby unnecessarily congesting the network and wasting server and client resources. The problem is then compounded by the fact that the original API offers no mechanism for unsubscribing from objects, other than simply shutting off subscriptions altogether.

At the time of this writing

@nathanielhourt
nathanielhourt / bitshares-zero-to-sixty.md
Created March 14, 2019 22:18
BitShares Development: Zero to Sixty in 30 Minutes or Less

BitShares Development: Zero to Sixty in 30 Minutes or Less

Introduction to BitShares

BitShares is a decentralized, blockchain-based financial services smart contracting platform. BitShares' decentralization is based on the Delegated Proof of Stake (DPoS) consensus model, meaning that blocks are produced by a group of 'Witness' nodes which are elected by stake-weighted shareholder voting. In addition to the Witnesses is the Committee, a group of blockchain accounts, likewise elected by stakeholder voting, which vote to specify tunable blockchain parameters, and vote to include or reject proposed new features and other modifications to the consensus protocol.

BitShares is a smart contracting platform specifically targeted at financial contracts. It should be noted that BitShares is not a turing-complete smart contracting platform, meaning that BitShares does not support arbitrary, user-defined smart contracts; rather, BitShares provides a well-de