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

Foundry persistence - dump foundry state in an interval of 10s #945

Merged
merged 20 commits into from
May 28, 2024

Conversation

AnieeG
Copy link
Contributor

@AnieeG AnieeG commented May 8, 2024


Below is a summarization created by an LLM (gpt-4-0125-preview). Be mindful of hallucinations and verify accuracy.

Why

The update introduces persistent storage for Foundry, enhancing data persistence capabilities. It adjusts the deployment configuration to support state dumping and recovery, ensuring greater resilience and continuity for blockchain simulations.

What

  • charts/foundry/Chart.yaml
    • Version updated from 0.1.5 to 0.1.6. This increments the chart version to reflect the new features and fixes.
  • charts/foundry/templates/deployment.yaml
    • Added commands for state dumping and recovery to the container's start command to enable persistent state functionality.
    • Introduced a new volume mount state-storage to the deployment to support the persistence of the blockchain state.
    • Added a new volume state-storage with a persistent volume claim (PVC) for storing the blockchain state.
  • charts/foundry/templates/pvc.yaml
    • Added a new file defining a PersistentVolumeClaim (PVC) to request physical storage for the blockchain state.
  • charts/foundry/values.yaml
    • Added capacity and storageClassName keys to allow configuration of the persistent volume size and class.
    • Updated volumeMounts to include mounting for the new persistent storage, specifying the mount path and volume name.

Comment on lines 109 to 110
- "--state-interval"
- "10"

Choose a reason for hiding this comment

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

If the data dump happens on the intervals and is not in the a realtime, maybe it would be better to push this to S3. How large is the data dump?

Does 10 means, dump data every 10 seconds?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes right ! it dumps every 10s to the file location specified in --state args and during start up it loads from that file if the file exists

charts/foundry/values.yaml Outdated Show resolved Hide resolved
@skudasov skudasov self-requested a review May 28, 2024 12:22
@skudasov
Copy link
Collaborator

I'm approving this PR to unblock our current test suite, however, we need to find a solution to use anvil with non-root later.
Our current suite will run in an environment without rootless container requirements.

runAsNonRoot: true
# foundry user/group
runAsUser: 1000
runAsGroup: 1000

Choose a reason for hiding this comment

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

try adding fsGroup: 1000 here I think that should help to make the volume writable from non root user

Choose a reason for hiding this comment

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

@cl-sonarqube-production
Copy link

@AnieeG AnieeG merged commit 87f514a into main May 28, 2024
17 checks passed
@AnieeG AnieeG deleted the foundry-persistence branch May 28, 2024 15:03
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

3 participants