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!: diamond config change + cleanup legacy [CHAIN-682] #2343

Merged
merged 15 commits into from
Aug 9, 2024

Conversation

justprosh
Copy link
Member

@justprosh justprosh commented Aug 7, 2024

Description

  • simplify chain config re Diamond contract upgrade: diamond_contract_address instead of core_contract_address, cc_contract_address and market_contract_address
  • remove Subnet.resolve with legacy chain-parsing code and implement in connector
  • remove unused decider config fields: network_api_endpoint, network_id, matcher_address, start_block, worker_gas, wallet_key
  • renamed pat_id field to cu_ids and changed type to vec (re multi CC update) in ResolveSubnetResult (fixed in feat!: change Worker type in SubnetResolveResult aqua-lib#88)
  • remove legacy system services envs: FLUENCE_ENV_AQUA_IPFS_EXTERNAL_API_MULTIADDR, FLUENCE_ENV_AQUA_IPFS_LOCAL_API_MULTIADDR, FLUENCE_ENV_CONNECTOR_JOIN_ALL_DEALS, FLUENCE_ENV_CONNECTOR_API_ENDPOINT, FLUENCE_ENV_CONNECTOR_CONTRACT_ADDRESS, FLUENCE_ENV_CONNECTOR_FROM_BLOCK, FLUENCE_ENV_CONNECTOR_WALLET_KEY, FLUENCE_ENV_DECIDER_IPFS_MULTIADDR, FLUENCE_ENV_CONNECTOR_WORKER_GAS

Config changes

Before:

# ...
[system_services.decider]
  decider_period_sec = 30
  worker_period_sec = 30
  worker_ipfs_multiaddr = "/dns4/ipfs.fluence.dev/tcp/5001"
  network_api_endpoint = "rpc.stage.fluence.dev"
  network_id = 123
  matcher_address = "addr1"
  start_block = "latest"
  worker_gas = 1
  wallet_key = "key"

[chain_config]
  http_endpoint = "rpc.stage.fluence.dev"
  core_contract_address = "addr3"
  cc_contract_address = "addr2"
  market_contract_address = "addr1"
  network_id = 123
  wallet_key = "key"
  # ...

After:

# ...
[system_services.decider]
  decider_period_sec = 30
  worker_period_sec = 30
  worker_ipfs_multiaddr = "/dns4/ipfs.fluence.dev/tcp/5001"

[chain_config]
  http_endpoint = "rpc.stage.fluence.dev"
  diamond_contract_address = "addr"
  network_id = 123
  wallet_key = "key"
  # ...

Checklist

  • The code follows the project's coding conventions and style guidelines.
  • All tests related to the changes have passed successfully.
  • Documentation has been updated to reflect the changes (if applicable).
  • All new and existing unit tests have passed.
  • I have self-reviewed my code and ensured its quality.
  • I have added/updated necessary comments to aid understanding.

Reviewer Checklist

  • Code has been reviewed for quality and adherence to guidelines.
  • Tests have been reviewed and are sufficient to validate the changes.
  • Documentation has been reviewed and is up to date.
  • Any questions or concerns have been addressed.

move subnet resolver to connector
@justprosh justprosh changed the title feat!: diamond config change feat!: diamond config change [CHAIN-682] Aug 7, 2024
Copy link

linear bot commented Aug 7, 2024

@justprosh justprosh added the e2e Run e2e workflow label Aug 8, 2024
crates/nox-tests/Cargo.toml Outdated Show resolved Hide resolved
crates/test-utils/Cargo.toml Outdated Show resolved Hide resolved
Copy link
Member

@folex folex left a comment

Choose a reason for hiding this comment

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

I didn't quite get the tests changes, otherwise LGTM

@justprosh justprosh changed the title feat!: diamond config change [CHAIN-682] feat!: diamond config change + cleanup legacy [CHAIN-682] Aug 8, 2024
folex

This comment was marked as duplicate.

@justprosh justprosh enabled auto-merge (squash) August 9, 2024 12:50
@justprosh justprosh disabled auto-merge August 9, 2024 15:49
@justprosh justprosh merged commit 55ddcbd into master Aug 9, 2024
16 of 19 checks passed
@justprosh justprosh deleted the config_diamond branch August 9, 2024 15:49
@justprosh justprosh restored the config_diamond branch August 9, 2024 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e2e Run e2e workflow
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants