-
Notifications
You must be signed in to change notification settings - Fork 91
Description
Description:
Acceptance criteria from the design doc:
-
Scenario 1
Given three transactions from the same sender address arrive within 100ms
When all three are submitted to eth_sendRawTransaction
Then they acquire locks in arrival order (FIFO)
And each transaction completes before the next starts processing
-
Scenario 2
Given three transactions from different sender addresses arrive simultaneously
When all three are submitted to eth_sendRawTransaction
Then all three acquire locks concurrently
And all three process in parallel without blocking each other
-
Scenario 3
Given a transaction acquires a lock and processing exceeds 30 seconds
When the 30-second timer expires
Then the lock is automatically force-released
And the next waiting transaction acquires the lock
And the force-released transaction's subsequent release attempt is ignored
-
Scenario 4
Given a transaction holds a lock with session key "A"
When another entity tries to release the lock with session key "B"
Then the release attempt is ignored
And the lock remains held by session key "A"
-
Scenario 5
Given a transaction acquires a lock (30s timer starts)
When the transaction completes and releases the lock after 5 seconds
Then the 30-second force-release timer is cancelled
And the next waiter acquires the lock immediately
-
Scenario 6
Given a transaction acquires a lock
When an error occurs during validation or processing
Then the lock is released in the error handler
And the next waiter can acquire the lock
-
Scenario 7
Given Redis is enabled and transaction acquires a Redis lock
And the relay process crashes without releasing
When 30 seconds elapse
Then Redis automatically deletes the lock (TTL expires)
And the next waiter can acquire the lock
-
Scenario 8
Given USE_ASYNC_TX_PROCESSING=true
And a transaction acquires a lock
When the HTTP response returns immediately
And processing continues in the background
Then the lock remains held during background processing
And the lock is released after consensus submission completes