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

feat: delete pending root on propose #34

Merged
merged 3 commits into from
Oct 17, 2023

Conversation

gotzenx
Copy link
Collaborator

@gotzenx gotzenx commented Oct 10, 2023

On proposeAggregateRoot of Spoke Connector we check if the root being proposed is already in the pending map and delete it to prevent aggregate roots to be on the pending and proven maps at the same time.
Currently this is possible if after receiving an aggregate root from the AMB, we switch to Op Mode and off-chain agents propose the same root.
Also added a new PendingAggregateRootDeleted event to make it easier for off-chain agents to notice this.

CLOSES CON3-37

@gotzenx gotzenx requested a review from 0xng October 10, 2023 20:00
@gotzenx gotzenx self-assigned this Oct 10, 2023
@linear
Copy link

linear bot commented Oct 12, 2023

@gotzenx gotzenx merged commit bcb03a6 into optimistic-roots-1.1 Oct 17, 2023
22 checks passed
@gotzenx gotzenx deleted the feat/delete-pending-root-on-propose branch October 17, 2023 15:34
gotzenx added a commit that referenced this pull request Oct 19, 2023
* feat: removing lint (#10)

* feat:  root manager new variables (#8)

* feat: adding new variables (#7)

* refactor: root manager finalize function (#11)

* refactor: root manager dequeue function (#15)

* feat: adding optimistic mode to spoke (#12)

* refactor: unify propagate

* refactor: remove deprecated variable (#18)

* feat: introduce last count check again (#20)

* feat:optimistic mode guards (#19)

* feat: guard propagation of root zero (#21)

* feat: changing constructor params to struct (#23)

* feat: added guard for pause to op functions (#25)

* feat: adding whenNotPaused modifier to propose and finalize (#24)

* chore: remove unnecesary setup functions on tests (#26)

* fix: event natspec (#28)

* refactor: remove lastCountBeforeOpMode variable (#29)

* fix: natspec (#31)

* fix: removing optimistic mode guard from send (#30)

* feat: agg root direct save on hub spoke

* feat: adding natspec

* fix: typo

* test: convention fixes

* docs: natspec typo

* docs: natspect typos

* refactor: mainnet spoke imports

* feat: saveAggregateRoot delentes pending root if exists

* test: adding pending root deletion test

* chore: root manager tests comments

* feat: dispute blocks constructor check [L-1]  (#35)

* feat: fixing comment [Q-4] (#38)

* feat: removing unused events and errors [Q-2] (#39)

* feat: unifying save aggregate root events [Q-3] (#40)

* feat: delete pending root on propose (#34)

* feat: external for public [Q-1] (#36)

---------

Co-authored-by: 0xng <87835144+0xng@users.noreply.github.com>
Co-authored-by: 0xng <ng@defi.sucks>
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.

2 participants