Skip to content

Commit 7426576

Browse files
committed
v1.3.7
1 parent a4ebb69 commit 7426576

File tree

6 files changed

+20
-8
lines changed

6 files changed

+20
-8
lines changed

ex/build.Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ FROM ubuntu:24.04
44
ENV DEBIAN_FRONTEND noninteractive
55

66
ENV SSL_VERSION=3.5.4
7-
ENV OTP_VERSION=OTP-28.1.1
8-
ENV ELIXIR_VERSION=v1.19.3
7+
ENV OTP_VERSION=OTP-28.2
8+
ENV ELIXIR_VERSION=v1.19.4
99

1010
RUN apt-get update && apt-get install -y vim git curl locate wget apt-transport-https apt-utils locales
1111
ENV LANGUAGE en_US.UTF-8

ex/lib/api/api_chain.ex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ defmodule API.Chain do
8080
tx_pool_size: TXPool.size(),
8181
cur_validator: DB.Chain.validator_for_height_current() |> Base58.encode(),
8282
next_validator: DB.Chain.validator_for_height_next() |> Base58.encode(),
83-
emission_for_epoch: BIC.Coin.from_flat(BIC.Epoch.epoch_emission(DB.Chain.epoch())),
84-
circulating: BIC.Coin.from_flat(BIC.Epoch.circulating_without_burn(DB.Chain.epoch())),
85-
total_supply_y3: BIC.Coin.from_flat(BIC.Epoch.circulating_without_burn(500*3)),
86-
total_supply_y30: BIC.Coin.from_flat(BIC.Epoch.circulating_without_burn(500*30)),
83+
emission_for_epoch: BIC.Coin.from_flat(RDB.protocol_epoch_emission(DB.Chain.epoch())),
84+
circulating: BIC.Coin.from_flat(RDB.protocol_circulating_without_burn(DB.Chain.epoch())),
85+
total_supply_y3: BIC.Coin.from_flat(RDB.protocol_circulating_without_burn(500*3)),
86+
total_supply_y30: BIC.Coin.from_flat(RDB.protocol_circulating_without_burn(500*30)),
8787
pflops: pflops(),
8888
burned: API.Contract.total_burned().float,
8989
txs_per_sec: stat_txs_sec(),

ex/lib/native/rdb.ex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ defmodule RDB do
5656
def bintree_contractstate_root_prove(_db, _key), do: :erlang.nif_error(:nif_not_loaded)
5757

5858
def protocol_constants(), do: :erlang.nif_error(:nif_not_loaded)
59+
def protocol_epoch_emission(_epoch), do: :erlang.nif_error(:nif_not_loaded)
60+
def protocol_circulating_without_burn(_epoch), do: :erlang.nif_error(:nif_not_loaded)
5961
end
6062

6163
defmodule RDBProtocol do

ex/lib/node/node_anr.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ defmodule NodeANR do
116116
routed = if !Application.fetch_env!(:ama, :check_routed_peer) do true else CymruRouting.globally_routed?(anr.ip4) end
117117
cond do
118118
!routed -> nil
119-
!old_anr -> insert_new(anr)
119+
!old_anr or !old_anr[:ts] -> insert_new(anr)
120120
anr.ts <= old_anr.ts -> nil
121121
old_anr.ip4 == anr.ip4 and old_anr.port == anr.port -> MnesiaKV.merge(NODEANR, anr.pk, anr)
122122
true -> insert_new(anr)

ex/mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ defmodule Ama.MixProject do
66
def project do
77
[
88
app: @app,
9-
version: "1.3.6",
9+
version: "1.3.7",
1010
elixir: ">= 1.19.0",
1111
start_permanent: Mix.env() == :prod,
1212
deps: deps(),

ex/native/rdb/src/lib.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -928,4 +928,14 @@ fn protocol_constants<'a>(env: Env<'a>) -> Term<'a> {
928928
(map).encode(env)
929929
}
930930

931+
#[rustler::nif]
932+
fn protocol_epoch_emission<'a>(env: Env<'a>, epoch: u64) -> i128 {
933+
crate::consensus::bic::epoch::epoch_emission(epoch)
934+
}
935+
936+
#[rustler::nif]
937+
fn protocol_circulating_without_burn<'a>(env: Env<'a>, epoch: u64) -> i128 {
938+
crate::consensus::bic::epoch::circulating_without_burn(epoch)
939+
}
940+
931941
rustler::init!("Elixir.RDB", load = on_load);

0 commit comments

Comments
 (0)