Skip to content

Instantly share code, notes, and snippets.

Sergey Ukustov ukstv

View GitHub Profile
View gist:f438675a2f794115972199bea8d49c5c
### Keybase proof
I hereby claim:
* I am ukstv on github.
* I am ukustov (https://keybase.io/ukustov) on keybase.
* I have a public key ASBvXosZDytPI0Je1D_VbipZ3y98Bl6vpx-6P5a2VUAgPwo
To claim this, I am signing this object:
View Conditional.sol
pragma solidity ^0.4.19;
import "./Lineup.sol";
import "./PublicRegistry.sol";
contract Conditional {
function doCall(
address _registry,
View Lineup.sol
pragma solidity ^0.4.19;
import "./LibLineup.sol";
import "./Multisig.sol";
// Optimisation Idea: Use shared Lineup.
contract Lineup {
LibLineup.State public state;
View counterfactual-bidi.ts
// 3: Prepare counterfactual deployment of Bidirectional, and update Lineup
let bidirectionalB = bytecodeManager.constructBytecode(Bidirectional, multisig.address, bidirectionalSettlementPeriod)
let bidirectionalA = await registry.counterfactualAddress(bidirectionalB, REGISTRY_NONCE)
let bidirectionalDeployment = registry.deploy.request(bidirectionalB, REGISTRY_NONCE).params[0].data
let bidirectionalCodehash = await conditional.callHash(registry.address, new BigNumber.BigNumber(0), bidirectionalDeployment)
// 4. Prepare counterfactual transfer, and update Lineup
let transferB = proxy.doCall.request(registry.address, bidirectionalA, depositA, '0x').params[0].data
let transferCodehash = await conditional.callHash(proxy.address, depositA, transferB)
View DistributeToken.sol
pragma solidity ^0.4.19;
import "zeppelin-solidity/contracts/token/ERC20/StandardToken.sol";
contract DistributeToken {
function execute(address _token, address a, address b, uint256 amountA, uint256 amountB) public {
StandardToken token = StandardToken(_token);
require(token.transfer(a, amountA));
require(token.transfer(b, amountB));
View multisig-methods.sol
function doCall(address destination, uint256 value, bytes data, bytes senderSig, bytes receiverSig);
function doDelegate(address destination, bytes data, bytes senderSig, bytes receiverSig);
function isUnanimous(bytes32 _hash, bytes _senderSig, bytes _receiverSig) public view returns(bool);
View Resilience — RES with built-in dividend pathways and swarm redistribution, for decentralized basic income (whitepaper draft).md

Resilience — RES with built-in dividend pathways and swarm redistribution, for decentralized basic income

The idea to use the global financial network of daily transactions, and to link these transactions together into a web, is a bit similar to Tim Berners-Lee's idea to link all documents on the internet together with the Hypertext Transfer Protocol (HTTP), which gave us the world wide web.

When Tim Berners-Lee had the idea for the world wide web in the 80s, there were already documents on the internet. He did not have to invent the internet, and his contribution was instead that he saw a way to harness the information on the internet in a new way.

The same goes for the Resilience protocol. The world is electrified with millions, or billions, of financial transactions happening every single day. The global financial network is part of our infrastructure already. What Resilience aims to do is to re-purpose these transaction networks, into a we

View CRDT Bibliography
2006 - Agreeing to Agree - Conflict Resolution for Optimistically Replicated Data
2007 - Designing a Commutative Replicated Data Type
2009 - CRDTs - Consistency without Concurrency Control
2011 - A Comprehensive Study of Convergent and Commutative Replicated Data Types
2011 - Conflict-free Replicated Data Types
2011 - Optimistic Concurrency Control by Melding Trees
2012 - A Lattice-Theoretical Approach to Deterministic Parallelism with Shared State
2012 - An Optimized Conflict-free Replicated Set
2012 - Brief Announcement: Semantics of Eventually Consistent Replicated Sets
2012 - Key-CRDT Stores
@ukstv
ukstv / a.rb
Created Oct 4, 2016
Results of a splat call benchmark
View a.rb
require "benchmark"
iterations = 10_000_000
def splat(*args)
args.first
end
def nosplat(args)
args.first
View герролд.md

Ох, и презабавная штука – эти защитные инструкции. Можно создать и спустить с цепи такого юридического монстра, что потом с ним десятилетиями не сладишь.

Например, дело о долларе деда Купера длится уже пятьдесят лет, и похоже, юристы будут биться с этим до конца сто-летия, когда его доллар станет дороже всей планеты.

Вот вкратце его история.

Дед Купер считал себя большим умником. Он приобрел траст стоимостью в один доллар, доходы от которого завещал первому ребенку своей единственной дочери по достижении им двадцати одного года. Кстати, тогда его дочери было четыре годика. Потом дед умер, оставив электронную инструкцию (ее быстренько обозвали «крестной феей» ), оперирующую трастом без помощи человека. Программа сначала вложила доллар в китайские трудовые соглашения, а потом в оптическую промышленность – за три недели до Пакистанского договора. После этого приобрела фьючерсные акции микробиотехнологической «Эппл» фирмы за восемнадцать дней до реализации проекта «Пепин», и так далее. За пятнадцать лет электр

You can’t perform that action at this time.