Skip to content

Conversation

@Hitenjain14
Copy link
Contributor

@Hitenjain14 Hitenjain14 commented Feb 24, 2023

Changes

Removed update blobber transaction from blobber server . Issue #773 . Maybe we should remove all the code to update blobber settings from the server .

Tests

Tasks to complete before merging PR:

  • Ensure system tests are passing. If not Run them manually to check for any regressions 📋
  • Do any new system tests need added to test this change? do any existing system tests need updated? If so create a PR at 0chain/system_test
  • Merge your system tests PR to master AFTER merging this PR

Associated PRs (Link as appropriate):

@codecov-commenter
Copy link

codecov-commenter commented Feb 24, 2023

Codecov Report

Merging #961 (2a0a87b) into staging (239d7d1) will not change coverage.
The diff coverage is 0.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@ Coverage Diff @@ ## staging #961 +/- ## ======================================== Coverage 26.45% 26.45% ======================================== Files 76 76 Lines 7663 7663 ======================================== Hits 2027 2027 Misses 5370 5370 Partials 266 266 
Flag Coverage Δ
Unit-Tests 26.45% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
code/go/0chain.net/blobbercore/handler/protocol.go 0.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@boddumanohar
Copy link
Contributor

at the moment, there are 2 ways to update blobber settings. And the blobber fully supports both the methods.

  1. sc blobber_update_settings must be executed with owner wallet. usually done using using CLI bl-update or from UI (using gosdk-wasm).

  2. using add_blobber sc by using operational wallet (the wallet that is present in blobber). This usually done when the blobber is first added to the network.

@Hitenjain14 Please check if the settings can be updated using add_blobber multiple times? does it over write the values set using sc blobber_update_settings?

the operational wallet being able to update settings using add_blobber multiple times seems like a security issue, may we should restrict it to only once?

@lpoli what are you thoughts on this?

@Hitenjain14
Copy link
Contributor Author

at the moment, there are 2 ways to update blobber settings. And the blobber fully supports both the methods.

  1. sc blobber_update_settings must be executed with owner wallet. usually done using using CLI bl-update or from UI (using gosdk-wasm).
  2. using add_blobber sc by using operational wallet (the wallet that is present in blobber). This usually done when the blobber is first added to the network.

@Hitenjain14 Please check if the settings can be updated using add_blobber multiple times? does it over write the values set using sc blobber_update_settings?

the operational wallet being able to update settings using add_blobber multiple times seems like a security issue, may we should restrict it to only once?

@lpoli what are you thoughts on this?

Check this pr we are separating the functionality of add and update blobber . So we will start using update_blobber to update it .

@peterlimg
Copy link
Contributor

@Hitenjain14 it's good to use update_blobber to update blobber, but we should not remove the code for syncing latest settings from 0chain. Or maybe I miss something, if so please check if the settings could be synced with the following steps:

  1. Deploy the 0chain and blobber with this PR
  2. Update a setting of blobber through zboxcli
  3. Check the settings on 0chain to see if the change works, we should have cli command to check
  4. On blobbers, check if the settings were synced. This could be done by checking the settings table on blobber.
@Hitenjain14
Copy link
Contributor Author

From the discussion I had with @dabasov , I have removed all the functions which updates the blobber in any way . All these operations should be done be manually through cli or web .

Copy link
Contributor

@peterlimg peterlimg left a comment

Choose a reason for hiding this comment

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

LGTM

@service-0chain
Copy link
Collaborator

Manual system tests [failure] with the following config

config value
tests skipped FALSE
system-tests master
gosdk NOT OVERRIDDEN
zboxcli staging
zwalletcli staging
0chain blobber-add-update
blobber blobber-server-update
authorizer staging
0box staging
0block staging
0dns staging
explorer master
0proxy staging
0search staging
@dabasov dabasov merged commit ee673ad into staging Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

7 participants