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
Using the [`wallet` from the connection guide](./how_to_connect_to_local_network.md), call `createSchnorrAccount` to create a new account with a random secretand salt:
23
+
Using the [`wallet` from the connection guide](./how_to_connect_to_local_network.md), call `createSchnorrAccount` to create a new account with a random secret, salt, and signing key:
The secret is used to derive the account's encryption keys, and the salt ensures address uniqueness. The signing key is automatically derived from the secret.
27
+
The secret derives the account's encryption keys, the signing key authenticates its transactions, and the salt ensures address uniqueness. The signing key is provided independently and is not derived from the secret: it is an ownership key, so keep it separate from the encryption secret that your PXE holds.
28
28
29
-
:::warning Store your secretand salt
30
-
Save the `secret`and `salt` values securely. You need both to recover access to your account. If you lose them, you will permanently lose access to the account and any assets it holds.
29
+
:::warning Store your secret, salt, and signing key
30
+
Save the `secret`, `salt`, and `signingKey` values securely. You need all three to recover access to your account. If you lose them, you will permanently lose access to the account and any assets it holds.
Copy file name to clipboardExpand all lines: docs/docs-developers/docs/resources/migration_notes.md
+67Lines changed: 67 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,54 @@ Aztec is in active development. Each version may introduce breaking changes that
9
9
10
10
## TBD
11
11
12
+
### [Aztec.js] Account signing keys are no longer derived from the privacy secret
13
+
14
+
Schnorr account signing keys used to be derived from the account's privacy secret (via the now-removed `deriveSigningKey`), which meant the ownership key could be reconstructed from a value the PXE holds. The relationship is now reversed: the signing key is the root, and the privacy secret is derived from it with `deriveSecretKeyFromSigningKey` (exported from `@aztec/accounts/utils`).
15
+
16
+
As a result:
17
+
18
+
-`deriveSigningKey` is removed.
19
+
-`getSchnorrAccountContractAddress` and `getSchnorrInitializerlessAccountContractAddress` now take the signing key first and an optional secret: `(signingPrivateKey, salt, secretKey?)`. When `secretKey` is omitted it is derived from the signing key.
20
+
- The embedded wallet's `createSchnorrAccount` and `createSchnorrInitializerlessAccount` now require an explicit signing key argument.
21
+
22
+
**Migration:**
23
+
24
+
```diff
25
+
- import { deriveSigningKey } from '@aztec/stdlib/keys';
**Impact**: Account addresses change, since both the signing key and the privacy secret feed the address. Code that derived the signing key from the secret, or passed the secret first to the address helpers, no longer compiles.
`aztec::messages::processing::MessageContext` has been removed in favor of the new `ResolvedTx`, which carries the same `tx_hash`, `unique_note_hashes_in_tx`, and `first_nullifier_in_tx`, plus `block_number` and `block_hash`. The offchain handoff type `OffchainMessageWithContext` is likewise renamed to `OffchainMessageWithTx`.
38
+
39
+
This affects contracts that implement a custom message handler (registered via `AztecConfig::custom_message_handler`): the handler's context parameter is now a `ResolvedTx`.
40
+
41
+
**Migration:**
42
+
43
+
```diff
44
+
use aztec::messages::processing::{
45
+
- enqueue_event_for_validation, MessageContext,
46
+
+ enqueue_event_for_validation, ResolvedTx,
47
+
};
48
+
49
+
unconstrained fn handle_my_message(
50
+
// ...
51
+
- message_context: MessageContext,
52
+
+ resolved_tx: ResolvedTx,
53
+
scope: AztecAddress,
54
+
) {
55
+
- // ...message_context.tx_hash...
56
+
+ // ...resolved_tx.tx_hash...
57
+
}
58
+
```
59
+
12
60
### [PXE]`pxe.updateContract` removed and `pxe.registerContract` no longer takes an artifact
13
61
14
62
Registering classes and instances are now separate, unvalidated operations. `registerContractClass(artifact)` registers a class, `registerContract(instance)` registers an instance and no longer takes an artifact. `registerContract` does not check that PXE knows the contract's artifact: a missing artifact surfaces only when the contract is later simulated.
@@ -36,6 +84,7 @@ Registering classes and instances are now separate, unvalidated operations. `reg
36
84
37
85
-`pxe.getContractInstance(address)` and `wallet.getContractMetadata(address).instance` now return the contract's **address preimage**, which no longer includes `currentContractClassId`.
38
86
87
+
39
88
### [Aztec.js]`AccountWithSecretKey` removed, read account keys from the `AccountManager` or PXE
40
89
41
90
`AccountWithSecretKey` was a thin wrapper that bundled an account's transaction signer with its master secret key, used mainly to print or export the secret. It has been removed, and `AccountManager.getAccount()` now returns the plain `Account` signer. The wrapper's extra methods are no longer available on that value:
@@ -60,6 +109,24 @@ The PXE never receives the seed nor the message-signing and fallback secret keys
60
109
61
110
**Impact**: Importing `AccountWithSecretKey`, or calling `getSecretKey()`/`getEncryptionSecret()` on the result of `getAccount()`, no longer compiles. The signer `getAccount()` returns is otherwise unchanged, and passing a single `Fr` or a `MasterSecretKeys` to `wallet.registerContract` keeps working.
62
111
112
+
### [CLI]`aztec-wallet``--secret-key` is renamed to `--signing-key`
113
+
114
+
`aztec-wallet` accounts are now rooted on their signing key rather than on a privacy secret. The `--secret-key` option (on `create-account` and `simulate`) is renamed to `--signing-key`, and the `SECRET_KEY` environment variable to `SIGNING_KEY`. When creating an account, a random signing key is generated by default and the privacy secret is derived from it.
115
+
116
+
**Migration:**
117
+
118
+
```diff
119
+
- aztec-wallet create-account --secret-key 0x...
120
+
+ aztec-wallet create-account --signing-key 0x...
121
+
```
122
+
123
+
**Impact**: The value you save and restore for an account is now its signing key, and account addresses change, so existing wallet databases and funded addresses are not carried over.
124
+
125
+
### [Bot]`senderPrivateKey` is now the account signing key
126
+
127
+
The transaction bot previously derived its account's signing key from the configured `senderPrivateKey`. That value is now used directly as the signing key, with the privacy secret derived from it.
128
+
129
+
**Impact**: The bot's account address changes for a given `senderPrivateKey`, so the account must be re-funded at its new address.
63
130
64
131
### [PXE] Unconstrained delivery defaults to a non-interactive handshake for external recipients
The derivation uses SHA-512 with domain separatorsto derive different keys:
38
+
The nullifier, viewing, and tagging keys are then derived from that secret with SHA-512 and domain separators, while the signing key is supplied to the account contract directly:
0 commit comments