Skip to content

Instantly share code, notes, and snippets.

View kushti's full-sized avatar

Alexander Chepurnoy kushti

View GitHub Profile
object SigmaByteArrayEncode extends App {
import scorex.util.encode.Base16
val bs = Base16.decode("10010101d801d601d17300ea0272017201").get
val bac = ByteArrayConstant(bs)
println(Base16.encode(ValueSerializer.serialize(bac)))
}
ergo {
node {
# do not store UTXO set
stateType = "digest"
# download and keep only ~4 days of full-blocks
blocksToKeep = 2880
mining = false
}
}
pub use ergo_node_interface::node_interface::{NodeInterface, NodeError};
fn main() {
let api_key= "...";
let ip = "127.0.0.1";
let port= "9053";
let node = NodeInterface::new(api_key, ip, port);
let h: Result<u64, NodeError> = node.current_block_height();
Семинар 6: структуры данных с подтверждением
Реализовать одну из следующих структур данных с подтверждением.
Один человек делает доклад про:
1) мотивацию, с которой схема была разработана
2) поддерживаемые структурой операции и их асимптотики
3) реализации и конкретные цифры производительностей операций
4) как делается тестирование программ
@kushti
kushti / yarn
Created September 23, 2020 16:24
yarn run v1.21.1
$ yarn build && electron ./app/main/electron.js
$ rimraf app/ && yarn compile && webpack --config webpack.config.js
$ tsc
Hash: c52e803eccfc46f6220f
Version: webpack 4.41.2
Child
Hash: c52e803eccfc46f6220f
Time: 29114ms
Built at: 09/23/2020 7:22:14 PM
@kushti
kushti / gist:eff51185cbfcd22d3214818a422a2dea
Created December 3, 2019 15:21
Ergo node launching command (Linux)
curl -s https://raw.githubusercontent.com/ergoplatform/ergo/master/ergo-installer.sh | sh -s -- --api-key=<YOUR_API_KEY>
ergo {
node {
stateType = "digest"
blocksToKeep = 2880
mining = false
}
}
ergo {
node {
mining = true
}
}
scorex {
restApi {
# you may wish to configure an apiKeyHash to use your wallet. Check https://ergoplatform.org/en/blog/2019_06_04_wallet-documentation/ for wallet documentation.
apiKeyHash = "1111"
{ "mnemonic": "do not reveal your secret mnemonic to anyone", "node": "http://127.0.0.1:9053", "keepPrehash": true }
@kushti
kushti / mainnet.conf
Created November 2, 2019 18:42
Mainnet config for a light node (no UTXO, checking and storing only last 2880 blocks)
ergo {
directory = "/home/kushti/ergo/mainnet-light/.ergo"
node {
stateType = "digest"
blocksToKeep = 2880
mining = false
}