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

Chronicle funds check #1007

Merged
merged 7 commits into from
Jul 22, 2024
Merged

Chronicle funds check #1007

merged 7 commits into from
Jul 22, 2024

Conversation

haider-rs
Copy link
Contributor

@haider-rs haider-rs commented Jul 12, 2024

Description

Adds functionality that check chronicle funds on starting and before sending a transaction.

  • Add CLI argument for minimum balance.
  • Check minimum balance on startup.
  • Check minimum balance before submitting transaction
  • If minimum balance during tx submission is low then unregister and exit chronicle.
  • Extends tester to test this functionality

Now we need to fund wallet with command fund-wallet before running other commands in tester. so a flow to check chronicle-funds-check would be.

docker compose run tester --network "3;ws://ethereum:8545" --network "3;ws://ethereum:8545" fund-wallet
docker compose run tester --network "3;ws://ethereum:8545" --network "3;ws://ethereum:8545" set-shard-config 1 1
docker compose run tester --network "3;ws://ethereum:8545" --network "3;ws://ethereum:8545" test chronicle-fund-check

Fixes # (issue)
#1004

Type of change

  • New feature (non-breaking change which adds functionality)

Tests

Describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration

  • test chronicle-fund-check

Test Configuration:

  • Firmware version:
  • Hardware:
  • Toolchain:

Code review prechecks:

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Inline comments have been added for each method
  • I have made corresponding changes to the documentation

@haider-rs haider-rs force-pushed the chronicle-fund-check branch from 88e0624 to 81d658c Compare July 12, 2024 18:15
@haider-rs haider-rs self-assigned this Jul 12, 2024
@haider-rs haider-rs linked an issue Jul 12, 2024 that may be closed by this pull request
4 tasks
@haider-rs haider-rs force-pushed the chronicle-fund-check branch from e1ffaa5 to 5dd3f83 Compare July 17, 2024 11:57
@haider-rs haider-rs marked this pull request as ready for review July 17, 2024 12:04
@haider-rs haider-rs requested review from dvc94ch and 4meta5 July 17, 2024 13:09
Copy link
Contributor

@4meta5 4meta5 left a comment

Choose a reason for hiding this comment

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

LGTM

comment suggestions only to make all logging structured so I can close #980 with #1009, but, if this is merged before mine, then I can also do it in my PR nbd :)

@haider-rs haider-rs force-pushed the chronicle-fund-check branch from 07124b2 to 7f0d544 Compare July 22, 2024 12:41
@haider-rs haider-rs merged commit af37eab into development Jul 22, 2024
16 checks passed
@haider-rs haider-rs deleted the chronicle-fund-check branch July 22, 2024 14:11
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.

unregister_member if chronicle target chain balance drops
3 participants