Packages
elixium_core
0.5.4
0.6.3
0.6.2
0.6.1
0.6.0
0.5.4
0.5.3
0.5.2
0.5.1
0.5.0
0.4.12
0.4.11
0.4.10
0.4.9
0.4.8
0.4.7
0.4.6
0.4.5
0.4.4
0.4.3
0.4.2
0.4.1
0.4.0
0.3.19
0.3.18
0.3.17
0.3.16
0.3.15
0.3.14
0.3.13
0.3.12
0.3.11
0.3.10
0.3.9
0.3.8
0.3.7
0.3.6
0.3.5
0.3.4
0.3.3
0.3.1
0.2.13
0.2.12
0.2.11
0.2.10
0.2.9
0.2.8
0.2.7
0.2.6
0.2.5
0.2.4
0.2.3
0.2.2
0.2.1
0.2.0
0.1.4
0.1.3
The core package for the Elixium blockchain, containing all the modules needed to run the chain
Current section
Files
Jump to
Current section
Files
elixium_core
mix.exs
mix.exs
defmodule Elixium.Mixfile do
use Mix.Project
def project do
[
app: :elixium_core,
version: "0.5.4",
elixir: "~> 1.7",
elixirc_paths: ["lib"],
start_permanent: Mix.env() == :prod,
deps: deps(),
name: "Elixium Core",
description: description(),
source_url: "https://github.com/elixium/elixium_core",
homepage_url: "https://elixiumnetwork.org",
package: package(),
application: application()
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:exleveldb, "~> 0.12.2"},
{:keccakf1600, "~> 2.0.0"},
{:credo, ">= 0.0.0", only: [:dev, :test], runtime: false},
{:ex_doc, ">= 0.0.0", only: [:dev], runtime: false},
{:decimal, "~> 1.0"},
{:strap, "~> 0.1.1"},
{:jason, "~> 1.0"}
]
end
defp description do
"The core package for the Elixium blockchain, containing all the modules needed to run the chain"
end
defp package() do
[
name: "elixium_core",
files: ["lib", "mix.exs", "README*", "LICENSE*", "priv"],
maintainers: ["Alex Dovzhanyn", "Zac Garby", "Nijinsha Rahman", "Matthew Eaton"],
licenses: ["MIT"],
links: %{"GitHub" => "https://github.com/elixium/elixium_core"}
]
end
def application do
[
env: [
# Total amount of tokens that will ever exist.
total_token_supply: 1_000_000_000.0,
# Block at which last block reward will be distributed. Logic behind this
# number is to have tokens distributed over X period of time. We're going for
# a total emission period of 10 years. 10 years at 2 minutes per block gives
# us this 2_628_000 number.
block_at_full_emission: 2_628_000,
sigma_full_emission: sigma_full_emission_blocks(2_628_000),
# Amount of seconds we want to spend mining each block
target_solvetime: 120,
diff_rebalance_offset: 10_080,
# Number of blocks in difficulty retargeting window
retargeting_window: 60,
# Maximum number of seconds ahead of our current time that a blocks
# timestamp can be and still be considered valid.
future_time_limit: 360,
ghost_protocol_version: "v1.0",
# Url used to bootstrap node connections
bootstrap_url: "https://registry.testnet.elixium.app/",
address_version: "EX0",
# 8 Megabyte block size
block_size_limit: 8_388_608,
data_path: "~/.elixium",
max_handlers: 10,
port: 31013,
max_bidirectional_connections: 10,
max_inbound_connections: 90
]
]
end
# Sigma of the block number @block_at_full_emission. Used in emission algorithm
defp sigma_full_emission_blocks(0), do: 0
defp sigma_full_emission_blocks(n) do
n + sigma_full_emission_blocks(n - 1)
end
end