dfinity / snsdemo

Developer focused SNS deployment demo
15 stars 6 forks source link

Using aggregator installed by dfx #391

Closed dskloetd closed 1 month ago

dskloetd commented 1 month ago

Motivation

The latest dfx nns extension now also install the SNS aggregator. That means that snsdemo snapshot now have 2 aggregators installed. Additionally the aggregator installed by dfx has setting which cause it to produce a lot of spam. The solution is to reinstall the installed aggregator instead of installing a second one.

Changes

  1. Hard code sns_aggregator canister ID similar to how nns-dapp and internet_identity are hard coded.
  2. Make snsdemo8 a controlled of the sns_aggregator installed by dfx, similar to nns-dapp and internet_identity.
  3. Instead of creating a new sns_aggregator canister, make it so the existing one can be reinstalled.
  4. Drive-by: Fix bin/dfx-sns-aggregator-wait for the case when there are 0 SNSes.

Tested

  1. Created a snapshot.
  2. Checked that it didn't produce crazy amounts of spam.
  3. Checked that there is only aggregator output from 1 canister.
  4. Checked that NNS dapp connects correctly to the aggregator.
  5. Update bin/dfx-software-sns-aggregator-install.test to make sure the canister already exists, as if dfx nns install was already called.