Skip to content

Instantly share code, notes, and snippets.

@insumity
insumity / benchmark_results.txt
Created September 11, 2025 15:17
benchmark results
Compiling informalsystems-malachitebft-test v0.6.0-pre (/Users/karolos/malachite-circle/code/crates/test)
warning: unused import: `black_box`
--> crates/test/benches/proto_bench/main.rs:3:17
|
3 | use criterion::{black_box, criterion_group, criterion_main, BenchmarkId, Criterion, Throughput};
| ^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
warning: use of deprecated function `criterion::black_box`: use `std::hint::black_box()` instead
@insumity
insumity / benchmark.rs
Last active September 12, 2025 08:23
encode and then len VERSUS encoded_len
use bytes::Bytes;
use bytesize::ByteSize;
use criterion::{black_box, criterion_group, criterion_main, BenchmarkId, Criterion, Throughput};
use informalsystems_malachitebft_test::codec::proto::*;
use informalsystems_malachitebft_test::{Height, TestContext, ValueId};
use malachitebft_codec::{Codec, HasEncodedLen};
use malachitebft_core_types::{CommitCertificate, Round};
use malachitebft_sync::ValueResponse;
use malachitebft_sync::{RawDecidedValue, Response};
@insumity
insumity / genesis.json
Last active March 4, 2025 10:55
localnet genesis XRPL EVM json
{
"app_name": "exrpd",
"app_version": "v6.0.0",
"genesis_time": "2025-03-04T10:54:02.462584Z",
"chain_id": "exrp_1440002-1",
"initial_height": 1,
"app_hash": null,
"app_state": {
"07-tendermint": null,
"auth": {
@insumity
insumity / start_opt_in_chains.sh
Created November 12, 2024 12:38
Start Opt In Chains Locally
#!/bin/bash
set -eux
# This script spins a provider testnet with multiple Opt In chains launching.
# User balance of stake tokens
USER_COINS="100000000000stake"
# Amount of stake tokens staked
STAKE="100000000stake"
# Node IP address
{
"body": {
"messages": [
{
"@type": "/interchain_security.ccv.provider.v1.MsgAssignConsumerKey",
"chain_id": "consu",
"provider_addr": "cosmosvaloper1dkas8mu4kyhl5jrh4nzvm65qz588hy9qakmjnw",
"consumer_key": "{\"@type\": \"/cosmos.crypto.ed25519.PubKey\", \"key\": \"e3BehnEIlGUAnJYn9V8gBXuMh4tXO8xxlxyXD1APGyk=\"}",
"signer": "cosmos19hz4m226ztankqramvt4a7t0shejv4dc79gp9u"
}
{
"body":
{
"messages":
[
{
"@type": "/cosmos.gov.v1.MsgSubmitProposal",
"messages":
[
{
{
"title": "Propose the modification of the PSS parameters of a chain",
"summary": "summary of a modification proposal",
"chain_id": "consu",
"top_N": 0,
"validators_power_cap": 40,
"validator_set_cap": 0,
"allowlist": null,
"denylist": null,
"deposit": "10000001stake"
func (k Keeper) GetLastValidators(ctx sdk.Context) []stakingtypes.Validator {
var lastPowers []stakingtypes.LastValidatorPower
k.stakingKeeper.IterateLastValidatorPowers(ctx, func(addr sdk.ValAddress, power int64) (stop bool) {
lastPowers = append(lastPowers, stakingtypes.LastValidatorPower{Address: addr.String(), Power: power})
return false
})
var bondedValidators []stakingtypes.Validator
@insumity
insumity / Dockerfile.diff
Last active December 22, 2023 12:31
Dockerfile diff
diff --git a/Dockerfile b/Dockerfile
index 665aa3d8..4fddbc55 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -29,7 +29,7 @@ RUN go mod tidy
RUN make install
# Get Hermes build
-FROM otacrew/hermes-ics:evidence-cmd AS hermes-builder
+FROM --platform=linux/amd64 ghcr.io/informalsystems/hermes:v1.7.0 AS hermes-builder
{
"body":
{
"messages":
[
{
"@type": "/ibc.core.client.v1.MsgUpdateClient",
"client_id": "07-tendermint-259",
"header":
{