-
Notifications
You must be signed in to change notification settings - Fork 37
/
mix.exs
99 lines (81 loc) · 2.75 KB
/
mix.exs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
defmodule Elixium.Mixfile do
use Mix.Project
def project do
[
app: :elixium_core,
version: "0.6.3",
elixir: "~> 1.7",
elixirc_paths: ["lib"],
start_permanent: Mix.env() == :prod,
deps: deps(),
name: "Elixium Core",
description: description(),
source_url: "https://github.com/ElixiumNetwork/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},
{: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/ElixiumNetwork/elixium_core"}
]
end
def application do
[
extra_applications: [:logger],
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,
seed_peers: [
"206.189.103.38:31013",
"142.93.158.121:31013",
"142.93.152.227:31013",
"139.59.13.96:31013",
],
address_version: "EX0",
# 8 Megabyte block size
block_size_limit: 8_388_608,
data_path: "~/.elixium",
port: 31013,
max_connections: 100
]
]
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