Repository navigation
feat(minter): automatic deposit flow #274
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
Draft
+875
−107
Draft
Changes from all commits
Commits
Show all changes
163 commits
Select commit
Hold shift + click to select a range
cb7544c
docs(design): automatic deposit flow on top of the balance sweep
gregorydemay 2decad6
docs(design): address review remarks on the automatic flow
gregorydemay d6f9701
docs(design): show the automatic flow diagram first and fix its rende…
gregorydemay 3203fc0
docs(design): non-overlapping scan ticks and the exact fee share in t…
gregorydemay 6c93f3a
docs(design): report the watch status from watch_deposit_address itself
gregorydemay c05a015
docs(design): clarify retries, single-round scans and drop the unused…
gregorydemay 257b359
docs(design): define the scan schedule of a re-armed deposit address
gregorydemay 4efb77d
docs(design): always snapshot the watchlist and name both queueing paths
gregorydemay f8a8a29
docs(design): say what happens after the last scan of a watched address
gregorydemay 9cf5264
docs(design): apply current parameters at detection and compare depos…
gregorydemay 46f47a2
docs(design): fix the watch window at 24 hours over the 23.5 hour sch…
gregorydemay e513dfd
docs(design): mention the automatic flow in the withdrawal delay sent…
gregorydemay ea186e2
docs(design): add the state diagram of an account in the automatic flow
gregorydemay 4edf1df
docs(design): state replay of the recorded fee precisely and fix the …
gregorydemay 1163210
docs(design): let the scan discard a read whose window closed meanwhile
gregorydemay 0519a29
docs(design): make the re-arm subject to the watchlist capacity
gregorydemay c658da2
docs(design): align the diagram, the delay sentence and the minimum e…
gregorydemay 790ad8e
docs(design): state the hard cost bound and the deposit_sol reply aft…
gregorydemay b52f2d7
docs(design): exclude the minter principal from automatic registrations
gregorydemay 4c0715b
docs(design): qualify the re-arm, the concurrency bound, the detectio…
gregorydemay cb528cb
docs(design): show the full Watching reply and scope the capacity err…
gregorydemay 3ab9a97
docs(design): define the next scan time as a due time and scope the e…
gregorydemay 656b946
docs(design): drop the superseded proposals and name the watchlist me…
gregorydemay 5bd1619
docs(design): fix the scan slots at the start of the schedule instead…
gregorydemay e0d1e67
docs(design): re-arm a dropped automatic deposit for a fresh window
gregorydemay 3228518
refactor(minter): extract the queueing of a deposit and the in-flight…
gregorydemay 171686f
docs(minter): describe InFlightDeposit by the account it reserves
gregorydemay 5fc9c9c
docs(minter): state the in-flight precondition of queue_deposit
gregorydemay 42a2ab6
test(minter): pin the in-flight variant at every deposit stage
gregorydemay ba1c2c5
feat(minter): add the automatic deposit fee parameter
gregorydemay 8c5723d
refactor(minter): report the maximum automatic deposit fee in the val…
gregorydemay 0a4ab21
refactor(minter): drop the comment on the private fee bound helper
gregorydemay a7bcf3b
feat(minter): add a bounded map of expiring entries
gregorydemay 3441685
refactor(minter): wrap the timestamps of the timed sized map in a new…
gregorydemay fa252d0
refactor(minter): name the expiry index insertion of the timed sized …
gregorydemay 570cb81
feat(minter): add the watchlist of deposit addresses with its scan sc…
gregorydemay f9aefd0
refactor(minter): convert the watchlist times at the boundary of the …
gregorydemay 9822993
refactor(minter): take and report timestamps as a newtype in the watc…
gregorydemay 5b8b389
refactor(minter): add saturating duration arithmetic to the timestamps
gregorydemay e0a39df
refactor(minter): schedule the scans from a burst of gaps and a stead…
gregorydemay 0b7b3bb
refactor(minter): make an unscanned address due at the time of the read
gregorydemay 6412cec
refactor(minter): inline the admission of a registration into register
gregorydemay a2e16fa
refactor(minter): keep the watchlist module private behind re-exports
gregorydemay bcb3ed3
refactor(minter): hold the watchlist in the deposits
gregorydemay de4c736
refactor(minter): index the burst gaps with a plain cast of the scan …
gregorydemay caeb73c
test(minter): drop the watchlist tests that only re-check the timed s…
gregorydemay 826b50d
test(minter): inline the two watchlist builders into their only callers
gregorydemay 134aed6
refactor(minter): fix the scan slots at the start of the schedule ins…
gregorydemay 4824497
feat(minter): add the watch_deposit_address endpoint
gregorydemay ee22e15
refactor(minter): convert the registration times of watch_deposit_add…
gregorydemay 82c4e0f
feat(minter): take a queued account off the watchlist
gregorydemay aa77558
test(minter): expect the next slot of the schedule after a scan at it…
gregorydemay 2e75a32
test(minter): report the same registration on a repeated call before …
gregorydemay ed2a039
refactor(minter): register inside the status match and convert the re…
gregorydemay 8d12662
docs(minter): point the latest deposit id at deposit_sol_status
gregorydemay 110cc47
refactor(minter): reject the anonymous caller of watch_deposit_addres…
gregorydemay 9672797
test(minter): compare the registration quotes with get_minter_info
gregorydemay 4a33b69
test(minter): name the integration tests of the endpoint after the au…
gregorydemay dde75c0
test(minter): share the watch window in nanoseconds through the integ…
gregorydemay 6230992
refactor(minter): derive Clone for the state and its collections
gregorydemay b010146
test(minter): cover the latest deposit id of an account
gregorydemay 40a7ffa
test(minter): assert a rejected registration leaves the state untouched
gregorydemay 505eeb0
test(minter): table-drive the in-flight stages reported as detected
gregorydemay 966c23d
test(minter): assert the whole stored registration against the first one
gregorydemay 7ad4b78
feat(minter): record the automatic part of a queued deposit and deduc…
gregorydemay 4e9f34d
test: expect the collected automatic deposit fees after upgrading the…
gregorydemay 155c282
refactor(minter): record only the automatic deposit fee with a queued…
gregorydemay bb4f815
refactor(minter): name the fee of a queued deposit without the flow t…
gregorydemay e267b74
refactor(minter): return the credited sweep and type the error of its…
gregorydemay 991fe51
test(minter): cover the fee deduction through the deposit flow
gregorydemay f28f6f1
feat(minter): read deposit address balances in batches with getMultip…
gregorydemay 2d4ecc9
build: pin the SOL RPC crates to the commit adding getMultipleAccounts
gregorydemay de73408
refactor(minter): read the deposit address balances with the typed ge…
gregorydemay 0b1e28a
test(integration-tests): run against the SOL RPC canister built from …
gregorydemay 08ee723
test(integration-tests): download the pinned SOL RPC canister instead…
gregorydemay b1899c0
test(minter): test only the minter's handling of the getMultipleAccou…
gregorydemay d1b1bf6
feat(minter): scan the watched deposit addresses on a timer and queue…
gregorydemay c9f61cd
refactor(minter): take the scan time as a newtype
gregorydemay c462a45
refactor(minter): read the watchlist limits through the state and rep…
gregorydemay 1612a14
test(minter): expect the fixed scan slots in the scan timer tests
gregorydemay 225a5ed
refactor(minter): record the automatic deposit fee alone when a scan …
gregorydemay 5b094c4
refactor(minter): queue a scanned deposit with its fee under the new …
gregorydemay e4dfc6a
test(minter): read the scanned addresses from the typed getMultipleAc…
gregorydemay 3d503ac
feat(minter): let deposit_sol yield to a deposit queued by a scan dur…
gregorydemay b95d04f
test(minter): queue the scanned deposit of the yield test with the fe…
gregorydemay d2ca808
test(minter): expect the scanned deposit of the yield test with its f…
gregorydemay 132bfa6
docs: state that the balance scan uses the typed getMultipleAccounts …
gregorydemay 6995961
feat(minter): re-arm the automatic deposits of a dropped sweep
gregorydemay c5638ae
refactor(minter): re-arm with the drop time as a newtype
gregorydemay 1094bee
feat(minter): snapshot the watchlist before every upgrade
gregorydemay f1bfda8
refactor(minter): re-arm through the watchlist of the deposits
gregorydemay eaffc66
refactor(minter): convert the snapshot times at the event boundary
gregorydemay 2c14619
test(minter): drop the read time from the watchlist iteration in the …
gregorydemay fe81cf6
refactor(minter): snapshot and restore the watchlist of the deposits
gregorydemay 3fece15
refactor(minter): re-arm a dropped automatic deposit for a fresh window
gregorydemay 57839e0
test: compare the restored registration up to its due time
gregorydemay 5b7036f
refactor(minter): tell a manual deposit apart by its fee under the ne…
gregorydemay 739b7ce
feat(minter): carry the start of the scan schedule in the watchlist s…
gregorydemay e2b2f21
test(minter): expect the fresh window of the re-armed account after r…
gregorydemay 2100e68
test(minter): replay the recorded log after given events for the snap…
gregorydemay 745e58a
feat(minter): report the automatic deposit flow in the metrics and on…
gregorydemay b5da4f5
refactor(minter): convert the watchlist times for the metrics and the…
gregorydemay 69da25a
refactor(minter): list the watched addresses as of the dashboard's time
gregorydemay 2ef7726
refactor(minter): drop the read time from the dashboard's watchlist l…
gregorydemay 1e66a7c
test(minter): credit the dashboard's automatic deposit with the fee a…
gregorydemay cb9e085
refactor(minter): report the automatically queued deposits through th…
gregorydemay e9fb590
test: sweep watched and manual deposits together on solana-test-valid…
gregorydemay 774ccda
docs(minter): drop the queued-deposit count from the changelog metric…
gregorydemay abe8d75
Merge branch 'main' into DEFI-2780-07-get-multiple-accounts
mbjorkqvist 8de0d0a
fix(minter): reject a getMultipleAccounts response without one accoun…
mbjorkqvist d6c7759
test(minter): check the getMultipleAccounts request of a balance read
mbjorkqvist 3352ecb
refactor(minter): leave the getMultipleAccounts response size estimat…
mbjorkqvist 987ea9e
Merge branch 'DEFI-2780-07-get-multiple-accounts' into DEFI-2780-08-s…
mbjorkqvist 31d2976
fix(minter): record a scan at the time its reads are sent
mbjorkqvist d7febe9
test(minter): cover the guard of a tick and the registration check of…
mbjorkqvist aaa0560
test(minter): return the deposit a scan queued and minted during the …
mbjorkqvist bee57d8
test(minter): shorten a test name that rustfmt could not fit on one line
mbjorkqvist 039c606
docs(minter): say which deposit deposit_sol returns when a scan queue…
mbjorkqvist 522423d
docs: leave the response size of a balance scan to the SOL RPC canister
mbjorkqvist 2874774
Merge branch 'DEFI-2780-08-scan-timer' into DEFI-2780-09-rearm-droppe…
mbjorkqvist a27df5b
refactor(minter): re-arm a dropped sweep's automatic deposits outside…
mbjorkqvist 1b04ccb
docs(minter): document the re-arm of dropped automatic deposits
mbjorkqvist cd92fe4
docs: say that the re-arm of a dropped sweep is not replayed from the…
mbjorkqvist abc7749
test(minter): compare the whole replayed state after a re-arm with th…
mbjorkqvist dda2fc8
docs(minter): clarify which drops go through process_dropped_sweep
mbjorkqvist 562fe59
Merge branch 'DEFI-2780-09-rearm-dropped-sweeps' into DEFI-2780-10-wa…
mbjorkqvist 0c7c1cc
fix(minter): restore the watchlist under the window and capacity of t…
mbjorkqvist 24c527b
fix(minter): report the registration time of a watched address from i…
mbjorkqvist aa02e48
feat(minter): record no snapshot of an empty watchlist, as the ckETH …
mbjorkqvist 633de57
test(minter): replay the snapshot recorded by pre_upgrade in the watc…
mbjorkqvist aac4631
docs: name skip_pre_upgrade as the way out of a pre_upgrade that keep…
mbjorkqvist 1f35c9d
build: depend on the SOL RPC release that adds getMultipleAccounts
mbjorkqvist 7f83b64
Merge branch 'DEFI-2780-07-get-multiple-accounts' into DEFI-2780-08-s…
mbjorkqvist 7b13495
Merge branch 'DEFI-2780-08-scan-timer' into DEFI-2780-09-rearm-droppe…
mbjorkqvist 14e35d0
Merge branch 'DEFI-2780-09-rearm-dropped-sweeps' into DEFI-2780-10-wa…
mbjorkqvist e1ed582
docs: qualify the replayed watchlist equality and what skip_pre_upgra…
mbjorkqvist d9b2b7d
test(minter): check that a restored expired entry is not due and can …
mbjorkqvist 74e5f24
docs: state the measured size of a full watchlist snapshot
mbjorkqvist e8d61a6
Merge branch 'DEFI-2780-10-watchlist-snapshot' into DEFI-2780-12-auto…
mbjorkqvist 0cdf3a4
fix(minter): export the collected automatic deposit fees as a counter
mbjorkqvist 1062e18
feat(minter): export the age of the earliest due scan instead of the …
mbjorkqvist 10f7c59
feat(minter): export the capacity of the watchlist
mbjorkqvist edfdb1c
test(integration): check the watchlist metrics while a scan is due an…
mbjorkqvist 510c84b
fix(minter): list only the live registrations on the dashboard
mbjorkqvist f03c39f
feat(minter): show the times of the watched addresses as dates, with …
mbjorkqvist 2def85f
Merge remote-tracking branch 'origin/main' into DEFI-2780-10-watchlis…
mbjorkqvist d8677c9
Merge remote-tracking branch 'origin/DEFI-2780-10-watchlist-snapshot'…
mbjorkqvist 1b1157a
Merge remote-tracking branch 'origin/DEFI-2780-12-automatic-flow-metr…
mbjorkqvist d35c748
refactor(minter): remove the unused registration time of the oldest w…
mbjorkqvist a748de8
docs: tie the rollback of an upgrade to the automatic flow being disa…
mbjorkqvist 13700bb
Merge remote-tracking branch 'origin/DEFI-2780-10-watchlist-snapshot'…
mbjorkqvist 60bd931
feat(minter): export the outcomes of re-arming dropped automatic depo…
mbjorkqvist c960107
feat(minter): export the dropped deposits by origin
mbjorkqvist 76edc53
Merge remote-tracking branch 'origin/DEFI-2780-12-automatic-flow-metr…
mbjorkqvist eb61e53
Merge remote-tracking branch 'origin/main' into DEFI-2780-12-automati…
mbjorkqvist 5dfaa41
Merge remote-tracking branch 'origin/DEFI-2780-12-automatic-flow-metr…
mbjorkqvist ed84e0f
fix(minter): span the pagination of the watched addresses across all …
mbjorkqvist 91bdceb
test(integration): mint a detected automatic deposit minus its fee an…
mbjorkqvist c49e963
Merge remote-tracking branch 'origin/DEFI-2780-12-automatic-flow-metr…
mbjorkqvist f3e4b38
test(integration): share the sweep and the finalization of a deposit …
mbjorkqvist e8ca51d
Merge remote-tracking branch 'origin/DEFI-2780-12-automatic-flow-metr…
mbjorkqvist 8019fff
fix(minter): count as failed scans only the registrations a failed re…
mbjorkqvist 1f61b8b
docs: cover the last scan, a dropped automatic deposit and the rollou…
mbjorkqvist File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.