Skip to content

Commit

Permalink
Release v0.16 (#312)
Browse files Browse the repository at this point in the history
* Update XDR for Ledger entries (#308)

* Update XDR for Ledger entries

* Fix format

* Update contract config setting (#309)

* Update ContractCostType module

* Update the StateArchivalSettings module

* Fix format

* Remove unused alias UInt64

* Add prerelase for v0.16.0 (#311)
  • Loading branch information
einerzg authored Jul 23, 2024
1 parent dd6e73c commit 43b0115
Show file tree
Hide file tree
Showing 16 changed files with 872 additions and 94 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

# 0.16.0 (23.07.2024)

* [Support stable Protocol 21 release](https://github.com/kommitters/stellar_base/issues/310).


## 0.15.1 (12.07.2024)

* [Update soroban transaction meta type](https://github.com/kommitters/stellar_base/issues/302).
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ You should only use **`stellar_base`** if you are planning to build on top of it
```elixir
def deps do
[
{:stellar_base, "~> 0.15.1"}
{:stellar_base, "~> 0.16.0"}
]
end
```
Expand Down
26 changes: 24 additions & 2 deletions lib/xdr/contract/config_setting/contract_cost_type.ex
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,36 @@ defmodule StellarBase.XDR.ContractCostType do
VmCachedInstantiation: 12,
InvokeVmFunction: 13,
ComputeKeccak256Hash: 14,
ComputeEcdsaSecp256k1Sig: 15,
DecodeEcdsaCurve256Sig: 15,
RecoverEcdsaSecp256k1Key: 16,
Int256AddSub: 17,
Int256Mul: 18,
Int256Div: 19,
Int256Pow: 20,
Int256Shift: 21,
ChaCha20DrawBytes: 22
ChaCha20DrawBytes: 22,
ParseWasmInstructions: 23,
ParseWasmFunctions: 24,
ParseWasmGlobals: 25,
ParseWasmTableEntries: 26,
ParseWasmTypes: 27,
ParseWasmDataSegments: 28,
ParseWasmElemSegments: 29,
ParseWasmImports: 30,
ParseWasmExports: 31,
ParseWasmDataSegmentBytes: 32,
InstantiateWasmInstructions: 33,
InstantiateWasmFunctions: 34,
InstantiateWasmGlobals: 35,
InstantiateWasmTableEntries: 36,
InstantiateWasmTypes: 37,
InstantiateWasmDataSegments: 38,
InstantiateWasmElemSegments: 39,
InstantiateWasmImports: 40,
InstantiateWasmExports: 41,
InstantiateWasmDataSegmentBytes: 42,
Sec1DecodePointUncompressed: 43,
VerifyEcdsaSecp256r1Sig: 44
]

@enum_spec %XDR.Enum{declarations: @declarations, identifier: nil}
Expand Down
24 changes: 19 additions & 5 deletions lib/xdr/contract/config_setting/state_archival_settings.ex
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ defmodule StellarBase.XDR.StateArchivalSettings do

alias StellarBase.XDR.{
UInt32,
Int64,
UInt64
Int64
}

@struct_spec XDR.Struct.new(
Expand All @@ -24,7 +23,8 @@ defmodule StellarBase.XDR.StateArchivalSettings do
temp_rent_rate_denominator: Int64,
max_entries_to_archive: UInt32,
bucket_list_size_window_sample_size: UInt32,
eviction_scan_size: UInt64,
bucket_list_window_sample_period: UInt32,
eviction_scan_size: UInt32,
starting_eviction_scan_level: UInt32
)

Expand All @@ -35,7 +35,8 @@ defmodule StellarBase.XDR.StateArchivalSettings do
@type temp_rent_rate_denominator_type :: Int64.t()
@type max_entries_to_archive_type :: UInt32.t()
@type bucket_list_size_window_sample_size_type :: UInt32.t()
@type eviction_scan_size_type :: UInt64.t()
@type bucket_list_window_sample_period_type :: UInt32.t()
@type eviction_scan_size_type :: UInt32.t()
@type starting_eviction_scan_level_type :: UInt32.t()

@type t :: %__MODULE__{
Expand All @@ -46,6 +47,7 @@ defmodule StellarBase.XDR.StateArchivalSettings do
temp_rent_rate_denominator: temp_rent_rate_denominator_type(),
max_entries_to_archive: max_entries_to_archive_type(),
bucket_list_size_window_sample_size: bucket_list_size_window_sample_size_type(),
bucket_list_window_sample_period: bucket_list_window_sample_period_type(),
eviction_scan_size: eviction_scan_size_type(),
starting_eviction_scan_level: starting_eviction_scan_level_type()
}
Expand All @@ -58,6 +60,7 @@ defmodule StellarBase.XDR.StateArchivalSettings do
:temp_rent_rate_denominator,
:max_entries_to_archive,
:bucket_list_size_window_sample_size,
:bucket_list_window_sample_period,
:eviction_scan_size,
:starting_eviction_scan_level
]
Expand All @@ -70,6 +73,7 @@ defmodule StellarBase.XDR.StateArchivalSettings do
temp_rent_rate_denominator :: temp_rent_rate_denominator_type(),
max_entries_to_archive :: max_entries_to_archive_type(),
bucket_list_size_window_sample_size :: bucket_list_size_window_sample_size_type(),
bucket_list_window_sample_period :: bucket_list_window_sample_period_type(),
eviction_scan_size :: eviction_scan_size_type(),
starting_eviction_scan_level :: starting_eviction_scan_level_type()
) :: t()
Expand All @@ -81,7 +85,8 @@ defmodule StellarBase.XDR.StateArchivalSettings do
%Int64{} = temp_rent_rate_denominator,
%UInt32{} = max_entries_to_archive,
%UInt32{} = bucket_list_size_window_sample_size,
%UInt64{} = eviction_scan_size,
%UInt32{} = bucket_list_window_sample_period,
%UInt32{} = eviction_scan_size,
%UInt32{} = starting_eviction_scan_level
),
do: %__MODULE__{
Expand All @@ -92,6 +97,7 @@ defmodule StellarBase.XDR.StateArchivalSettings do
temp_rent_rate_denominator: temp_rent_rate_denominator,
max_entries_to_archive: max_entries_to_archive,
bucket_list_size_window_sample_size: bucket_list_size_window_sample_size,
bucket_list_window_sample_period: bucket_list_window_sample_period,
eviction_scan_size: eviction_scan_size,
starting_eviction_scan_level: starting_eviction_scan_level
}
Expand All @@ -105,6 +111,7 @@ defmodule StellarBase.XDR.StateArchivalSettings do
temp_rent_rate_denominator: temp_rent_rate_denominator,
max_entries_to_archive: max_entries_to_archive,
bucket_list_size_window_sample_size: bucket_list_size_window_sample_size,
bucket_list_window_sample_period: bucket_list_window_sample_period,
eviction_scan_size: eviction_scan_size,
starting_eviction_scan_level: starting_eviction_scan_level
}) do
Expand All @@ -116,6 +123,7 @@ defmodule StellarBase.XDR.StateArchivalSettings do
temp_rent_rate_denominator: temp_rent_rate_denominator,
max_entries_to_archive: max_entries_to_archive,
bucket_list_size_window_sample_size: bucket_list_size_window_sample_size,
bucket_list_window_sample_period: bucket_list_window_sample_period,
eviction_scan_size: eviction_scan_size,
starting_eviction_scan_level: starting_eviction_scan_level
]
Expand All @@ -132,6 +140,7 @@ defmodule StellarBase.XDR.StateArchivalSettings do
temp_rent_rate_denominator: temp_rent_rate_denominator,
max_entries_to_archive: max_entries_to_archive,
bucket_list_size_window_sample_size: bucket_list_size_window_sample_size,
bucket_list_window_sample_period: bucket_list_window_sample_period,
eviction_scan_size: eviction_scan_size,
starting_eviction_scan_level: starting_eviction_scan_level
}) do
Expand All @@ -143,6 +152,7 @@ defmodule StellarBase.XDR.StateArchivalSettings do
temp_rent_rate_denominator: temp_rent_rate_denominator,
max_entries_to_archive: max_entries_to_archive,
bucket_list_size_window_sample_size: bucket_list_size_window_sample_size,
bucket_list_window_sample_period: bucket_list_window_sample_period,
eviction_scan_size: eviction_scan_size,
starting_eviction_scan_level: starting_eviction_scan_level
]
Expand All @@ -165,6 +175,7 @@ defmodule StellarBase.XDR.StateArchivalSettings do
temp_rent_rate_denominator: temp_rent_rate_denominator,
max_entries_to_archive: max_entries_to_archive,
bucket_list_size_window_sample_size: bucket_list_size_window_sample_size,
bucket_list_window_sample_period: bucket_list_window_sample_period,
eviction_scan_size: eviction_scan_size,
starting_eviction_scan_level: starting_eviction_scan_level
]
Expand All @@ -178,6 +189,7 @@ defmodule StellarBase.XDR.StateArchivalSettings do
temp_rent_rate_denominator,
max_entries_to_archive,
bucket_list_size_window_sample_size,
bucket_list_window_sample_period,
eviction_scan_size,
starting_eviction_scan_level
), rest}}
Expand All @@ -200,6 +212,7 @@ defmodule StellarBase.XDR.StateArchivalSettings do
temp_rent_rate_denominator: temp_rent_rate_denominator,
max_entries_to_archive: max_entries_to_archive,
bucket_list_size_window_sample_size: bucket_list_size_window_sample_size,
bucket_list_window_sample_period: bucket_list_window_sample_period,
eviction_scan_size: eviction_scan_size,
starting_eviction_scan_level: starting_eviction_scan_level
]
Expand All @@ -213,6 +226,7 @@ defmodule StellarBase.XDR.StateArchivalSettings do
temp_rent_rate_denominator,
max_entries_to_archive,
bucket_list_size_window_sample_size,
bucket_list_window_sample_period,
eviction_scan_size,
starting_eviction_scan_level
), rest}
Expand Down
Loading

0 comments on commit 43b0115

Please sign in to comment.