One of the premises of WebAssembly is to support compiling multiple languages to WebAssembly.
var ethUtil = require('ethereumjs-util') | |
var fixtures = [ | |
{ | |
name: 'ethbase-1 ', | |
alphabet: 'abcdefghjklmnopqrstvwxyz', | |
magic: [ ] | |
}, | |
{ | |
name: 'ethbase-2 ', |
DISCLAIMER: There is no warranty for any of the below be correct, up to date, or valid in any form. This is not a specification, only the braindump of some code digging. In fact it is very likely all of this is incorrect and useless. DO NOT PUT TOKENS INTO ADDRESSES GENERATED USING THE INFORMATION BELOW.
From their website:
Decentralized certificate authority and naming
An experimental peer-to-peer root DNS.
Handshake aims to "airdrop" a large quantity of the tokens to developers (backed by Github and Freenode profiles) or well known people (backed by PGP WoT).
// | |
// In Solidity, a mapping is like a hashmap and works with `string` like this: | |
// mapping (string => uint) a; | |
// | |
// However it doesn't support accessors where string is a key: | |
// mapping (string => uint) public a; | |
// | |
// "Internal compiler error: Accessors for mapping with dynamically-sized keys not yet implemented." | |
// | |
// An accessor returns uint when called as `a(string)`. |
The "crossover" execution environment aka Eth1-esque abstraction over Phase2
The current proposals for Eth 2 Phase 2 revolve around a purely stateless architecture, where the only stored information is the state root of each "execution environment" on a shard. This is in stark contrast to the stateful mode of operation on Eth1.
This model expects higher level abstractions to be built atop this simple system. Here follows one proposal to achieve a familiar environment as a higher level abstraction.
/* | |
* QIMalloc - Quick, incremental malloc. | |
* | |
* This is a dummy malloc implementation, without the option to free memory space. | |
*/ | |
static int __malloc_ptr = 0; | |
static int __malloc_end = 0; | |
void *malloc(size_t size) { |
/* | |
* WARNING: Proof of concept. Do not use in production. No warranty. | |
* | |
* Safe transfer workaround for not fully ERC20 compatible tokens. | |
* Well, ERC20 had a lot of revision, who I am to say something is not compatible :) | |
* | |
* Read the following for more explanation: https://github.com/ethereum/solidity/issues/4116 | |
* | |
* In short: | |
* The final ERC20 standard (IIRC) requires the transfer function to return a boolean. Some tokens do not return anything |
UPDATE: for a clearer and up to date picture please refer to https://github.com/ewasm and https://gitter.im/ewasm/lobby
(Intro: https://github.com/ewasm)
The goal is to launch a preliminary test environment ("test net") with eWASM very early 2018 and to have a stable eWASM test ecosystem by mid-2018.
Timeline:
eWASM and Backwards Compatibility | |
================================= | |
High Level | |
---------- | |
Pros: | |
- ease transition: legacy EVM compatible with eWASM | |
Cons: |
/* | |
* This is a helper to check if a Solidity contract function is running as part of a constructor. | |
*/ | |
library ContractHelper { | |
function runningInConstructor() internal view returns (bool ret) { | |
assembly { | |
ret := iszero(iszero(extcodesize(address))) | |
} | |
} | |
} |