Skip to content

Commit

Permalink
Epoch phase performance improvements, access node open slot limits, a…
Browse files Browse the repository at this point in the history
…nd `EpochStart` event (#379)

* adds performance improvements to end of epoch operations

* construct proposed list within endStakingAuction

* make ci

* add first draft of open node slots code

* adds automatic open access node slots and a test

* add epoch start event

* make ci

* address PR comments

* use borrow for storage instead of load

* use borrow for more operations

* address PR comments

* use .remove

* add timing config struct

* add getter/setter, target time getter

* update constructor

* add transactions

* begin test updates

* add precondition that ref epoch in the past

guarantees time computation doesn't underflow

* add config update tests

* rm unused method

* test getting future epoch target end time

* adds performance improvements to end of epoch operations

* construct proposed list within endStakingAuction

* make ci

* add first draft of open node slots code

* adds automatic open access node slots and a test

* add epoch start event

* make ci

* address PR comments

* use borrow for storage instead of load

* use borrow for more operations

* address PR comments

* use .remove

* add epoch counter arguments to rewards and new epoch events

* [FLIP 204] Add `targetDuration` to `EpochSetup` (#396)

* add duration to EpochSetup

This is needed to compute tau, the steady-state optimal time/view,
in the cruise control system

* update generated files

* update tests

* tidy

* tidy

* add duration to refTimestamp

* make ci

---------

Co-authored-by: Jordan Schalm <[email protected]>
  • Loading branch information
joshuahannan and jordanschalm authored Nov 21, 2023
1 parent 57c1f5f commit e05552a
Show file tree
Hide file tree
Showing 37 changed files with 855 additions and 321 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ node_modules
.vscode
git


coverage.json
flow.json
73 changes: 1 addition & 72 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,75 +15,4 @@ Reports are welcome! Please definitely reach out to us if you have a security co
If you believe you may have found a security vulnerability in our project,
to be on the safe side, **do NOT open a public issue**.

Rather, we prefer you to please send us an email: **[email protected]**

To encrypt messages to us, we encourage you to use our PGP key:

```
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBF6gj1YBEACsKchkXyvTH7NJIdCtwNpuKNkwGOesLUsyodKD4Wn0vO0i/Aiu
9xVKKauHMZ84CF0j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NySk/VdK2IrFtOqzj70v+poW4wAF
la8NZkxCBcqZmLSX4jmKRZfNlRmm0/L1M3hVRvUGSADPRtX54WomePk4yjIAtMId
3DeWHlPr6aMRcSuZIaj58LAdEi4qheA/fv4+e+YHNjgAwsp8XeBFWWF4cxf2lKZ1
aK4SWwxE5coKMtTRriiDpTP9mFjnBut3/Ip9u1507q1xDkmw7hWbQMMegDEIp/o/
TPZncqsesojDYsB0j0e7ShV3XDGElASUmroHi/s7CPnCgtrUia35zl2TKk91HhsG
POnBqR9OEPoXdyam9NfCe7sN1HWK6YWE1OpIAjT5rp+c/20VWptHy4FIioIWh+j+
vTjdSIFMvMw7yBf4kZawdMkfHCDHgch7QqrOJtp1gDhJDwkUDaHpPluB5SO6t1rr
ANxgOAVAIhOe/rnfy68z0038Oxj5mKCvf6LEOc84WLHGyfyL64m0LB8UQWtdHwKn
+WTQoFg+JpJMjrtLvkyAjjzoBdpCqAYwyYnOHC2HA4dJWDh86JM6n17eA4paLDHh
oipEul4aYF/PTQa4v+424Qaj7htd1u8IOlX53Q==
=DeX2
-----END PGP PUBLIC KEY BLOCK-----
```
We ask that all researchers adhere to these guidelines [here](https://flow.com/flow-responsible-disclosure)
Loading

0 comments on commit e05552a

Please sign in to comment.