Commit fb41e57
authored
Release pending account on flow start (#12497)
closes: https://github.com/Agoric/agoric-private/issues/774
## Description
To accommodate stuck flows or flows that exit early before their make account resolve, forcibly mark any pending account as released when a new flow starts.
This is safe because multiple active flows are not supposed to overlap.
### Security Considerations
If by some misfortune multiple flows end up running concurrently, there is a risk that they could end up overwriting each other's generated account info. The EVM account info generation is idempotent, but the noble and agoric ones are not. For this reason we only release evm accounts.
### Scaling Considerations
This will cause EVM account to be recreated, which is idempotent, but may consume gas.
### Documentation Considerations
None
### Testing Considerations
Reproduced the production situation that encountered this case in a contract test
Added unit test of this behavior as well
### Upgrade Considerations
This change being purely on the exo side is upgrade compatible.File tree
6 files changed
+1443
-121
lines changed- packages/portfolio-contract
- src
- test
- snapshots
6 files changed
+1443
-121
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
597 | 597 | | |
598 | 598 | | |
599 | 599 | | |
600 | | - | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
601 | 605 | | |
602 | 606 | | |
603 | 607 | | |
604 | 608 | | |
605 | 609 | | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
606 | 623 | | |
607 | 624 | | |
608 | 625 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
| 231 | + | |
231 | 232 | | |
232 | 233 | | |
233 | 234 | | |
234 | 235 | | |
235 | 236 | | |
236 | 237 | | |
237 | | - | |
| 238 | + | |
238 | 239 | | |
239 | 240 | | |
240 | 241 | | |
| |||
0 commit comments