Skip to content
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

test flux aggregator default oracle gas limits #2965

Merged
merged 2 commits into from May 26, 2020

Conversation

se3000
Copy link
Contributor

@se3000 se3000 commented May 21, 2020

No description provided.

@github-actions
Copy link
Contributor

I see that you haven't updated any CHANGELOG files. Would it make sense to do so?

// xs[i] = 0
// }

// for (let l = len - 1; l > 0; l--) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// for (let l = len - 1; l > 0; l--) {
// for (let l = len; l > 0; l--) {

There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors. :-)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also suggest doing an assert.deepEqual against a golden output, e.g. for len == 16, you should get [2, 4, 6, 8, 10, 12, 14, 16, 1, 9, 5, 11, 3, 13, 7, 15]

samsondav
samsondav previously approved these changes May 22, 2020
@@ -81,7 +81,7 @@ contract FluxAggregator is AggregatorInterface, Owned {
* funds without the owner's intervention.)
*/
uint256 constant private RESERVE_ROUNDS = 2;
uint256 constant private MAX_ORACLE_COUNT = 42;
uint256 constant private MAX_ORACLE_COUNT = 77;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow we're really going for broke here ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was the most we could fit in under 400k.

await aggregator
.connect(personas.Carol)
.addOracles([fakeAddress], [fakeAddress], minMax, minMax, rrDelay)
function adverserialQuickselectList(len: number): number[] {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is cool

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shoutout to @kaleofduty.

@se3000 se3000 merged commit 5a9e020 into develop May 26, 2020
@samsondav samsondav deleted the feature/#172815482-median-gas-limit branch June 12, 2020 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants