-
Notifications
You must be signed in to change notification settings - Fork 327
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
chore: Clean up data configuration #9973
Merged
Merged
Changes from 40 commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
aed5bce
WIP
PhilWindle 0894c13
Updated logging
PhilWindle 36f53d4
Merge branch 'master' into pw/world-state-cleanup
PhilWindle 68f2c25
Removed erroneous code
PhilWindle f91d91e
Merge branch 'master' into pw/world-state-cleanup
ludamad 4962d96
Detect if trees are out of sync
PhilWindle 8d46f2c
Merge branch 'pw/world-state-cleanup' of github.com:AztecProtocol/azt…
PhilWindle 6511d8a
WIP
PhilWindle e536a59
WIP
PhilWindle 5019a35
WIP
PhilWindle 22e1a14
Merge remote-tracking branch 'origin/master' into pw/world-state-cleanup
PhilWindle 478296e
Merge remote-tracking branch 'origin/master' into pw/world-state-cleanup
PhilWindle 0c62a94
Merge branch 'master' into pw/world-state-cleanup
PhilWindle 70ec05a
Merge remote-tracking branch 'origin/master' into pw/world-state-cleanup
PhilWindle eb72f4f
WIP
PhilWindle c24b940
WIP
PhilWindle 75e8472
WIP
PhilWindle 14fa37b
WIP
PhilWindle 21a5a1c
WIP
PhilWindle 0ad1bdb
WIP
PhilWindle 5cc95c5
Fixes
PhilWindle 0ac899f
Formatting
PhilWindle ed8be9f
Additional test case
PhilWindle c7e64bb
Log formatting
PhilWindle b0b25bc
More log formatting
PhilWindle 6224fa8
Formatting
PhilWindle 4db7059
Merge branch 'master' into pw/world-state-cleanup
PhilWindle e9968b7
Merge branch 'master' into pw/world-state-cleanup
PhilWindle 4704900
Data directory config
PhilWindle 7a0ed9b
WIP
PhilWindle 5d229eb
WIP
PhilWindle 62d9a9a
Changed default value
PhilWindle 5dc7e55
Merge remote-tracking branch 'origin/master' into pw/data-config
PhilWindle 192b4dc
Merge branch 'master' into pw/data-config
PhilWindle 9bfb0d7
Merge branch 'master' into pw/data-config
PhilWindle b0b6057
Fixes
PhilWindle 34ee499
Fixes
PhilWindle cf757f5
Fix
PhilWindle d69b3fd
Test fixes
PhilWindle 5683889
Merge branch 'master' into pw/data-config
PhilWindle 5b14855
Fixed prover coordination test
PhilWindle 5aba28e
Disable uniswap test
PhilWindle 70fec90
Documentation
PhilWindle 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
This file contains 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 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 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 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 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 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 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 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 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { l1ContractAddressesMapping } from '@aztec/ethereum'; | ||
import { type ConfigMappingsType, getConfigFromMappings, numberConfigHelper } from '@aztec/foundation/config'; | ||
import { type EthAddress } from '@aztec/foundation/eth-address'; | ||
|
||
export type DataStoreConfig = { | ||
dataDirectory: string | undefined; | ||
dataStoreMapSizeKB: number; | ||
l1Contracts: { rollupAddress: EthAddress }; | ||
}; | ||
|
||
export const dataConfigMappings: ConfigMappingsType<DataStoreConfig> = { | ||
dataDirectory: { | ||
env: 'DATA_DIRECTORY', | ||
description: 'Optional dir to store data. If omitted will store in memory.', | ||
}, | ||
dataStoreMapSizeKB: { | ||
env: 'DATA_STORE_MAP_SIZE_KB', | ||
description: 'DB mapping size to be applied to all key/value stores', | ||
...numberConfigHelper(128 * 1_024 * 1_024), // Defaulted to 128 GB | ||
}, | ||
l1Contracts: { | ||
description: 'The deployed L1 contract addresses', | ||
defaultValue: l1ContractAddressesMapping, | ||
}, | ||
}; | ||
|
||
/** | ||
* Returns the archiver configuration from the environment variables. | ||
* Note: If an environment variable is not set, the default value is used. | ||
* @returns The archiver configuration. | ||
*/ | ||
export function getDataConfigFromEnv(): DataStoreConfig { | ||
return getConfigFromMappings<DataStoreConfig>(dataConfigMappings); | ||
} |
This file contains 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 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,9 @@ | |
"references": [ | ||
{ | ||
"path": "../foundation" | ||
}, | ||
{ | ||
"path": "../ethereum" | ||
} | ||
], | ||
"include": ["src"] | ||
|
This file contains 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🇬🇧