-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sequencing relay requests #902
Conversation
- Set relayRequestTimeout to 17 - Modified sign(..) function by adding require(..) to handle timeout - Added tests
Testing for `relayRequestTimeout` blocks calculation: 47579 - 47562 = 17New relay entry requested [&{RequestID:+2 Payment:+0 PreviousEntry:+10920102476789591414949377782104707130412218726336356788412941355500907533021 Seed:+53067088278316309045121968048462724729152109215234493179134844471987707841858 GroupPublicKey:[148 201 102 80 168 175 134 22 57 88 174 102 140 6 86 157 161 253 198 211 221 66 2 185 54 173 121 213 147 68 47 34 3 106 162 84 138 240 215 67 22 146 199 110 198 201 30 30 165 163 237 77 177 130 240 136 9 94 34 95 134 202 253 107] BlockNumber:47562}] [member:2, state:*entry.signatureCompleteState] Transitioned to new state |
Does it |
- Changed the names because they were alligned more with the service contract and not operator contract.
changed to |
contracts/solidity/test/TestKeepRandomBeaconOperatorRelayRequestTimeout.js
Outdated
Show resolved
Hide resolved
contracts/solidity/test/TestKeepRandomBeaconOperatorRelayRequestTimeout.js
Outdated
Show resolved
Hide resolved
@dimpar I think it makes sense to rename this PR to e.g. "Serialize relay requests". Timeout is just an implication of the fact we are serializing them. |
- Modified the timeout variables to reflect signing and publication. - Broke down the value of timeout. Signing time + publication deadline. - Changed before to beforeEach in the test
Right, I agree that "Serialize relay request" is a more generic description, but tbh at first I was a bit confused because I thought of some objects converting to a byte stream, just like in Java. How about "Sequencing relay requests"? |
- Changed the message from 'required'. - relayRequestTimeout -> relayEntryTimeout
contracts/solidity/test/TestKeepRandomBeaconOperatorRelayRequestTimeout.js
Outdated
Show resolved
Hide resolved
contracts/solidity/test/TestKeepRandomBeaconOperatorRelayRequestTimeout.js
Outdated
Show resolved
Hide resolved
- Renamed the contract name. - Renamed the file.
- Added more gas, because of a 'revert' failure when calling a `sign` function. - Changed the value for the transaction in wei.
contracts/solidity/test/TestKeepRandomBeaconOperatorRelayEntryTimeout.js
Show resolved
Hide resolved
Tested:
|
Tested the following scenario:
Works as expected! |
Closes: #884
In this PR we need to block upcoming requests from processing if there is one in progress. After a node generates a relay entry, then it can again start processing a new request. These are the rules when we block a new relay request from processing: