Skip to content

Instantly share code, notes, and snippets.

View Test.kt
override fun createSpecialOperations(position: SpecialTransactionPosition, bctx: BlockEContext): List<OpData> {
if (position == SpecialTransactionPosition.Begin) {
val retval = mutableListOf<OpData>()
val rqs = this.module.query(bctx, "get_auth_requests",
GtvDictionary.build(mapOf()))
for (r in rqs.asArray()) {
val rString = r.asString()
val res = pendingRequests[rString]
View dreddit.md

An architecture for distributed p2p reddit-like thing

Problem?

If you're a reddit user you probably know that from time to time reddit goes slow or even down due to unexpectedly high load (many users trying to use site simultaneously) and after that users create posts like "Fix it! Can't you just buy more servers?". I've found a pretty interesting question in one of those threads once -- why can't we make a distributed, p2p reddit(-like thing) so it won't depend on lots of expensive servers?

As a person who has some clue on how p2p systems work (I've implemented an ED2k client once, for example) I've commented that there are unresolved technical problems. P2P was amazingly successful for some applications, notably, filesharing. But using it for a highly-interactive

View declarativeG_example.js
const gridSpec: any = [
[{elt: "text", variant: "h1", content: "Issue options"}],
[
[
{
elt: 'form',
children: [
{
elt: 'select', name: "asset", label: "Asset", outChannel: "asset",
View TechItch.wikitext
<!-- Please do not remove or change this AfD message until the issue
is settled -->
<!-- The nomination page for this article already existed when this
tag was added. If this was because the article had been nominated for
deletion before, and you wish to renominate it, please replace
"page=Technical Itch" with "page=Technical Itch (2nd nomination)"
below before proceeding with the nomination.
-->{{AfDM|page=Technical Itch|logdate=2008 November 29|substed=yes }}
<!-- For administrator use only: {{oldafdfull|page=Technical
Itch|date=29 November 2008|result='''keep'''}} -->
View ChromiaRoadmap2021_1.md

Chromia unofficial technical roadmap 2021 Q1-Q2

Ongoing work

There are features and improvements we started working on in 2020 which haven't been released yet, they are expected to be released in Q1 2021:

  • Postchain synchronization system overhaul. We added possibility to sync blockchain from any node which has it (previously it was only possible to sync from current block producers) and increased robustness of sync subsystem. Expected to be released in January.
  • begin_block/end_block hooks. This adds a possibility for a blockchain to automatically perform an action at beginning or end of any block. While this seems like a minor feature, lack of it creates huge issues for dapp developers, e.g. Maker CDPs
View provide.txt
0xc07063976e347beaa4573bde1bcee655766391d0
0x864a505af53a397a1567dcdcc1445df3944e27fe
0x32b9b9dc1186f5c94c9b8d9198e6ae071e45a007
0xb1a5b5c6f23b57030849a6dd889bc0162ba8e280
0xbdbed46cc97e236af73736f30c3193068f6c4902
0x279d8bd11dd947f3daeb5787e0ce4d0fd798ad39
0x9ef165fcd21101136a3d586e8824551be7579a44
0x0c61ad756e686c2be8873f6e382c44a1b74a4ee3
0x70e27ab2ce035ae1b1a895643e5552a91d0244b9
0x44b8b378e6a6b69d44cb4afc7ba7af9c58b684e8
View HowToHedget.md

Intro

This is an instruction for Hedget auction users which would allow them to interact with auction even if the web site goes down. We do not expect web site to go down, but shit happens, so just in case, there's this instruction. This instruction is for power users. If you're unexperienced, there's a high chance you might screw up.

First thing to note: DO NOT SEND ANY FUNDS TO A CONTRACT DIRECTLY. Bids are placed by calling a contact function. If you send ERC20 tokens to the contract directly, they will be considered a donation to Hedget Foundation.

View rrr.md

If our interest is an append-only database, then each operation can be described as adding entry

E = F(U, Q)

to the database, where U is user data, Q is result of query on the current state of the database, and F is a function which transforms U and Q into what we want to add.

In this case commitment to E can be replaced to commitment to pair (U, Q). So a commitment to database state can be replaced with a commitment to a transaction log, where client creates transactions in the following way:

View NDF.txt
In the previous message I've described how colored coins can represent prediction market contracts.
It works when we have only two outcomes like YES or NO, but what if want something more flexible, like making a bet on price moves?
Say, we want something like CFD: http://en.wikipedia.org/wiki/Contract_for_difference
In finance, a contract for difference (or CFD) is a contract between two parties, typically described as "buyer" and "seller", stipulating that the seller will pay to the buyer the difference between the current value of an asset and its value at contract time. (If the difference is negative, then the buyer pays instead to the seller.) In effect CFDs are financial derivatives that allow traders to take advantage of prices moving up (long positions) or prices moving down (short positions) on underlying financial instruments and are often used to speculate on those markets.
(Note that what I'm describing here might not work exactly like traditional CFDs, but is probably close enough.
Although it'
View Rell 0.10.0 release notes.txt
RELEASE NOTES 0.10.0 (2019-11-04)
Upgrade instructions: http://rell.chromia.com/en/0.10.0/languageguide/migration-0.10.html
1. Language: Module system
Docs: http://rell.chromia.com/en/0.10.0/languageguide/modules.html