Skip to content

Instantly share code, notes, and snippets.

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/jfreeman/code/xpring-py/xpring/client.py", line 108, in send
self.submit(signed_transaction)
File "/home/jfreeman/code/xpring-py/xpring/client.py", line 88, in submit
self.grpc_client.SubmitSignedTransaction(request)
File "/home/jfreeman/code/xpring-py/.venv/lib/python3.7/site-packages/grpc/_channel.py", line 826, in __call__
return _end_unary_response_blocking(state, call, False, None)
File "/home/jfreeman/code/xpring-py/.venv/lib/python3.7/site-packages/grpc/_channel.py", line 729, in _end_unary_response_blocking
raise _InactiveRpcError(state)
secp256k1 is just one popular curve for the Elliptic Curve Digital Signature algorithm (ECDSA).
An ECDSA key is a 256-bit value.
ECDSA will sign a 256-bit value.
If you want to sign a message of arbitrary length, it is customary to first hash the message to a 256-bit value.
One popular hash is SHA-256, but the one XRPL uses is "SHA-512 Half" (SHA-512 truncated to the first half, which is 256 bits).
ECDSA returns a point on a plane, whose coordinates are commonly named `r` and `s`.
Distinguished Encoding Rules (DER) is a popular encoding of a structure called Abstract Syntax Notation One (ASN.1).
ASN.1 can represent types like integers, sequences, and sets.
DER encodes these values to tag-length-value byte sequences.
secp256k1 is just one popular curve for the Elliptic Curve Digital Signature algorithm (ECDSA).
An ECDSA key is a 256-bit value.
ECDSA will sign a 256-bit value.
If you want to sign a message of arbitrary length, it is customary to first hash the message to a 256-bit value.
One popular hash is SHA-256, but the one XRPL uses is "SHA-512 Half" (SHA-512 truncated to the first half, which is 256 bits).
ECDSA returns a point on a plane, whose coordinates are commonly named `r` and `s`.
Distinguished Encoding Rules (DER) is a popular encoding of a structure called Abstract Syntax Notation One (ASN.1).
ASN.1 can represent types like integers, sequences, and sets.
DER encodes these values to tag-length-value byte sequences.
ECDSA signatures (`r` and `s`) are customarily encoded with DER.
[100%] Linking CXX executable rippled
/usr/include/google/protobuf/arenastring.h:272: error: undefined reference to 'google::protobuf::internal::fixed_address_empty_string[abi:cxx11]'
/usr/include/google/protobuf/arenastring.h:272: error: undefined reference to 'google::protobuf::internal::fixed_address_empty_string[abi:cxx11]'
/usr/include/google/protobuf/arenastring.h:272: error: undefined reference to 'google::protobuf::internal::fixed_address_empty_string[abi:cxx11]'
/usr/include/google/protobuf/arenastring.h:272: error: undefined reference to 'google::protobuf::internal::fixed_address_empty_string[abi:cxx11]'
/usr/include/google/protobuf/arena.h:532: error: undefined reference to 'google::protobuf::internal::ArenaImpl::AllocateAlignedAndAddCleanup(unsigned long, void (*)(void*))'
/usr/include/google/protobuf/arena.h:515: error: undefined reference to 'google::protobuf::Arena::OnArenaAllocation(std::type_info const*, unsigned long) const'
/usr/include/google/protobuf/arena.h:532: error: undefined referenc
// Objects.ts
type ObjectOf<T> = {
[key: string]: T;
};
function map<A, B>(
input: ObjectOf<A>,
f: (a: A, key: string) => B
): ObjectOf<B> {
@thejohnfreeman
thejohnfreeman / Dockerfile
Last active February 12, 2022 10:47
Trying to install anything from Visual Studio in a Docker container
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8
# Use the latest release channel.
ADD https://aka.ms/vs/16/release/channel C:\TEMP\VisualStudio.chman
# Download the Visual Studio Build Tools bootstrapper.
ADD https://aka.ms/vs/16/release/vs_buildtools.exe C:\TEMP\vs_buildtools.exe
# Download the Visual Studio Community bootstrapper.
ADD https://aka.ms/vs/16/release/vs_community.exe C:\TEMP\vs_community.exe
In file included from ../../.nih_c/ninja/GNU_7.4.0/Debug/src/soci/include/soci/into-type.h:13:0,
from ../../.nih_c/ninja/GNU_7.4.0/Debug/src/soci/include/soci/blob-exchange.h:12,
from ../../.nih_c/ninja/GNU_7.4.0/Debug/src/soci/include/soci/soci.h:15,
from ../../src/ripple/core/SociDB.h:39,
from ../../src/ripple/core/DatabaseCon.h:24,
from ../../src/ripple/overlay/PeerReservationTable.h:24,
from ../../src/ripple/overlay/impl/PeerReservationTable.cpp:20:
../../.nih_c/ninja/GNU_7.4.0/Debug/src/soci/include/soci/exchange-traits.h: In instantiation of ‘struct soci::details::exchange_traits<ripple::PublicKey>’:
../../.nih_c/ninja/GNU_7.4.0/Debug/src/soci/include/soci/bind-values.h:111:76: required from ‘void soci::details::use_type_vector::exchange_(const soci::details::use_container<const T, void>&, ...) [with T = ripple::PublicKey]’
../../.nih_c/ninja/GNU_7.4.0/Debug/src/soci/include/soci/bind-values.h:40:9:
cmake_minimum_required(VERSION 3.7)
project(codegen LANGUAGES CXX)
add_custom_command(
OUTPUT output.h
COMMAND bash -c "echo copying...\; cp input.h output.h\; echo done!"
DEPENDS input.h
)
add_custom_target(my_header DEPENDS output.h)
get_property(tests DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY TESTS)
foreach(test ${tests})
set_tests_properties(${test} PROPERTIES FIXTURES_REQUIRED cleanup_fixture)
endforeach()
add_test(cleanup ...)
set_tests_properties(cleanup PROPERTIES FIXTURES_CLEANUP cleanup_fixture)

how about we use consensus to queue restarts? here's the idea:

A new transaction, call it NodeRestart. A validator submits a NodeRestart txn when it wants to restart. Parameters include a start and end ledger sequence. The meaning is that if a validator's NodeRestart txn is accepted and wins (more on that later), then it promises to shutdown after it validates the start sequence and to return before the end sequence. Other honest validators try to avoid restarting in that window.

Most of the network doesn't care about these txns, so they don't have to be part of the ledger. They get a separate section in proposals. They update a separate shared state. The validators apply these txns to their copy of that state; all other nodes just ignore the txns.

NodeRestart txns signed by anyone outside your UNL are dropped. You propose NodeRestart txns signed by someone outside your UNL only if they appeared in a proposal from a node in your UNL.

Within a transaction set, there may be multiple (and possibly conflictin