Skip to content

Commit 9c71987

Browse files
authored
v0.7.2 (#1056)
2 parents ff72fae + 4b2fabe commit 9c71987

File tree

5 files changed

+16
-21
lines changed

5 files changed

+16
-21
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ OS := $(shell uname -s)
55
CONFIG_FILE?=config-files/config.yaml
66
AGG_CONFIG_FILE?=config-files/config-aggregator.yaml
77

8-
OPERATOR_VERSION=v0.7.1
8+
OPERATOR_VERSION=v0.7.2
99

1010
ifeq ($(OS),Linux)
1111
BUILD_ALL_FFI = $(MAKE) build_all_ffi_linux

batcher/aligned-sdk/src/core/types.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -232,21 +232,17 @@ impl Eip712 for NoncedVerificationData {
232232

233233
let mut hasher = Keccak256::new();
234234

235-
// As per the EIP, first we generate the type hash
236235
// hashStruct(s : 𝕊) = keccak256(typeHash ‖ encodeData(s))
236+
237+
// We first generate the type hash
237238
hasher.update(NONCED_VERIFICATION_DATA_TYPE);
238239
let type_hash = hasher.finalize_reset();
239240

240-
// Then hash is resetted, so we start hashing the second term of the encodedData(s)
241+
// Then we hash it with the rest of the data in the struct
242+
hasher.update(type_hash);
241243
hasher.update(verification_data_hash);
242244
hasher.update(nonce_bytes);
243245
hasher.update(max_fee_bytes);
244-
let encoded_data_hash = hasher.finalize_reset();
245-
246-
// Now we do the actual final
247-
// keccak256(typeHash ‖ encodeData(s))
248-
hasher.update(type_hash);
249-
hasher.update(encoded_data_hash);
250246
let hash_struct = hasher.finalize_reset();
251247

252248
Ok(hash_struct.into())

contracts/scripts/anvil/state/alignedlayer-deployed-anvil-state.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

contracts/src/core/BatcherPaymentService.sol

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ contract BatcherPaymentService is
7979
noncedVerificationDataTypeHash = _noncedVerificationDataTypeHash;
8080
}
8181

82+
// Defined in types.rs
83+
// keccak256("NoncedVerificationData(bytes32 verification_data_hash,uint256 nonce,uint256 max_fee)")
8284
function initializeNoncedVerificationDataTypeHash(
8385
bytes32 _noncedVerificationDataTypeHash
8486
) public reinitializer(2) onlyOwner {
@@ -280,15 +282,12 @@ contract BatcherPaymentService is
280282
revert InvalidMaxFee(signatureData.maxFee, feePerProof);
281283
}
282284

283-
bytes32 encodedDataHash = keccak256(
284-
abi.encode(
285-
leaf,
286-
signatureData.nonce,
287-
signatureData.maxFee
288-
)
289-
);
290-
291-
bytes32 structHash = keccak256(abi.encode(noncedVerificationDataTypeHash, encodedDataHash));
285+
bytes32 structHash = keccak256(abi.encode(
286+
noncedVerificationDataTypeHash,
287+
leaf,
288+
signatureData.nonce,
289+
signatureData.maxFee
290+
));
292291

293292
bytes32 hash = _hashTypedDataV4(structHash);
294293

docs/operator_guides/0_running_an_operator.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Register as an Aligned operator in testnet
22

33
> **CURRENT VERSION:**
4-
> Aligned Operator [v0.7.1](https://github.com/yetanotherco/aligned_layer/releases/tag/v0.7.1)
4+
> Aligned Operator [v0.7.2](https://github.com/yetanotherco/aligned_layer/releases/tag/v0.7.2)
55
66
> **IMPORTANT:**
77
> You must be [whitelisted](https://docs.google.com/forms/d/e/1FAIpQLSdH9sgfTz4v33lAvwj6BvYJGAeIshQia3FXz36PFfF-WQAWEQ/viewform) to become an Aligned operator.
@@ -26,7 +26,7 @@ Minimum hardware requirements:
2626
To start with, clone the Aligned repository and move inside it
2727

2828
```bash
29-
git clone https://github.com/yetanotherco/aligned_layer.git --branch v0.7.1
29+
git clone https://github.com/yetanotherco/aligned_layer.git --branch v0.7.2
3030
cd aligned_layer
3131
```
3232

0 commit comments

Comments
 (0)