Motivation:
- Streaming encoding and decoding
- Compact
- 1st class support for needed data types
- scalars (block numbers)
- fixed length byte-strings (block hashes, state roots)
- fixed width integers (v, r, s from transaction signature)
stub |
from eth_utils import function_signature_to_4byte_selector | |
import itertools | |
import multiprocessing | |
import random | |
import time | |
TARGET = b'\x00' * 4 | |
[31m[1m________________________________ test_trie_sync ________________________________[0m | |
[1m @given(random=strategies.randoms())[0m | |
[1m> @settings(max_examples=10)[0m | |
[1m def test_trie_sync(random):[0m | |
f = <function given.<locals>.run_test_with_generator.<locals>.wrapped_test at 0x00007fea84b0d6a0> | |
[1m[31mtests/test_sync.py[0m:18: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
import asyncio | |
import random | |
class Network: | |
input = asyncio.Queue() | |
outputs = [] | |
async def broadcast(network): |
We propose the following new JSON-RPC endpoints to be optionally implemented by clients.
The motivation for these new endpoints is to allow the following use cases.
web3
style libraries).import sys | |
import codecs | |
import functools | |
from sha3 import sha3_256 | |
if sys.version_info.major == 2: | |
bytes_types = (bytes, bytearray) | |
text_types = (unicode,) # noqa: F821 |
pragma solidity ^0.4.0; | |
library StringLib { | |
function concat(string storage _head, string _tail) returns (bool) { | |
bytes head = bytes(_head); | |
bytes memory tail = bytes(_tail); | |
for (uint i = 0; i < tail.length; i++) { | |
head.push(tail[i]); | |
} |
// | |
// The new assembly support in Solidity makes writing helpers easy. | |
// Many have complained how complex it is to use `ecrecover`, especially in conjunction | |
// with the `eth_sign` RPC call. Here is a helper, which makes that a matter of a single call. | |
// | |
// Sample input parameters: | |
// (with v=0) | |
// "0x47173285a8d7341e5e972fc677286384f802f8ef42a5ec5f03bbfa254cb01fad", | |
// "0xaca7da997ad177f040240cdccf6905b71ab16b74434388c3a72f34fd25d6439346b2bac274ff29b48b3ea6e2d04c1336eaceafda3c53ab483fc3ff12fac3ebf200", | |
// "0x0e5cb767cce09a7f3ca594df118aa519be5e2b5a" |
This is an attempt of setting up a name registrar that use deposits instead of burning or token contributions and tries to optimize name utility and reduce domain squatting. Previous initiatives of charging a "rent" based on the market price with an yearly auction proved impopular with many developers as they believed the registrar wasn't delivering any value for the "tax" as well as worries that a sudden big auction could force someone unexpectedly to be forced to sell the name.
In order to start doing that let's define the problem:
Name squatting is defined as buying a name and not adding any value to it, just holding it expecting that domains names will become more valuable in the future. Let's assume that all name buyers have the intention of acquiring a name and make it more valuable over time, either by working on it as a business and adding value to the "brand", or by working to increase the chances of finding a