Skip to content

Instantly share code, notes, and snippets.

View Fraser999's full-sized avatar

Fraser Hutchison Fraser999

  • Dalrymple, Scotland.
View GitHub Profile
@Fraser999
Fraser999 / bench.txt
Created November 17, 2020 14:00
Benchmarks of wrapped bytes
serialize_vector_of_i32s
time: [105.88 us 106.06 us 106.26 us]
change: [+3.7910% +3.9990% +4.2281%] (p = 0.00 < 0.05)
Performance has regressed.
Found 6 outliers among 100 measurements (6.00%)
3 (3.00%) high mild
3 (3.00%) high severe
deserialize_vector_of_i32s
time: [2.3306 us 2.3336 us 2.3372 us]
{
"components": {
"schemas": {
"Account": {
"description": "Structure representing a user's account, stored in global state.",
"properties": {
"account_hash": {
"$ref": "#/components/schemas/AccountHash"
},
"action_thresholds": {
@Fraser999
Fraser999 / chainspec.toml.diff
Created February 5, 2021 16:33
Diff between chainspec <= 0.7.3 and later
1c1,9
< [genesis]
---
> [protocol]
> # Protocol version.
> version = '1.0.0'
>
> [protocol.activation_point]
> # This protocol version becomes active at the start of this era.
> era_id = 0
@Fraser999
Fraser999 / install-upgrade.sh
Last active April 16, 2021 15:33
nctl upgrade scripts
#!/usr/bin/bash
set -o errexit
set -o pipefail
ACTIVATION_POINT=1
NODE_V2="/home/fraser/Rust/casper-node/target/release/casper-node"
V2=1_1_0
V2_SEMVER=1.1.0
@Fraser999
Fraser999 / rpc.discovery.json
Created April 21, 2021 19:03
The OpenRPC-compatible schema describing the JSON-RPC API of the Casper network at version 1.0.0.
{
"openrpc":"1.0.0-rc1",
"info":{
"version":"1.0.0",
"title":"Client API of Casper Node",
"description":"This describes the JSON-RPC 2.0 API of a node on the Casper network.",
"contact":{
"name":"CasperLabs",
"url":"https://casperlabs.io"
},
@Fraser999
Fraser999 / casper_node_networking_protocol_1.5.0.md
Created August 9, 2022 17:59
Casper Node Networking Protocol (Mainnet Protocol Version 1.5.0)

Casper Node Networking Protocol (Mainnet Protocol Version 1.5.0)

This is a description of the casper-node's networking protocol. This document follows the conventions laid out in RFC2119.

Connection level

Any casper-node taking part in the casper network SHOULD open connections to every other casper-node it is aware of and has not blocked. These connections are established using TLS, presenting a client certificate.

Reciprocity, retries and data direction