Skip to content

Commit a5e4249

Browse files
committed
fix(auth-server): add 3s delay before session creation to fix CI race condition
The AA24 error in CI was occurring during session creation, not account deployment. After account creation returns, the bundler needs time to see the funded balance before attempting the session creation UserOperation. Added 3-second delay to allow forked network in CI to propagate the funding transaction.
1 parent 3c08ba4 commit a5e4249

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

cspell-config/cspell-misc.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ Fren
4141
fren
4242
nfts
4343
wght
44+
fuser
4445

4546
// packages/auther-server-api
4647
rustup

packages/auth-server/components/views/confirmation/RequestSession.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,10 @@ const confirmConnection = async () => {
285285
credentialId: accountData.credentialId,
286286
});
287287
288+
// Give the bundler time to see the funded account balance
289+
// This is especially important in CI environments with forked networks
290+
await new Promise((resolve) => setTimeout(resolve, 3000));
291+
288292
// Create the session on-chain for the new account
289293
// The account is deployed but the session needs to be registered on-chain
290294
const client = getClient({ chainId: requestChainId.value });

packages/sdk-platforms/rust/zksync-sso-erc4337/crates/zksync-sso-erc4337-ffi-web/src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2059,9 +2059,11 @@ pub fn encode_get_user_operation_hash_call_data(
20592059
})?;
20602060

20612061
// Construct paymasterAndData: address (20 bytes) + verificationGasLimit (16 bytes) + postOpGasLimit (16 bytes) + data
2062-
let mut paymaster_and_data = Vec::with_capacity(20 + 16 + 16 + pm_data_bytes.len());
2062+
let mut paymaster_and_data =
2063+
Vec::with_capacity(20 + 16 + 16 + pm_data_bytes.len());
20632064
paymaster_and_data.extend_from_slice(pm_addr.as_slice());
2064-
paymaster_and_data.extend_from_slice(&pm_verification_gas.to_be_bytes());
2065+
paymaster_and_data
2066+
.extend_from_slice(&pm_verification_gas.to_be_bytes());
20652067
paymaster_and_data.extend_from_slice(&pm_post_op_gas.to_be_bytes());
20662068
paymaster_and_data.extend_from_slice(&pm_data_bytes);
20672069
Bytes::from(paymaster_and_data)

0 commit comments

Comments
 (0)