You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/pages/release-notes/0.29.0.md
+18-20Lines changed: 18 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,13 @@
1
1
---
2
-
title: Release Notes
3
-
description: Anchor - Release Notes
2
+
title: Release Notes 0.29.0
3
+
description: Anchor - Release Notes 0.29.0
4
4
---
5
5
6
6
Anchor keeps a [CHANGELOG](https://github.com/coral-xyz/anchor/blob/master/CHANGELOG.md) but it's not easy to make sense what has changed, what effect does the change have and how to migrate. This is where release notes comes in, an easy to digest and actionable view for each release.
7
7
8
8
---
9
9
10
-
## [0.29.0]
11
-
12
-
### How to update
10
+
## How to update
13
11
14
12
1. Update `avm`:
15
13
@@ -27,7 +25,7 @@ Anchor keeps a [CHANGELOG](https://github.com/coral-xyz/anchor/blob/master/CHANG
27
25
28
26
4. Update TS package(s) to `0.29.0`.
29
27
30
-
###Solana `1.14` is no longer supported
28
+
## Solana `1.14` is no longer supported
31
29
32
30
Minimum supported Solana version is now `1.16.0` because
33
31
@@ -40,7 +38,7 @@ If you are still on Solana `1.14`, update by running:
40
38
solana-install init 1.17.0
41
39
```
42
40
43
-
###Override toolchain for the workspace
41
+
## Override toolchain for the workspace
44
42
45
43
`Anchor.toml` has a new section called `[toolchain]` that allows overriding the current toolchain versions inside the workspace.
46
44
@@ -50,13 +48,13 @@ anchor_version = "0.29.0" # `anchor-cli` version to use
50
48
solana_version = "1.17.0"# Solana version to use
51
49
```
52
50
53
-
####Notes
51
+
### Notes
54
52
55
53
- Fields are optional.
56
54
-`anchor_version` requires [`avm`](https://github.com/coral-xyz/anchor/tree/master/avm) to be installed.
57
55
- Before this release, `anchor_version` and `solana_version` keys in `Anchor.toml` were being used for Docker verifiable builds only. Now, all commands work via the `[toolchain]` section.
58
56
59
-
###Install CLI from commit with `avm`
57
+
## Install CLI from commit with `avm`
60
58
61
59
It is possible to install CLI from commit by running:
62
60
@@ -94,7 +92,7 @@ Specify `toolchain.anchor_version` as `<VERSION>-<COMMIT>`:
Programs created with `anchor init` or `anchor new` have a single `lib.rs` file but not everyone prefers a single file approach for programs.
100
98
@@ -123,7 +121,7 @@ or if you have an existing workspace:
123
121
anchor new <NAME> --template multiple
124
122
```
125
123
126
-
###Upgradeable programs in tests
124
+
## Upgradeable programs in tests
127
125
128
126
You can now configure upgradability of the programs in `anchor test`.
129
127
@@ -143,7 +141,7 @@ program = "swap.so"
143
141
upgradeable = true
144
142
```
145
143
146
-
###Lamport utilities
144
+
## Lamport utilities
147
145
148
146
Transferring lamports from a PDA is quite complicated due to the types that are being used.
149
147
@@ -175,7 +173,7 @@ let lamports = ctx.accounts.my_account.get_lamports();
175
173
176
174
**Note:** The new methods are not only more ergonomic but they are also more performant than the previous examples. This is because `to_account_info` method clones the data internally but the new methods use a reference to the underlying data.
177
175
178
-
###Type safe context bumps
176
+
## Type safe context bumps
179
177
180
178
Before this release, `ctx.bumps` used to be a `BTreeMap<String, u8>` which doesn't provide type safety for the keys(account names).
181
179
@@ -191,7 +189,7 @@ let bump = ctx.bumps.my_account;
191
189
192
190
**Note**: The new way is not only more intuitive but also is more performant. This is mainly because `BTreeMap` is heap-allocated and it has to resize and grow occasionally.
193
191
194
-
###`idl-build` feature
192
+
## `idl-build` feature
195
193
196
194
There is a new way to generate IDLs via compilation.
197
195
@@ -208,7 +206,7 @@ The IDL will be built automatically when you run `anchor build` but if you'd lik
208
206
anchor idl build
209
207
```
210
208
211
-
####Notes
209
+
### Notes
212
210
213
211
- All crates that are being used for the IDL generation needs to be added to the `idl-build` feature list.
214
212
@@ -227,7 +225,7 @@ idl-build = [
227
225
- Generation time is a lot slower compared to the default method(parsing) due to Rust compile times.
228
226
- Even though most of it works great, some parts are still rough around the edges and you may encounter parts that are not fully ironed out. Please [create an issue](https://github.com/coral-xyz/anchor/issues) if you run into a problem.
229
227
230
-
###Type aliases
228
+
## Type aliases
231
229
232
230
Anchor IDL now supports type aliases.
233
231
@@ -284,7 +282,7 @@ Generates the following IDL:
284
282
285
283
**Note:** This example only works with the default IDL generation method(parsing) for now because type aliases for default Rust types don't work properly with `idl-build`([#2640](https://github.com/coral-xyz/anchor/issues/2640)).
286
284
287
-
###Export `mpl-token-metadata`
285
+
## Export `mpl-token-metadata`
288
286
289
287
`anchor-spl` with `metadata` feature enabled now exports the `mpl-token-metadata` crate.
290
288
@@ -302,7 +300,7 @@ and use the exported crate from `anchor-spl`:
302
300
useanchor_spl::metadata::mpl_token_metadata;
303
301
```
304
302
305
-
###TypeScript SDK improvements
303
+
## TypeScript SDK improvements
306
304
307
305
1.`Program.addEventListener` method is now strongly typed -- correct types for the event names and the event returned from the callback instead of `any`.
308
306
@@ -317,7 +315,7 @@ use anchor_spl::metadata::mpl_token_metadata;
317
315
318
316
4. Removed `assert` and `base64-js` dependency.
319
317
320
-
###New docker image
318
+
## New docker image
321
319
322
320
The previous image([projectserum/build](https://hub.docker.com/r/projectserum/build)) is now deprecated, new image is [backpackapp/build](https://hub.docker.com/r/backpackapp/build).
**Note:**`anchor build --verifiable` now works with the latest image.
331
329
332
-
###Enhanced performance
330
+
## Enhanced performance
333
331
334
332
`0.29.0` performance is noticeably improved in all areas, the biggest one being [binary size](https://github.com/coral-xyz/anchor/blob/master/bench/BINARY_SIZE.md#0290) which is reduced ~36% compared to `0.28.0`!
0 commit comments