Skip to content

Instantly share code, notes, and snippets.

View isSerge's full-sized avatar
🎯
Focusing

isSerge

🎯
Focusing
View GitHub Profile
% make process
query: SELECT * FROM current_schema()
query: SELECT version();
query: SELECT * FROM "information_schema"."tables" WHERE "table_schema" = 'public' AND "table_name" = 'migrations'
query: SELECT * FROM "migrations" "migrations" ORDER BY "id" DESC
No migrations are pending
18:32:55 INFO sqd:processor last processed block was 19
18:32:55 INFO sqd:processor processing blocks from 20
18:32:55 DEBUG sqd:processor:archive-request http request
httpRequestId: 0
@isSerge
isSerge / gist:7d2277638db6e59bc195be75a920b78a
Last active March 7, 2023 13:03
Subsquid timeout error
% make process
query: SELECT * FROM current_schema()
query: SELECT version();
query: SELECT * FROM "information_schema"."tables" WHERE "table_schema" = 'public' AND "table_name" = 'migrations'
query: SELECT * FROM "migrations" "migrations" ORDER BY "id" DESC
No migrations are pending
17:01:56 INFO sqd:processor last processed block was 99
17:01:56 INFO sqd:processor processing blocks from 100
17:01:56 DEBUG sqd:processor:archive-request http request
httpRequestId: 0
@isSerge
isSerge / docker-compose.yml
Created October 13, 2022 13:34
Subsquid Archive docker-compose.yml
services:
db:
image: postgres:12 # CockroachDB cluster might be a better fit for production deployment
restart: always
volumes:
- /mnt/volume_subsquid_subspace/postgresql/data
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: squid-archive
@isSerge
isSerge / gist:cf6580052be3bd6e999ccd2b4357f98e
Created October 13, 2022 13:32
Subsquid Archive logs
Attaching to subsquid-subspace_ingest_1, subsquid-subspace_gateway_1, subsquid-subspace_explorer_1, subsquid-subspace_db_1
db_1 | The files belonging to this database system will be owned by user "postgres".
db_1 | This user must also own the server process.
db_1 |
db_1 | The database cluster will be initialized with locale "en_US.utf8".
db_1 | The default database encoding has accordingly been set to "UTF8".
db_1 | The default text search configuration will be set to "english".
db_1 |
db_1 | Data page checksums are disabled.
db_1 |
{
"version":"v0.7.0",
"notes":"Testing...",
"pub_date":"2022-06-22T19:25:57Z",
"platforms": {
"darwin": {
"signature":"dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUldUTE5QWWxkQnlZOVJZVGdpKzJmRWZ0SkRvWS9TdFpqTU9xcm1mUmJSSG5OWVlwSklrWkN1SFpWbmh4SDlBcTU3SXpjbm0xMmRjRkphbkpVeGhGcTdrdzlrWGpGVWZQSWdzPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNTkyOTE1MDU3CWZpbGU6L1VzZXJzL3J1bm5lci9ydW5uZXJzLzIuMjYzLjAvd29yay90YXVyaS90YXVyaS90YXVyaS9leGFtcGxlcy9jb21tdW5pY2F0aW9uL3NyYy10YXVyaS90YXJnZXQvZGVidWcvYnVuZGxlL29zeC9hcHAuYXBwLnRhci5negp4ZHFlUkJTVnpGUXdDdEhydTE5TGgvRlVPeVhjTnM5RHdmaGx3c0ZPWjZXWnFwVDRNWEFSbUJTZ1ZkU1IwckJGdmlwSzJPd00zZEZFN2hJOFUvL1FDZz09Cg==",
"url":"https://github.com/subspace/subspace-desktop/releases/download/0.6.8/subspace-desktop_0.6.8_amd64.deb"
},
"linux": {
const { ApiPromise, WsProvider } = require("@polkadot/api");
async function main() {
const provider = new WsProvider('wss://kusama-rpc.polkadot.io');
const api = await ApiPromise.create({ provider });
const number = 10857954;
const hash = await api.rpc.chain.getBlockHash(number);
const block = await api.rpc.chain.getBlock.raw(hash); // same with chain.getBlock(hash);
console.log(block.justifications); // result is null
import React from 'react';
import Title from './Title';
import Nav from './Nav';
import styles from "./style.css";
var lastScroll = 0;//переменная для scrollHandler
class Header extends React.Component {
constructor(){
super();