Skip to content

Conversation

samt1803
Copy link
Contributor

Streamregistry: bulk set permissions + cleanup
1)

It should be possible to set multiple permissions for multiple streams in one transaction call. The caller needs to have grant permission on all of the streams.

The method should be added in the contract (it should be able to call the exisiting one-stream method in a loop) and in the client. (contracts need to be upgraded)

This would help applications to set permissions to many streams in one transaction, solving a possible situation where a user needs to sign many transactions with metamask, which not userfriendly.

new seperate methods to bulk create streams and bulk set permissions for the migrations. The old methods used inputs where there are cases wehere the stream metadata needs be set as parameter for each permission update on a stream-user combination, resulting in possible hundreds of time of overwriting the metadata with itself.

clean up permissions when setting them, and then it results in the permission for the user being all false/expired

- trusted methods bulk create streams and bulk set permissions without setting metadata
- clean up all-false/expired permission on setting it
@samt1803 samt1803 requested a review from jtakalai February 10, 2022 18:25
@samt1803
Copy link
Contributor Author

To look at the diff of the contract V2 and V3 can be compared in VSCode.

Copy link
Contributor

@jtakalai jtakalai left a comment

Choose a reason for hiding this comment

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

LGTM

@jtakalai jtakalai merged commit b1b69d6 into master Feb 14, 2022
@jtakalai jtakalai deleted the ETH-228_streamregistry_contract_upgrade branch February 14, 2022 12:19
samt1803 added a commit that referenced this pull request Feb 15, 2022
…eams_to_ocr

* origin/master:
  ETH-244: simplify network contracts workspace (#153)
  replaced an outdated signing library with its new version, replaces a require with import, changed a few types around to make it work (#151)
  Eth 228 streamregistry contract upgrade (#150)
  build: update dependencies (#147)
  chore: update .gitignore
  build(deps-dev): bump eslint-config-streamr-nodejs (#124)
  build(deps-dev): bump @typescript-eslint/eslint-plugin (#142)
  build(deps-dev): bump @types/mocha in /packages/smartcontracts (#125)
  build(deps): bump dotenv in /packages/chainlink-ens-external-adapter (#141)
  fix: fix prod deployment script; Add README part on how to do the prod deployment.
  fix: small fix in theGraph: when through trusted account implcitly creating a stream by setting its metadata the createdAt timestamp was not set. Now it will be
  feat: added created-at and updated-at timestamps to stream in subgraph (#139)
  Update storage node metadata #140
  ci: bump actions/setup-node from 2.5.0 to 2.5.1 (#110)

# Conflicts:
#	package-lock.json
#	package.json
samt1803 added a commit that referenced this pull request Feb 23, 2022
* master-3: (44 commits)
  fix: fixed bug in subgraph if permission is set on a non-existing stream. It will now ignore the eth event
  release: @streamr/config 0.0.1
  build(config): version is not required by 'npm publish' (#170)
  feat: add @streamr/config package (#84)
  comment: updated deployed-on comment in StreamregistryV3
  add V3 streamregistry to preloaded parity chain; fix buildscript some more
  fixed docker-dev-chain-init script
  ETH-244: simplify network contracts workspace (#153)
  replaced an outdated signing library with its new version, replaces a require with import, changed a few types around to make it work (#151)
  Eth 228 streamregistry contract upgrade (#150)
  build: update dependencies (#147)
  chore: update .gitignore
  build(deps-dev): bump eslint-config-streamr-nodejs (#124)
  build(deps-dev): bump @typescript-eslint/eslint-plugin (#142)
  build(deps-dev): bump @types/mocha in /packages/smartcontracts (#125)
  build(deps): bump dotenv in /packages/chainlink-ens-external-adapter (#141)
  fix: fix prod deployment script; Add README part on how to do the prod deployment.
  fix: small fix in theGraph: when through trusted account implcitly creating a stream by setting its metadata the createdAt timestamp was not set. Now it will be
  feat: added created-at and updated-at timestamps to stream in subgraph (#139)
  Update storage node metadata #140
  ...
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.

2 participants