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

fix: only propose revealed assets of epoch #726

Merged
merged 16 commits into from
Mar 11, 2022

Conversation

0xcuriousapple
Copy link
Contributor

@0xcuriousapple 0xcuriousapple commented Feb 24, 2022

Fixes #705
Fixes #706

Like we discussed in last arch call on AAR
Have removed the condition that staker has to propose non revealed assets only.
Now staker only has to propose revealed assets of this epoch.
This would have broke delegator, as it was assuming everything available every epoch
So as we discussed last time, have added result mapping stored in confirm O(n)

Have renamed medianIndex to activeCollectionIndex as now median dont represent all active collections
so was misleading.

@coveralls
Copy link

coveralls commented Feb 24, 2022

Coverage Status

Coverage decreased (-0.5%) to 98.371% when pulling e005c93 on abhishekvispute:ProposeAARFix into 2bba861 on razor-network:master.

@SkandaBhat
Copy link
Contributor

Scenarios failing @abhishekvispute

SamAg19
SamAg19 previously approved these changes Feb 25, 2022
@0xcuriousapple 0xcuriousapple marked this pull request as draft March 1, 2022 07:38
@0xcuriousapple
Copy link
Contributor Author

Commit O(1)
Reveal O(n) n= toAssign
Propose O(n) n=maxAltBlocks
Dispute
	1. Value
		GiveSorted O(n) n= no of unique votes for this Coll
		FinDispute O(1)  ask user to pass position
	2. BiggestStakerId passed O(1)
	3. Ids present O(log n)/absent O(1),  n= no of coll revealed this epoch
	4. Ids sorted O(1)
	
Confirm 
	O(n) n= no of collection revealed this epoch


@0xcuriousapple 0xcuriousapple marked this pull request as ready for review March 3, 2022 08:53
SamAg19
SamAg19 previously approved these changes Mar 7, 2022
SkandaBhat
SkandaBhat previously approved these changes Mar 9, 2022
Copy link
Contributor

@SkandaBhat SkandaBhat left a comment

Choose a reason for hiding this comment

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

lgtm

SamAg19
SamAg19 previously approved these changes Mar 9, 2022
@hrishikeshio hrishikeshio merged commit 2c14622 into razor-network:master Mar 11, 2022
SkandaBhat added a commit that referenced this pull request Mar 15, 2022
* Increased Coverage on CollectionManager (#715)

* moved from weighted mean to weighted median (#710)

* Natspec added to parameters and random manager (#712)

* natspec changes to randomManager

* natspec added to parameters

* linting fixes

* natspec fixes

* natspec added to internal functions

* lint fixes

* spelling fix

* test: increased test coverage (#725)

* test: increased Coverage on StakeManager and MerklePos (#730)

* docs: natspec added to delegator, block manager and vote manager (#729)

* docs: natspec added to delegator, block manager and vote manager

* docs: natspec fix

* docs: natspec added to events

* docs: natspec fix

* docs: lint fix

* docs: natspec added to staked token contracts (#734)

* feat: add docgen to the project from natspec (#731)

* feat: add docgen to the project from natspec

* fix: fix package.json versions

* fix: fix tests

* chore: fix locks

Co-authored-by: SkandaBhat <bhat.skanda.m@gmaill.com>

* fix: removed require statement from BlockManager (#740)

* test: increased coverage on BlockManager and RandomNoManager (#733)

* test: increased coverage on BlockManager and RandomNoManager

* test: increased coverage on BlockManager added test case

* test: increased coverage on blockManager

* feat: merged from master

* fix: fixed gascompare error

* fix: clean up docgen (#743)

Co-authored-by: SkandaBhat <bhat.skanda.m@gmaill.com>

* fix: only propose revealed assets of epoch (#726)

* fix: only propose revealed assets of epoch

* chore: lint

* fix: medianIndex renamed to activeCollectionIndex

* chore: slither and lint

* chore: silly slither

* fix: scenarios failing

* fix: disputes optimised and one bug with penalties fixed

* docs: added natspec comments

* chore: cleanup

* fix: reveal event updated for node needs

* fix: scenarios test failing

* fix: activeCollectionIndex renamed to leafId

* fix: optmized for calls in loop : slither warning (#745)

Co-authored-by: Gaurav Jain <65170724+GauravJain9@users.noreply.github.com>
Co-authored-by: SamAg19 <52957842+SamAg19@users.noreply.github.com>
Co-authored-by: SkandaBhat <bhat.skanda.m@gmaill.com>
Co-authored-by: Abhishek Vispute <abhivispute33@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants