Skip to content

Instantly share code, notes, and snippets.

View kushti's full-sized avatar

Alexander Chepurnoy kushti

View GitHub Profile
{ "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
}

Ergo Addresses

In today's article, we will have a closer look into the Ergo address formatting. In addition to that we are going to explain how they work specifically as well as what makes them preferable to other types of blockchain addresses.

Let's start at the very beginning.

The moment you install any cryptocurrency wallet you automatically create an address with it. Very loosely speaking you can compare a wallet to a traditional bank account and an address to the matching account number. It is precisely one of these alphanumeric addresses that's needed to either send money from person A to person B, receive money or withdraw your mining rewards. If you want to get started using the Ergo wallet and dive deeper into its functions go check out the following link.

After-Launch Thoughts and Ergo Roadmap

Firstly, we would like to thank many enthusiasts, developers, miners, other folks, and our families for measureless help with Ergo development and launching. The launch finishes a few years period of initial research and development by the Team, and also starts a new epoch, where the core technology is mostly set in stone and gradual improvements in protocol implementations and infrastructure projects become the main focus.

The current core Ergo Core Team remains fully committed to the project (at least, while the Foundation Treasury enables that). With that in mind, let me give the light on current status of the project and future plans.

package org.ergoplatform
import scorex.util.encode.Base58
import sigmastate.basics.DLogProtocol.ProveDlog
import sigmastate.eval.CSigmaProp
object Tester extends App {
implicit val ergoAddressEncoder: ErgoAddressEncoder = new ErgoAddressEncoder(ErgoAddressEncoder.MainnetNetworkPrefix)
val miningKey = "mPdcmWTSJ6EGpC5WrQJKs5x6G8aEEgsKnrZLPbFqbUthiMXjsU5ivv4rNwoXfgd2FDRycwajErTNwHH9"
# Spending mining reward
This text is to help miners to withdraw funds mined.
A lot of folks launched a node and also a miner, with "pubkeyHex" from the miner embedded in the node config. Now
information on how to recognize the coins mined and withdraw them to another address.
# On keys.
@kushti
kushti / gist:6e5afdb21a5c4d20bc49bca8b9eaf23f
Created January 25, 2019 14:27
exception in MixExample
key not found: 1
java.util.NoSuchElementException: key not found: 1
at scala.collection.MapLike.default(MapLike.scala:235)
at scala.collection.MapLike.default$(MapLike.scala:234)
at scala.collection.AbstractMap.default(Map.scala:63)
at scala.collection.mutable.HashMap.apply(HashMap.scala:69)
at sigmastate.serialization.ValDefTypeStore.apply(ValDefTypeStore.scala:13)
at sigmastate.serialization.ValUseSerializer.parseBody(ValUseSerializer.scala:18)
at sigmastate.serialization.ValUseSerializer.parseBody(ValUseSerializer.scala:8)
at sigmastate.serialization.ValueSerializer$.deserialize(ValueSerializer.scala:175)
package sigmastate.utxo.examples
import java.math.BigInteger
import org.ergoplatform.ErgoBox.{R4, R5, R6}
import org.ergoplatform._
import scorex.crypto.hash.{Blake2b256, Digest32}
import scorex.utils.Random
import sigmastate.Values.{ByteArrayConstant, ByteConstant, GroupElementConstant, IntConstant, SigmaPropConstant}
import sigmastate._
object ConcreteCollection extends App {
import scala.reflect.runtime.universe.{typeTag, TypeTag}
def restoreElement[S <: SType](body: Array[Byte], idx: Int): (Value[_ <: SType], TypeTag[_ <: SType]) = {
if (body(idx) == 10) (IntConstant(body(idx + 1)), typeTag[SInt.type])
else if (body(idx) == 11) BooleanConstant.fromBoolean(body(idx + 1) != 0) -> typeTag[SBoolean.type] else ???
}
def normalize[S <: SType](elems: (Value[_ <: SType], TypeTag[_ <: SType])*)(t: TypeTag[S]): IndexedSeq[Value[S]] = {
sbt "runMain org.ergoplatform.ErgoApp /home/kushti/ergo/ergo/src/main/resources/my-application.conf"