- Introduction
- How was your day?
- When did you start Sovryn and what was really the goal of Sovryn?
- How BOS even came to be involved with Cardano
- Why Cardano?
- So what is the first chain that you guys are going to build this Bitcoin integration on?
- Are you going to use the BTC-OS token to incentivize Bitcoin liquidity on Cardano?
- Are Sovryn an incubator or an investor?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Cardano load calculation | |
-- Note: Protocol parameters are hardcoded to simplify understanding. | |
-- In practice, parameters should be retrieved for each block to get | |
-- exact values after parameter changes. | |
-- 24 hours load | |
SELECT SUM(load)/COUNT(id) FROM (SELECT block.id,GREATEST(block.size::decimal/90112,SUM(unit_steps)::decimal/20000000000, SUM(unit_mem)::decimal/62000000) AS load FROM block join tx ON tx.block_id=block.id JOIN redeemer ON redeemer.tx_id=tx.id WHERE time > (NOW() AT TIME ZONE 'UTC' - INTERVAL '1 DAY') GROUP BY block.id) s; | |
-- 1 hour load |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import requests, itertools | |
total = 0 | |
for epoch in itertools.count(1): | |
response = requests.head(f"https://files.old-faithful.net/{epoch}/epoch-{epoch}.car") | |
if response.status_code == 200: | |
bytes = int(response.headers["Content-Length"]) | |
total += bytes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import sys, crc8, bitstring | |
label = int(sys.argv[1]) | |
hash = crc8.crc8(label.to_bytes(2, 'big')) | |
prefix = bitstring.pack('uint:4, uint:16, bytes:1, uint:4', 0, label, hash.digest(), 0) | |
print(f"{label}: {prefix.tobytes().hex()}") |
We can make this file beautiful and searchable if this error is corrected: It looks like row 9 should actually have 5 columns, instead of 2 in line 8.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ticker_in,hash_in,ticker_out,hash_out,ada | |
MIN,ec3308cedfbe904927d51f9a0d9cb93492da29e22e32900f85a15d8c,ARBP,30b950b3afb549a467966978c67e2b8c0e03f7e2776e9a7a84a265ac,113562500 | |
ARBP,30b950b3afb549a467966978c67e2b8c0e03f7e2776e9a7a84a265ac,MIN,ec3308cedfbe904927d51f9a0d9cb93492da29e22e32900f85a15d8c,112313015 | |
RETIR,e778b14f2470ba19be2bcf811837d1f19a9cc912ff2bb6a642f6dd90,ADALO,cdb10209d937fc1559c635e35b9147febde5307b4a7d276f868775cd,73921550 | |
SWM08,9b9f891c4d56f5ce7a3b807dda4253bafdd0c439f46dc037d893a1b1,EMUR8,0ef7aa564933ce75b695cdad66be4a39b43a22726de7c58908e0e033,70186781 | |
RETIR,53195c685e224f2aed5dd8b32ac8eb9a9b569adf05a9300962f3bef5,ADALO,cdb10209d937fc1559c635e35b9147febde5307b4a7d276f868775cd,39701957 | |
SWM08,9b9f891c4d56f5ce7a3b807dda4253bafdd0c439f46dc037d893a1b1,EMUR7,8efb053977341471256685b1069d67f4aca7166bc3f94e27ebad217f,35000001 | |
SKY,4511bcca3896bcb6d43b66fb89fe079f00f44bed505c9ca232704dc9,WAV8,ea00ab4ff7004cc9aafe7a32106afd1e55d5f1c6b5a63224219a78b6,22656425 | |
RETIR,e778b14f2470ba19be2bcf811837d1f19a9cc9 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
ticker_name AS ticker, | |
VIEW, | |
count AS blocks, | |
empty_pct AS empty_pct | |
FROM ( SELECT DISTINCT ON (off_chain_pool_data.pool_id) | |
ticker_name, | |
VIEW, | |
count, | |
round(100 * avg, 1) || '%' AS empty_pct |
Smart Contracts on Cardano are Plutus scripts. We often talk about the size of transactions and blocks compared to the maximum currently authorized by the protocol parameters, but scripts are also limited in CPU and memory units.
Here is the description of those 3 properties from Cardano docs:
- The total on-chain transaction size in bytes: a simple transaction, for example, is around 300 bytes, one with metadata is around 650 bytes, and Plutus scripts are typically 4,000-8,000 bytes (future optimizations and improvements will reduce this).
- The number of computational (CPU) steps that the script uses: each step represents 1 picosecond of execution time on a benchmark machine. Typical scripts should consume less than 1,000,000,000 (1 millisecond).
- The number of memory units that the script uses: this represents the number of bytes that the script allocates. Typical scripts should consume less than 1,000,000 memory units (
addr1wx38kptjhuurcag7zdvh5cq98rjxt0ulf6ed7jtmz5gpkfcgjyyx3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH stake AS | |
(SELECT d1.addr_id | |
FROM delegation d1, pool_hash | |
WHERE pool_hash.id=d1.pool_hash_id | |
AND pool_hash.hash_raw='\xabacadaba9f12a8b5382fc370e4e7e69421fb59831bb4ecca3a11d9b' | |
AND NOT EXISTS | |
(SELECT TRUE | |
FROM delegation d2 | |
WHERE d2.addr_id=d1.addr_id | |
AND d2.tx_id>d1.tx_id) |
for <[email protected]>; Sun, 22 Nov 2020 20:27:20 +0000 (UTC)
Hi,
As a pool operator concerned by the effectiveness of the Sybil attack you started testing during ITN and the similar strategy you use on mainnet, I have the following questions:
Hi Smaug,
NewerOlder