Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am latrasis on github.
  • I am jacobp (https://keybase.io/jacobp) on keybase.
  • I have a public key ASA0EZQKzLXVkW8jRqxEK00zZZcaqfKHTqKmZ8zXjn1V2Ao

To claim this, I am signing this object:

@Latrasis
Latrasis / beaker_deployment_workflow.md
Last active October 8, 2018 08:16
Kernel Deployment Workflow

Proposal

For now here's a primitive idea of the workflow a user would go through when deploying and instantiating a Beaker instance:

To deploy a new kernel instance a user needs:

  • CLI: Beaker CLI
  • Kernel: A Deployed Kernel Contract, with a designated Address
  • EntryProcedure: A Deployed Entry Procedure Contract, with a designated Address and chosen Id
  • Account: Any Ethereum Account with a the minimum required gas X
  • Web3Provider: A local Web3 Provider available through an HTTP address
@Latrasis
Latrasis / Grin_Peer_Banning.md
Last active June 27, 2017 02:15
RFC on Peer Banning for Grin

Peer Bans

Peers can be banned based on: invalid transactions, blocks, large payloads and large use.

Send Invalid Transaction:

This includes:

  • Invalid UTXO Inputs: self.inputs
    • Empty Inputs Set
    • Or any input with invalid Commitment
@Latrasis
Latrasis / grin_encoding_alternative.rs
Last active May 31, 2017 01:52
Grin Encoding RFC
// Current Traits:
pub trait Writeable {
/// Write the data held by this Writeable to the provided writer
fn write<W: Writer>(&self, writer: &mut W) -> Result<(), Error>;
}
pub trait Readable where Self: Sized {
/// Reads the data necessary to this Readable from the provided reader
fn read(reader: &mut Reader) -> Result<Self, Error>;
struct Animal {};
type Cat = Animal;
type Dog = Animal;
impl ToString for Animal {
fn to_string(&self) -> String {
"Animal".to_string()
}
@Latrasis
Latrasis / newtype_concept.rs
Last active March 6, 2017 18:05
Newtype Support Concept
// Type Alias Definition
type CharVec = Vec<char>;
// Impl Trait for Alias
impl ToString for CharVec {
fn to_string(&self) -> String {
String::from_iter(self)
}
}
@Latrasis
Latrasis / index.js
Last active December 14, 2015 00:34
Mithril Page Example
var m = require('mithril')
// Fetch All Modules
var WalletPage = require('wallet_page.js');
var UserPage = require('user_page.js');
var HomePage = require('home_page.js');
// Set Route with default '/' and render
m.route(document.body, '/',{
'/': HomePage,
'/wallet:userID': WalletPage,