Skip to content

Commit 902b7a8

Browse files
Merge pull request #300 from kommitters/v0.15
Release v0.15.0
2 parents ec256f5 + b75ac06 commit 902b7a8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+617
-615
lines changed

.github/workflows/scorecards.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
github.com:443
3636
sigstore-tuf-root.storage.googleapis.com:443
3737
oss-fuzz-build-logs.storage.googleapis.com:443
38+
www.bestpractices.dev:443
3839
3940
- name: "Checkout code"
4041
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 0.15.0 (20.12.2023)
4+
5+
* [Support stable Protocol 20 release](https://github.com/kommitters/stellar_base/issues/295).
6+
* [Add www.bestpractices.dev to scorecards workflow](https://github.com/kommitters/stellar_base/issues/297).
7+
38
## 0.14.0 (20.09.2023)
49

510
* [Soroban Preview 11 support](https://github.com/kommitters/stellar_base/issues/290).

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ You should only use **`stellar_base`** if you are planning to build on top of it
2626
```elixir
2727
def deps do
2828
[
29-
{:stellar_base, "~> 0.14.0"}
29+
{:stellar_base, "~> 0.15.0"}
3030
]
3131
end
3232
```

lib/xdr/contract/config_setting/config_setting_entry.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ defmodule StellarBase.XDR.ConfigSettingEntry do
1919
ConfigSettingContractEventsV0,
2020
ConfigSettingContractBandwidthV0,
2121
ContractCostParams,
22-
StateExpirationSettings,
22+
StateArchivalSettings,
2323
ConfigSettingContractExecutionLanesV0,
2424
UInt64List,
2525
EvictionIterator
@@ -36,7 +36,7 @@ defmodule StellarBase.XDR.ConfigSettingEntry do
3636
CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES: ContractCostParams,
3737
CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES: UInt32,
3838
CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES: UInt32,
39-
CONFIG_SETTING_STATE_EXPIRATION: StateExpirationSettings,
39+
CONFIG_SETTING_STATE_ARCHIVAL: StateArchivalSettings,
4040
CONFIG_SETTING_CONTRACT_EXECUTION_LANES: ConfigSettingContractExecutionLanesV0,
4141
CONFIG_SETTING_BUCKETLIST_SIZE_WINDOW: UInt64List,
4242
CONFIG_SETTING_EVICTION_ITERATOR: EvictionIterator
@@ -50,7 +50,7 @@ defmodule StellarBase.XDR.ConfigSettingEntry do
5050
| ConfigSettingContractEventsV0.t()
5151
| ConfigSettingContractBandwidthV0.t()
5252
| ContractCostParams.t()
53-
| StateExpirationSettings.t()
53+
| StateArchivalSettings.t()
5454
| ConfigSettingContractExecutionLanesV0.t()
5555
| UInt64List.t()
5656
| EvictionIterator.t()

lib/xdr/contract/config_setting/config_setting_id.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ defmodule StellarBase.XDR.ConfigSettingID do
2121
CONFIG_SETTING_CONTRACT_COST_PARAMS_MEMORY_BYTES: 7,
2222
CONFIG_SETTING_CONTRACT_DATA_KEY_SIZE_BYTES: 8,
2323
CONFIG_SETTING_CONTRACT_DATA_ENTRY_SIZE_BYTES: 9,
24-
CONFIG_SETTING_STATE_EXPIRATION: 10,
24+
CONFIG_SETTING_STATE_ARCHIVAL: 10,
2525
CONFIG_SETTING_CONTRACT_EXECUTION_LANES: 11,
2626
CONFIG_SETTING_BUCKETLIST_SIZE_WINDOW: 12,
2727
CONFIG_SETTING_EVICTION_ITERATOR: 13

lib/xdr/contract/config_setting/contract_cost_type.ex

Lines changed: 22 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -12,33 +12,28 @@ defmodule StellarBase.XDR.ContractCostType do
1212

1313
@declarations [
1414
WasmInsnExec: 0,
15-
WasmMemAlloc: 1,
16-
HostMemAlloc: 2,
17-
HostMemCpy: 3,
18-
HostMemCmp: 4,
19-
DispatchHostFunction: 5,
20-
VisitObject: 6,
21-
ValSer: 7,
22-
ValDeser: 8,
23-
ComputeSha256Hash: 9,
24-
ComputeEd25519PubKey: 10,
25-
MapEntry: 11,
26-
VecEntry: 12,
27-
VerifyEd25519Sig: 13,
28-
VmMemRead: 14,
29-
VmMemWrite: 15,
30-
VmInstantiation: 16,
31-
VmCachedInstantiation: 17,
32-
InvokeVmFunction: 18,
33-
ComputeKeccak256Hash: 19,
34-
ComputeEcdsaSecp256k1Key: 20,
35-
ComputeEcdsaSecp256k1Sig: 21,
36-
RecoverEcdsaSecp256k1Key: 22,
37-
Int256AddSub: 23,
38-
Int256Mul: 24,
39-
Int256Div: 25,
40-
Int256Pow: 26,
41-
Int256Shift: 27
15+
MemAlloc: 1,
16+
MemCpy: 2,
17+
MemCmp: 3,
18+
DispatchHostFunction: 4,
19+
VisitObject: 5,
20+
ValSer: 6,
21+
ValDeser: 7,
22+
ComputeSha256Hash: 8,
23+
ComputeEd25519PubKey: 9,
24+
VerifyEd25519Sig: 10,
25+
VmInstantiation: 11,
26+
VmCachedInstantiation: 12,
27+
InvokeVmFunction: 13,
28+
ComputeKeccak256Hash: 14,
29+
ComputeEcdsaSecp256k1Sig: 15,
30+
RecoverEcdsaSecp256k1Key: 16,
31+
Int256AddSub: 17,
32+
Int256Mul: 18,
33+
Int256Div: 19,
34+
Int256Pow: 20,
35+
Int256Shift: 21,
36+
ChaCha20DrawBytes: 22
4237
]
4338

4439
@enum_spec %XDR.Enum{declarations: @declarations, identifier: nil}

lib/xdr/contract/config_setting/state_expiration_settings.ex renamed to lib/xdr/contract/config_setting/state_archival_settings.ex

Lines changed: 62 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
defmodule StellarBase.XDR.StateExpirationSettings do
1+
defmodule StellarBase.XDR.StateArchivalSettings do
22
@moduledoc """
33
Automatically generated by xdrgen
44
DO NOT EDIT or your changes may be overwritten
55
66
Target implementation: elixir_xdr at https://hex.pm/packages/elixir_xdr
77
8-
Representation of Stellar `StateExpirationSettings` type.
8+
Representation of Stellar `StateArchivalSettings` type.
99
"""
1010

1111
@behaviour XDR.Declaration
@@ -17,104 +17,104 @@ defmodule StellarBase.XDR.StateExpirationSettings do
1717
}
1818

1919
@struct_spec XDR.Struct.new(
20-
max_entry_expiration: UInt32,
21-
min_temp_entry_expiration: UInt32,
22-
min_persistent_entry_expiration: UInt32,
20+
max_entry_ttl: UInt32,
21+
min_temporary_ttl: UInt32,
22+
min_persistent_ttl: UInt32,
2323
persistent_rent_rate_denominator: Int64,
2424
temp_rent_rate_denominator: Int64,
25-
max_entries_to_expire: UInt32,
25+
max_entries_to_archive: UInt32,
2626
bucket_list_size_window_sample_size: UInt32,
2727
eviction_scan_size: UInt64,
2828
starting_eviction_scan_level: UInt32
2929
)
3030

31-
@type max_entry_expiration_type :: UInt32.t()
32-
@type min_temp_entry_expiration_type :: UInt32.t()
33-
@type min_persistent_entry_expiration_type :: UInt32.t()
31+
@type max_entry_ttl_type :: UInt32.t()
32+
@type min_temporary_ttl_type :: UInt32.t()
33+
@type min_persistent_ttl_type :: UInt32.t()
3434
@type persistent_rent_rate_denominator_type :: Int64.t()
3535
@type temp_rent_rate_denominator_type :: Int64.t()
36-
@type max_entries_to_expire_type :: UInt32.t()
36+
@type max_entries_to_archive_type :: UInt32.t()
3737
@type bucket_list_size_window_sample_size_type :: UInt32.t()
3838
@type eviction_scan_size_type :: UInt64.t()
3939
@type starting_eviction_scan_level_type :: UInt32.t()
4040

4141
@type t :: %__MODULE__{
42-
max_entry_expiration: max_entry_expiration_type(),
43-
min_temp_entry_expiration: min_temp_entry_expiration_type(),
44-
min_persistent_entry_expiration: min_persistent_entry_expiration_type(),
42+
max_entry_ttl: max_entry_ttl_type(),
43+
min_temporary_ttl: min_temporary_ttl_type(),
44+
min_persistent_ttl: min_persistent_ttl_type(),
4545
persistent_rent_rate_denominator: persistent_rent_rate_denominator_type(),
4646
temp_rent_rate_denominator: temp_rent_rate_denominator_type(),
47-
max_entries_to_expire: max_entries_to_expire_type(),
47+
max_entries_to_archive: max_entries_to_archive_type(),
4848
bucket_list_size_window_sample_size: bucket_list_size_window_sample_size_type(),
4949
eviction_scan_size: eviction_scan_size_type(),
5050
starting_eviction_scan_level: starting_eviction_scan_level_type()
5151
}
5252

5353
defstruct [
54-
:max_entry_expiration,
55-
:min_temp_entry_expiration,
56-
:min_persistent_entry_expiration,
54+
:max_entry_ttl,
55+
:min_temporary_ttl,
56+
:min_persistent_ttl,
5757
:persistent_rent_rate_denominator,
5858
:temp_rent_rate_denominator,
59-
:max_entries_to_expire,
59+
:max_entries_to_archive,
6060
:bucket_list_size_window_sample_size,
6161
:eviction_scan_size,
6262
:starting_eviction_scan_level
6363
]
6464

6565
@spec new(
66-
max_entry_expiration :: max_entry_expiration_type(),
67-
min_temp_entry_expiration :: min_temp_entry_expiration_type(),
68-
min_persistent_entry_expiration :: min_persistent_entry_expiration_type(),
66+
max_entry_ttl :: max_entry_ttl_type(),
67+
min_temporary_ttl :: min_temporary_ttl_type(),
68+
min_persistent_ttl :: min_persistent_ttl_type(),
6969
persistent_rent_rate_denominator :: persistent_rent_rate_denominator_type(),
7070
temp_rent_rate_denominator :: temp_rent_rate_denominator_type(),
71-
max_entries_to_expire :: max_entries_to_expire_type(),
71+
max_entries_to_archive :: max_entries_to_archive_type(),
7272
bucket_list_size_window_sample_size :: bucket_list_size_window_sample_size_type(),
7373
eviction_scan_size :: eviction_scan_size_type(),
7474
starting_eviction_scan_level :: starting_eviction_scan_level_type()
7575
) :: t()
7676
def new(
77-
%UInt32{} = max_entry_expiration,
78-
%UInt32{} = min_temp_entry_expiration,
79-
%UInt32{} = min_persistent_entry_expiration,
77+
%UInt32{} = max_entry_ttl,
78+
%UInt32{} = min_temporary_ttl,
79+
%UInt32{} = min_persistent_ttl,
8080
%Int64{} = persistent_rent_rate_denominator,
8181
%Int64{} = temp_rent_rate_denominator,
82-
%UInt32{} = max_entries_to_expire,
82+
%UInt32{} = max_entries_to_archive,
8383
%UInt32{} = bucket_list_size_window_sample_size,
8484
%UInt64{} = eviction_scan_size,
8585
%UInt32{} = starting_eviction_scan_level
8686
),
8787
do: %__MODULE__{
88-
max_entry_expiration: max_entry_expiration,
89-
min_temp_entry_expiration: min_temp_entry_expiration,
90-
min_persistent_entry_expiration: min_persistent_entry_expiration,
88+
max_entry_ttl: max_entry_ttl,
89+
min_temporary_ttl: min_temporary_ttl,
90+
min_persistent_ttl: min_persistent_ttl,
9191
persistent_rent_rate_denominator: persistent_rent_rate_denominator,
9292
temp_rent_rate_denominator: temp_rent_rate_denominator,
93-
max_entries_to_expire: max_entries_to_expire,
93+
max_entries_to_archive: max_entries_to_archive,
9494
bucket_list_size_window_sample_size: bucket_list_size_window_sample_size,
9595
eviction_scan_size: eviction_scan_size,
9696
starting_eviction_scan_level: starting_eviction_scan_level
9797
}
9898

9999
@impl true
100100
def encode_xdr(%__MODULE__{
101-
max_entry_expiration: max_entry_expiration,
102-
min_temp_entry_expiration: min_temp_entry_expiration,
103-
min_persistent_entry_expiration: min_persistent_entry_expiration,
101+
max_entry_ttl: max_entry_ttl,
102+
min_temporary_ttl: min_temporary_ttl,
103+
min_persistent_ttl: min_persistent_ttl,
104104
persistent_rent_rate_denominator: persistent_rent_rate_denominator,
105105
temp_rent_rate_denominator: temp_rent_rate_denominator,
106-
max_entries_to_expire: max_entries_to_expire,
106+
max_entries_to_archive: max_entries_to_archive,
107107
bucket_list_size_window_sample_size: bucket_list_size_window_sample_size,
108108
eviction_scan_size: eviction_scan_size,
109109
starting_eviction_scan_level: starting_eviction_scan_level
110110
}) do
111111
[
112-
max_entry_expiration: max_entry_expiration,
113-
min_temp_entry_expiration: min_temp_entry_expiration,
114-
min_persistent_entry_expiration: min_persistent_entry_expiration,
112+
max_entry_ttl: max_entry_ttl,
113+
min_temporary_ttl: min_temporary_ttl,
114+
min_persistent_ttl: min_persistent_ttl,
115115
persistent_rent_rate_denominator: persistent_rent_rate_denominator,
116116
temp_rent_rate_denominator: temp_rent_rate_denominator,
117-
max_entries_to_expire: max_entries_to_expire,
117+
max_entries_to_archive: max_entries_to_archive,
118118
bucket_list_size_window_sample_size: bucket_list_size_window_sample_size,
119119
eviction_scan_size: eviction_scan_size,
120120
starting_eviction_scan_level: starting_eviction_scan_level
@@ -125,23 +125,23 @@ defmodule StellarBase.XDR.StateExpirationSettings do
125125

126126
@impl true
127127
def encode_xdr!(%__MODULE__{
128-
max_entry_expiration: max_entry_expiration,
129-
min_temp_entry_expiration: min_temp_entry_expiration,
130-
min_persistent_entry_expiration: min_persistent_entry_expiration,
128+
max_entry_ttl: max_entry_ttl,
129+
min_temporary_ttl: min_temporary_ttl,
130+
min_persistent_ttl: min_persistent_ttl,
131131
persistent_rent_rate_denominator: persistent_rent_rate_denominator,
132132
temp_rent_rate_denominator: temp_rent_rate_denominator,
133-
max_entries_to_expire: max_entries_to_expire,
133+
max_entries_to_archive: max_entries_to_archive,
134134
bucket_list_size_window_sample_size: bucket_list_size_window_sample_size,
135135
eviction_scan_size: eviction_scan_size,
136136
starting_eviction_scan_level: starting_eviction_scan_level
137137
}) do
138138
[
139-
max_entry_expiration: max_entry_expiration,
140-
min_temp_entry_expiration: min_temp_entry_expiration,
141-
min_persistent_entry_expiration: min_persistent_entry_expiration,
139+
max_entry_ttl: max_entry_ttl,
140+
min_temporary_ttl: min_temporary_ttl,
141+
min_persistent_ttl: min_persistent_ttl,
142142
persistent_rent_rate_denominator: persistent_rent_rate_denominator,
143143
temp_rent_rate_denominator: temp_rent_rate_denominator,
144-
max_entries_to_expire: max_entries_to_expire,
144+
max_entries_to_archive: max_entries_to_archive,
145145
bucket_list_size_window_sample_size: bucket_list_size_window_sample_size,
146146
eviction_scan_size: eviction_scan_size,
147147
starting_eviction_scan_level: starting_eviction_scan_level
@@ -158,25 +158,25 @@ defmodule StellarBase.XDR.StateExpirationSettings do
158158
{:ok,
159159
{%XDR.Struct{
160160
components: [
161-
max_entry_expiration: max_entry_expiration,
162-
min_temp_entry_expiration: min_temp_entry_expiration,
163-
min_persistent_entry_expiration: min_persistent_entry_expiration,
161+
max_entry_ttl: max_entry_ttl,
162+
min_temporary_ttl: min_temporary_ttl,
163+
min_persistent_ttl: min_persistent_ttl,
164164
persistent_rent_rate_denominator: persistent_rent_rate_denominator,
165165
temp_rent_rate_denominator: temp_rent_rate_denominator,
166-
max_entries_to_expire: max_entries_to_expire,
166+
max_entries_to_archive: max_entries_to_archive,
167167
bucket_list_size_window_sample_size: bucket_list_size_window_sample_size,
168168
eviction_scan_size: eviction_scan_size,
169169
starting_eviction_scan_level: starting_eviction_scan_level
170170
]
171171
}, rest}} ->
172172
{:ok,
173173
{new(
174-
max_entry_expiration,
175-
min_temp_entry_expiration,
176-
min_persistent_entry_expiration,
174+
max_entry_ttl,
175+
min_temporary_ttl,
176+
min_persistent_ttl,
177177
persistent_rent_rate_denominator,
178178
temp_rent_rate_denominator,
179-
max_entries_to_expire,
179+
max_entries_to_archive,
180180
bucket_list_size_window_sample_size,
181181
eviction_scan_size,
182182
starting_eviction_scan_level
@@ -193,25 +193,25 @@ defmodule StellarBase.XDR.StateExpirationSettings do
193193
def decode_xdr!(bytes, struct) do
194194
{%XDR.Struct{
195195
components: [
196-
max_entry_expiration: max_entry_expiration,
197-
min_temp_entry_expiration: min_temp_entry_expiration,
198-
min_persistent_entry_expiration: min_persistent_entry_expiration,
196+
max_entry_ttl: max_entry_ttl,
197+
min_temporary_ttl: min_temporary_ttl,
198+
min_persistent_ttl: min_persistent_ttl,
199199
persistent_rent_rate_denominator: persistent_rent_rate_denominator,
200200
temp_rent_rate_denominator: temp_rent_rate_denominator,
201-
max_entries_to_expire: max_entries_to_expire,
201+
max_entries_to_archive: max_entries_to_archive,
202202
bucket_list_size_window_sample_size: bucket_list_size_window_sample_size,
203203
eviction_scan_size: eviction_scan_size,
204204
starting_eviction_scan_level: starting_eviction_scan_level
205205
]
206206
}, rest} = XDR.Struct.decode_xdr!(bytes, struct)
207207

208208
{new(
209-
max_entry_expiration,
210-
min_temp_entry_expiration,
211-
min_persistent_entry_expiration,
209+
max_entry_ttl,
210+
min_temporary_ttl,
211+
min_persistent_ttl,
212212
persistent_rent_rate_denominator,
213213
temp_rent_rate_denominator,
214-
max_entries_to_expire,
214+
max_entries_to_archive,
215215
bucket_list_size_window_sample_size,
216216
eviction_scan_size,
217217
starting_eviction_scan_level

lib/xdr/contract/contract_executable.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ defmodule StellarBase.XDR.ContractExecutable do
1818

1919
@arms [
2020
CONTRACT_EXECUTABLE_WASM: Hash,
21-
CONTRACT_EXECUTABLE_TOKEN: Void
21+
CONTRACT_EXECUTABLE_STELLAR_ASSET: Void
2222
]
2323

2424
@type value ::

lib/xdr/contract/contract_executable_type.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ defmodule StellarBase.XDR.ContractExecutableType do
1212

1313
@declarations [
1414
CONTRACT_EXECUTABLE_WASM: 0,
15-
CONTRACT_EXECUTABLE_TOKEN: 1
15+
CONTRACT_EXECUTABLE_STELLAR_ASSET: 1
1616
]
1717

1818
@enum_spec %XDR.Enum{declarations: @declarations, identifier: nil}

0 commit comments

Comments
 (0)