Skip to content

Commit

Permalink
feat: access logic trie
Browse files Browse the repository at this point in the history
Diffie-Hellman (#3)

* Use DiffieHellmanMock

* Adds a comment about Get

* Add support for ECDSA public key in DiffieHellman.SharedSecret function

* Update defaultAct implementation

* Adds pseudo code for Access Logic

* Update default Act creation; Fix basic Act tests

* Refactor access logic to use new ActMock implementation

* feat(history): test mockups wip

* Refactor DiffieHellman implementation

* changes pseudocode for Diffie-Hellmann read

* Co-authored-by: Bálint Ujvári <[email protected]>

* DiffieHellman mock generates a real sherd secret

* Refactor Act

* Adds manifest lookup

* Extend act_test

* Adds unit tests, some values are mocked

* Refactor act mock impl with map[string]map[string]string

* Add check mock implementation for DiffieHellman interface

* Add Load, Store to Act interface. Refactor Act interface

* refactor act, diffieHellman mocks, tests

* Add TestLoadStore function to act_test.go

* Remove unnecessary code in Load function

* Add history mock and History lookup test

* Act refactor

Co-authored-by: Bálint Ujvári <[email protected]>

* Refactor Add method to return Act interface

* Change Get method return type to []byte

---------

Co-authored-by: Ferenc Sárai <[email protected]>
Co-authored-by: Peter Ott <[email protected]>
Co-authored-by: Bálint Ujvári <[email protected]>
Co-authored-by: Levente Kiss <[email protected]>
Co-authored-by: Roland Seres <[email protected]>
Co-authored-by: Kexort <[email protected]>
Co-authored-by: Bálint Ujvári <[email protected]>

Acces Logic (#8)

* Use DiffieHellmanMock

* Adds a comment about Get

* Add support for ECDSA public key in DiffieHellman.SharedSecret function

* Update defaultAct implementation

* Adds pseudo code for Access Logic

* Update default Act creation; Fix basic Act tests

* Refactor access logic to use new ActMock implementation

* feat(history): test mockups wip

* Refactor DiffieHellman implementation

* changes pseudocode for Diffie-Hellmann read

* Co-authored-by: Bálint Ujvári <[email protected]>

* DiffieHellman mock generates a real sherd secret

* Refactor Act

* Adds manifest lookup

* Extend act_test

* Adds unit tests, some values are mocked

* Refactor act mock impl with map[string]map[string]string

* Add check mock implementation for DiffieHellman interface

* started Add

* changed some sig

* save

* new grantee addition handling

* mod

* changed helper function visibilities

* some mod with grantee

* test mod

* save

* no error in actInit

* Add_New_Grantee_To_Content

* comment

* copied act_test.go

* no compiler errors on our side

* Adds Add_New_Grantee_To_Content and ActInit

* almost complete grantee container

* maybe complete grantee container

* Solves merge conflict

* access-logic-merge

* fix merge issues

Added context & details to use cases (#6)

ZH ethersphere#106 Added context & details to use cases

Add grantee management (#10)

* Add grantee management

* Added controller test

* Fix test fixture, refactor accesslogic

* Add UploadHandler

---------

Co-authored-by: Bálint Ujvári <[email protected]>

(refactor): from `Get` to `Lookup` to improve clarity and consistency. The changes have been made in the `accesslogic.go`, `act.go`, `act_test.go`, `history_test.go`, and `mock/act.go` files. (#13)

Co-authored-by: Ferenc Sárai <[email protected]>

Act params rename doc (#14)

* (refactor): ACT interface params + add doc comments

* Revert "(refactor): ACT interface params + add doc comments"

This reverts commit ee8da04.

* (refactor): ACT interface params + add doc comments

* (refactor): Add error to ACT interface methods

---------

Co-authored-by: Ferenc Sárai <[email protected]>

Move and refactor ACT diffieHellman to Session. Add Key and NewFromKeystore functions. (#16)

Act swarm address (#15)

* (refactor): ACT interface params + add doc comments

* Revert "(refactor): ACT interface params + add doc comments"

This reverts commit ee8da04.

* (refactor): ACT interface params + add doc comments

* (refactor): Add error to ACT interface methods

* Add in-memory storage and implement Store and Load methods

* Move and refactor ACT diffieHellman to Session. Add Key and NewFromKeystore functions.

---------

Co-authored-by: Ferenc Sárai <[email protected]>
Co-authored-by: Bálint Ujvári <[email protected]>

(rename): defaultAct to inMemoryAct (#17)

* (refactor): ACT interface params + add doc comments

* Revert "(refactor): ACT interface params + add doc comments"

This reverts commit ee8da04.

* (refactor): ACT interface params + add doc comments

* (refactor): Add error to ACT interface methods

* Add in-memory storage and implement Store and Load methods

* *refactor) Rename defaultAct to inMemroryAct

---------

Co-authored-by: Ferenc Sárai <[email protected]>

(refactor): Update controller_test.go to use NewInMemoryAct, modify Session.Key to return correct dimensional byte slice (#18)

* (refactor): Update controller_test.go to use NewInMemoryAct, modify Session.Key to return two-dimensional byte slice

* (refactor:) Refactor session Key function to use append instead of index-based assignment

---------

Co-authored-by: Ferenc Sárai <[email protected]>

Act access logic merge (#19)

* grantee container and access logc tests are passed

* refactored access logic and grantee container

* PR 19 comments resolving

* Refactor

* Refactor

Act kvs merge (#22)

* grantee container and access logc tests are passed

* refactored access logic and grantee container

* PR 19 comments resolving

* Refactor

* Refactor

* working manifest ACT with basic tests

* (refactor:) Refactor act_test

* (refactor:) Refactor kvs -> kvs.manifest, kvs.memory

* (refactror:) kvs

* refactor kvs contsructors

---------

Co-authored-by: Roland Seres <[email protected]>
Co-authored-by: Bálint Ujvári <[email protected]>
Co-authored-by: Ferenc Sárai <[email protected]>

Session refactor (#24)

* pr comment fix

* add comment to session.NewFromKeystore

Access logic refactor (#25)

Refactors access logic

---------

Co-authored-by: Peter Ott <[email protected]>
Co-authored-by: Ferenc Sárai <[email protected]>
Co-authored-by: Bálint Ujvári <[email protected]>
Co-authored-by: Peter Ott <[email protected]>

(refactor:) PR comments (#23)

* grantee-refactor

* Dried up code, related to AddPublisher - AddNewGranteeToContent

* Refactor

* removed getEncryptedAccessKey

* Renamed AddGrentees, RemoveGrantees, etc to Add, Remove, etc

* (refactor:) PR comments

* (refactor:) compile check

* removed encrypted_ref, grantee check (validation)

* changed interface

* comments

* some more comments

* refactor kvs and add load and store

* (refactor:) Use ref

* renamed defaultGrantee to granteeList

* removed null encrypted test in  in TestGet_Error

* refactor kvs: pass kvs IF argument instead of storing it

* Refactor according to the result of the workshop

* refactor kvs IF and mock

* fix merge errors and Logic/get_error test

* (test:) Add test for put/get after kvs.Save

---------

Co-authored-by: Roland Seres <[email protected]>
Co-authored-by: Peter Ott <[email protected]>
Co-authored-by: Ferenc Sárai <[email protected]>
Co-authored-by: Bálint Ujvári <[email protected]>
Co-authored-by: Peter Ott <[email protected]>

Add referenced mock kvs (#26)

Act kvs test (#27)

* (test:) Refactor tests

* (fix:) Save reset counter

---------

Co-authored-by: Ferenc Sárai <[email protected]>

Small refactor + al test (#28)

Adds TestDecryptRefWithGrantee_Success and replaces generateFixPrivateKey with getPrivKey

Co-authored-by: Peter Ott <[email protected]>

Persist grantee list on swarm (#30)

* Persist grantee list on swarm
* accesslogic refactor
* Refactor grantee list tests

Co-authored-by: Roland Seres <[email protected]>

Update package imports to use the v2 version of the modules (#33)

Co-authored-by: Ferenc Sárai <[email protected]>

chore(mantaray): merge mantaray fix for rebase

Dynamicaccess service for ACT (#35)

* feat: add act.go with TODOs

feat: Add Act interface

feat: Add Marshal, Unmarshal skeleton

feat: Refactor AccessType to iota

feat: Add upload

feat: Rename GenerateAccessControlManifest -> create

feat: Add saltLengthIs32

feat: Add Mrshal, Unmarshal impl

feat: Add Marshal Unmarshal

feat: Remove ManifestEntry json annotations

feat: Modify to public finc/method

feat: Add ErrSaltLength

Add pkg/dynamicaccess

Refactor interfaces and implement default structs

Refactor typo

Refactor History package to use NewHistory() function

Add Act interface and default implementation

Add ACT use cases to act_ucs.md

Add new files and implement interfaces, refactor packeges

Update act_ucs.md

base usecases

Refactor access logic and add mock implementations***

Add DiffieHellman implementation and remove Keystore***

Refactor NewAccessLogic function

Replace encryption.go to pkg/encryption

Refactor packages

Update act_ucs.md

Update act_ucs.md

Update act_ucs.md

Update act_ucs.md

Update act_ucs.md

* Diffie-Hellman (#3)

* Use DiffieHellmanMock

* Adds a comment about Get

* Add support for ECDSA public key in DiffieHellman.SharedSecret function

* Update defaultAct implementation

* Adds pseudo code for Access Logic

* Update default Act creation; Fix basic Act tests

* Refactor access logic to use new ActMock implementation

* feat(history): test mockups wip

* Refactor DiffieHellman implementation

* changes pseudocode for Diffie-Hellmann read

* Co-authored-by: Bálint Ujvári <[email protected]>

* DiffieHellman mock generates a real sherd secret

* Refactor Act

* Adds manifest lookup

* Extend act_test

* Adds unit tests, some values are mocked

* Refactor act mock impl with map[string]map[string]string

* Add check mock implementation for DiffieHellman interface

* Add Load, Store to Act interface. Refactor Act interface

* refactor act, diffieHellman mocks, tests

* Add TestLoadStore function to act_test.go

* Remove unnecessary code in Load function

* Add history mock and History lookup test

* Act refactor

Co-authored-by: Bálint Ujvári <[email protected]>

* Refactor Add method to return Act interface

* Change Get method return type to []byte

---------

Co-authored-by: Ferenc Sárai <[email protected]>
Co-authored-by: Peter Ott <[email protected]>
Co-authored-by: Bálint Ujvári <[email protected]>
Co-authored-by: Levente Kiss <[email protected]>
Co-authored-by: Roland Seres <[email protected]>
Co-authored-by: Kexort <[email protected]>
Co-authored-by: Bálint Ujvári <[email protected]>

* Acces Logic (#8)

* Use DiffieHellmanMock

* Adds a comment about Get

* Add support for ECDSA public key in DiffieHellman.SharedSecret function

* Update defaultAct implementation

* Adds pseudo code for Access Logic

* Update default Act creation; Fix basic Act tests

* Refactor access logic to use new ActMock implementation

* feat(history): test mockups wip

* Refactor DiffieHellman implementation

* changes pseudocode for Diffie-Hellmann read

* Co-authored-by: Bálint Ujvári <[email protected]>

* DiffieHellman mock generates a real sherd secret

* Refactor Act

* Adds manifest lookup

* Extend act_test

* Adds unit tests, some values are mocked

* Refactor act mock impl with map[string]map[string]string

* Add check mock implementation for DiffieHellman interface

* started Add

* changed some sig

* save

* new grantee addition handling

* mod

* changed helper function visibilities

* some mod with grantee

* test mod

* save

* no error in actInit

* Add_New_Grantee_To_Content

* comment

* copied act_test.go

* no compiler errors on our side

* Adds Add_New_Grantee_To_Content and ActInit

* almost complete grantee container

* maybe complete grantee container

* Solves merge conflict

* access-logic-merge

* fix merge issues

* Added context & details to use cases (#6)

ZH ethersphere#106 Added context & details to use cases

* Add grantee management (#10)

* Add grantee management

* Added controller test

* Fix test fixture, refactor accesslogic

* Add UploadHandler

---------

Co-authored-by: Bálint Ujvári <[email protected]>

* (refactor): from `Get` to `Lookup` to improve clarity and consistency. The changes have been made in the `accesslogic.go`, `act.go`, `act_test.go`, `history_test.go`, and `mock/act.go` files. (#13)

Co-authored-by: Ferenc Sárai <[email protected]>

* Act params rename doc (#14)

* (refactor): ACT interface params + add doc comments

* Revert "(refactor): ACT interface params + add doc comments"

This reverts commit ee8da04.

* (refactor): ACT interface params + add doc comments

* (refactor): Add error to ACT interface methods

---------

Co-authored-by: Ferenc Sárai <[email protected]>

* Move and refactor ACT diffieHellman to Session. Add Key and NewFromKeystore functions. (#16)

* Act swarm address (#15)

* (refactor): ACT interface params + add doc comments

* Revert "(refactor): ACT interface params + add doc comments"

This reverts commit ee8da04.

* (refactor): ACT interface params + add doc comments

* (refactor): Add error to ACT interface methods

* Add in-memory storage and implement Store and Load methods

* Move and refactor ACT diffieHellman to Session. Add Key and NewFromKeystore functions.

---------

Co-authored-by: Ferenc Sárai <[email protected]>
Co-authored-by: Bálint Ujvári <[email protected]>

* (rename): defaultAct to inMemoryAct (#17)

* (refactor): ACT interface params + add doc comments

* Revert "(refactor): ACT interface params + add doc comments"

This reverts commit ee8da04.

* (refactor): ACT interface params + add doc comments

* (refactor): Add error to ACT interface methods

* Add in-memory storage and implement Store and Load methods

* *refactor) Rename defaultAct to inMemroryAct

---------

Co-authored-by: Ferenc Sárai <[email protected]>

* (refactor): Update controller_test.go to use NewInMemoryAct, modify Session.Key to return correct dimensional byte slice (#18)

* (refactor): Update controller_test.go to use NewInMemoryAct, modify Session.Key to return two-dimensional byte slice

* (refactor:) Refactor session Key function to use append instead of index-based assignment

---------

Co-authored-by: Ferenc Sárai <[email protected]>

* Act access logic merge (#19)

* grantee container and access logc tests are passed

* refactored access logic and grantee container

* PR 19 comments resolving

* Refactor

* Refactor

* Act kvs merge (#22)

* grantee container and access logc tests are passed

* refactored access logic and grantee container

* PR 19 comments resolving

* Refactor

* Refactor

* working manifest ACT with basic tests

* (refactor:) Refactor act_test

* (refactor:) Refactor kvs -> kvs.manifest, kvs.memory

* (refactror:) kvs

* refactor kvs contsructors

---------

Co-authored-by: Roland Seres <[email protected]>
Co-authored-by: Bálint Ujvári <[email protected]>
Co-authored-by: Ferenc Sárai <[email protected]>

* Session refactor (#24)

* pr comment fix

* add comment to session.NewFromKeystore

* Access logic refactor (#25)

Refactors access logic

---------

Co-authored-by: Peter Ott <[email protected]>
Co-authored-by: Ferenc Sárai <[email protected]>
Co-authored-by: Bálint Ujvári <[email protected]>
Co-authored-by: Peter Ott <[email protected]>

* (refactor:) PR comments (#23)

* grantee-refactor

* Dried up code, related to AddPublisher - AddNewGranteeToContent

* Refactor

* removed getEncryptedAccessKey

* Renamed AddGrentees, RemoveGrantees, etc to Add, Remove, etc

* (refactor:) PR comments

* (refactor:) compile check

* removed encrypted_ref, grantee check (validation)

* changed interface

* comments

* some more comments

* refactor kvs and add load and store

* (refactor:) Use ref

* renamed defaultGrantee to granteeList

* removed null encrypted test in  in TestGet_Error

* refactor kvs: pass kvs IF argument instead of storing it

* Refactor according to the result of the workshop

* refactor kvs IF and mock

* fix merge errors and Logic/get_error test

* (test:) Add test for put/get after kvs.Save

---------

Co-authored-by: Roland Seres <[email protected]>
Co-authored-by: Peter Ott <[email protected]>
Co-authored-by: Ferenc Sárai <[email protected]>
Co-authored-by: Bálint Ujvári <[email protected]>
Co-authored-by: Peter Ott <[email protected]>

* Add referenced mock kvs (#26)

* add controller upload test

* compile

* Add test for grantee

* Add Upload test

* Implement controller logic, move grantee management

* Act kvs test (#27)

* (test:) Refactor tests

* (fix:) Save reset counter

---------

Co-authored-by: Ferenc Sárai <[email protected]>

* feat: add history lookup and add

* feat: expose mantaray manifest

* Small refactor + al test (#28)

Adds TestDecryptRefWithGrantee_Success and replaces generateFixPrivateKey with getPrivKey

Co-authored-by: Peter Ott <[email protected]>

* chore: tests + minor fixes

* chore: minor test change

* feat: history with reference

* chore: debugging

* Persist grantee list on swarm (#30)

* Persist grantee list on swarm
* accesslogic refactor
* Refactor grantee list tests

Co-authored-by: Roland Seres <[email protected]>

* Merging Swarm 2.0 master (#32)

* fix(stamper): global lock stamper across multiple upload sessions (ethersphere#4578)
* fix: strategy and fetch timeout parsing (ethersphere#4579)
* feat: neighborhood suggester config (ethersphere#4580)
* feat: add codeql.yml (ethersphere#4334)
* feat: add reserveSizeWithinRadius to status protocol (ethersphere#4585)
* fix: missing 200 response (ethersphere#4526)
* feat: pinned reference integrity check API (ethersphere#4573)
* fix(redundancy/getter): wait for recovery and return error (ethersphere#4581)
* fix(pushsync): store the chunk locally when no peers are available fo… (ethersphere#4597)
* fix(redundancy): on by default when downloading (ethersphere#4602)
* fix: add missing openapi spec (ethersphere#4598)
* feat: bzz resource info API (ethersphere#4588)
* fix(redundancy): bzz unit test (ethersphere#4603)
* feat: redundancy ci (ethersphere#4591)
* chore: bump github.com/quic-go/quic-go from 0.38.1 to 0.38.2 (ethersphere#4534)
* feat: split input file to chunks with specified redundancy (ethersphere#4600)
* perf(getter): cancel inflight requests if enough chunks are fetched for recovery (ethersphere#4608)
* fix: store dir error info (ethersphere#4605)
* chore: remove repetitive words (ethersphere#4611)
* fix: use neighborhood suggester only on mainnet (ethersphere#4612)
* feat: alternative withdrawal address (ethersphere#4606)
* fix(seg65) (ethersphere#4604)
* fix(getter): redundancy getter cleanup (ethersphere#4610)
* feat: v2 (ethersphere#4615)
* fix(pin_integrity): changed route and added openapi (ethersphere#4616)
* fix: missing v2 in the makefile and goreleaser (ethersphere#4622)

* chore: package update

* Update package imports to use the v2 version of the modules (#33)

Co-authored-by: Ferenc Sárai <[email protected]>

* fix walkfn with key sort

* feat: new option to walk nodes of mantaray in sequence

* feat: add latest timestamp check

* chore: uncomment wip stuff

* chore: requested changes

* test: fix to latest adjustment

* Add ctrl logic

* Add dac service

* Continue add ACT handler

* chore: use ZeroAddress

* chore: make var name more general

* connect api test with dac service

* refactor ctrl based on history v2

* Fix: controller upload download flow + basic tests

* hacked mock dac service for simple upload and download

* Insert act uploadhandler into /bzz endpoint and remove uphandler

* Refactor controller and api; enrypt and rLevel passed on during up/download

* Connect Get,Head,Post endpoints with ACT

* Add: act to devnode

* devnode: close dac during shutdown

* pass decrypted ref in r.ctx

* set address ctx as swarm address

* refactor: call actEncrpytionHandler in every endpoint

* typo and comment fix in dynamicaccess

* Add: mock dynamicaccess service and api tests

* Add: TestDacEachEndpointWithAct; fixed some review comments

* Add ACT head test for endpoints

* CHG: first encrypt via ACT then upload normal reference

* FIX: apiservice.dac nil error

---------

Co-authored-by: Ferenc Sárai <[email protected]>
Co-authored-by: Ferenc Sárai <[email protected]>
Co-authored-by: Peter Ott <[email protected]>
Co-authored-by: Levente Kiss <[email protected]>
Co-authored-by: Roland Seres <[email protected]>
Co-authored-by: Kexort <[email protected]>
Co-authored-by: Bálint Ujvári <[email protected]>
Co-authored-by: András Arányi <[email protected]>
Co-authored-by: rolandlor <[email protected]>
Co-authored-by: Peter Ott <[email protected]>

Act refactor api and ctrl (#36)

* Refactor: newreference pattern for history, kvs, grantee

* CHG: history metadata to store granteelist reference

* History test with metadata

* Remove putter from grantee

ACT grantee management (#37)

* implement grantee management

* Add POST endpoint + fixes

* Save grantees as pubkey list and fix remove error; CHG: act-handler logger names

* Refactor: pass getter, putter to controller functions

* Refactor: error handling in dynamicaccess; Read cache header only for download handlers

* CHG: grantees ref is encrypted and added to history ref + tests

* Fix nil pointer dereference panic

* CHG: put actref in handlegrantees; Add: pin, tag,deferred headers

* CHG: pass loadsave to handlers; check if history address is nil

* FIX: re-init history so that it can be saved; only add publisher if histroy is zero

* make act timestamp optional

* fix revoke grantees

* Fix: Act timestamp header nil check; Uploadhandler UT

* Fix controller nil pointer deref

---------

Co-authored-by: Bálint Ujvári <[email protected]>

Start refactoring for new linter rules (#39)

refactor: refactoring to match new linter rules according to #38

Not everything is fixed, just a reference what can and needs to be improved.

* implement grantee management

* Add POST endpoint + fixes

* Save grantees as pubkey list and fix remove error; CHG: act-handler logger names

* Refactor: pass getter, putter to controller functions

* Refactor: error handling in dynamicaccess; Read cache header only for download handlers

* CHG: grantees ref is encrypted and added to history ref + tests

* Fix nil pointer dereference panic

* CHG: put actref in handlegrantees; Add: pin, tag,deferred headers

* CHG: pass loadsave to handlers; check if history address is nil

* FIX: re-init history so that it can be saved; only add publisher if histroy is zero

* make act timestamp optional

* fix revoke grantees

* Fix: Act timestamp header nil check; Uploadhandler UT

* refactor: start refactoring for now linter rules

* refactor: revert non ACT related files

* CHG: accesslogic getkeys refactor

* refactor: fix errcheck and ineffassign linter errors in most cases

* refactor: add headers, and change error handling

* refactor: add headers

---------

Co-authored-by: Kexort <[email protected]>
Co-authored-by: Bálint Ujvári <[email protected]>

refactor(act): typos & docs (#40)

refactor(act): typos, docs, removed unused import aliases

refactor(act): naming and fix remaining PR comments (#42)

* Refactor naming and fix remaining PR comments

* use ctx in grantees.get

* remove act_ucs.md

Refactor accesslogic.AddGrantee and parallelize tests (#43)

docs(act): add act api to openapi (#44)

docs(act): add incoming act headers to openapi
docs(act): add act headers to upload endpoints in openapi
docs(act): add act grantee list endpoints to openapi

refactor(act): chunk download and granteelist handling (#46)

refactor(act): controller logic (#47)

test(act): controller add, revoke and get with history + fix typos (#48)

refactor(act): fix pr comments (#50)

* refactor(act): fix pr comments

* refactor(act): fix linter errors

* refactor(act): move kvs to accesscontrol as a subpackage

* refactor(act): typo and comment fix

chore: bump protobuf version to 1.33.0 (ethersphere#4613) (ethersphere#4688)

fix: save stamp issuer after failed uploads (ethersphere#4684)

chore: pre-release updates (ethersphere#4675)

chore: bump go ethereum version to 1.14.3 (ethersphere#4661) (ethersphere#4689)

fix: allow maxMultiplexForwards to be set to zero (ethersphere#4682)

chore: bump go version to 1.22 (ethersphere#4590) (ethersphere#4687)

feat: remove debug api (ethersphere#4674)

feat: remove auth (ethersphere#4679)

doc(act): add grantee endpoint to openapi (#62)

ci: disable commit linting (temporarily) (#63)

refactor(act): error handling and testing (#64)
  • Loading branch information
ferencsarai authored and aranyia committed Jul 9, 2024
1 parent 4064d14 commit 7c82d2e
Show file tree
Hide file tree
Showing 114 changed files with 4,944 additions and 3,267 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/beekeeper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,6 @@ jobs:
- name: Test manifest
id: manifest
run: timeout ${TIMEOUT} beekeeper check --cluster-name local-dns --checks=ci-manifest
- name: Test authenticate
id: authenticate
run: timeout ${TIMEOUT} bash -c 'until beekeeper check --cluster-name local-dns --checks ci-authenticate; do echo "waiting for auth..."; sleep .3; done'
- name: Test postage stamps
id: postage-stamps
run: timeout ${TIMEOUT} beekeeper check --cluster-name local-dns --checks ci-postage
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
if: steps.checkdocs.outputs.build_docs == 'true'
uses: acud/openapi-dockerized@v1
with:
build-roots: 'openapi/Swarm.yaml openapi/SwarmDebug.yaml'
build-roots: 'openapi/Swarm.yaml'
env:
AWS_ACCESS_KEY_ID: ${{ secrets.DO_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.DO_AWS_SECRET_ACCESS_KEY }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ jobs:
with:
cache: false
go-version-file: go.mod
- name: Commit linting
if: github.ref != 'refs/heads/master'
uses: wagoid/commitlint-github-action@v5
# - name: Commit linting
# if: github.ref != 'refs/heads/master'
# uses: wagoid/commitlint-github-action@v5
- name: GolangCI-Lint
uses: golangci/golangci-lint-action@v4
with:
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,9 @@ jobs:
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Set the API and debug API versions
- name: Set the API version
run: |
echo "BEE_API_VERSION=$(grep '^ version:' openapi/Swarm.yaml | awk '{print $2}')" >> $GITHUB_ENV
echo "BEE_DEBUG_API_VERSION=$(grep '^ version:' openapi/SwarmDebug.yaml | awk '{print $2}')" >> $GITHUB_ENV
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
Expand All @@ -50,4 +49,3 @@ jobs:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
GPG_FINGERPRINT: ${{ secrets.GPG_FINGERPRINT }}
BEE_API_VERSION: ${{ env.BEE_API_VERSION }}
BEE_DEBUG_API_VERSION: ${{ env.BEE_DEBUG_API_VERSION }}
5 changes: 0 additions & 5 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ builds:
- -X github.com/ethersphere/bee/v2.commitHash={{ .ShortCommit }}
- -X github.com/ethersphere/bee/v2.commitTime={{ .CommitTimestamp }}
- -X github.com/ethersphere/bee/v2/pkg/api.Version={{ .Env.BEE_API_VERSION }}
- -X github.com/ethersphere/bee/v2/pkg/debugapi.Version={{ .Env.BEE_DEBUG_API_VERSION }}
env:
- CGO_ENABLED=0
goos:
Expand All @@ -43,7 +42,6 @@ builds:
- -X github.com/ethersphere/bee/v2.commitHash={{ .ShortCommit }}
- -X github.com/ethersphere/bee/v2.commitTime={{ .CommitTimestamp }}
- -X github.com/ethersphere/bee/v2/pkg/api.Version={{ .Env.BEE_API_VERSION }}
- -X github.com/ethersphere/bee/v2/pkg/debugapi.Version={{ .Env.BEE_DEBUG_API_VERSION }}
env:
- CGO_ENABLED=0
goos:
Expand All @@ -69,7 +67,6 @@ builds:
- -X github.com/ethersphere/bee/v2.commitHash={{ .ShortCommit }}
- -X github.com/ethersphere/bee/v2.commitTime={{ .CommitTimestamp }}
- -X github.com/ethersphere/bee/v2/pkg/api.Version={{ .Env.BEE_API_VERSION }}
- -X github.com/ethersphere/bee/v2/pkg/debugapi.Version={{ .Env.BEE_DEBUG_API_VERSION }}
env:
- CGO_ENABLED=0
goos:
Expand All @@ -89,7 +86,6 @@ builds:
- -X github.com/ethersphere/bee/v2.commitHash={{ .ShortCommit }}
- -X github.com/ethersphere/bee/v2.commitTime={{ .CommitTimestamp }}
- -X github.com/ethersphere/bee/v2/pkg/api.Version={{ .Env.BEE_API_VERSION }}
- -X github.com/ethersphere/bee/v2/pkg/debugapi.Version={{ .Env.BEE_DEBUG_API_VERSION }}
env:
- CGO_ENABLED=0
goos:
Expand All @@ -108,7 +104,6 @@ builds:
- -X github.com/ethersphere/bee/v2.commitHash={{ .ShortCommit }}
- -X github.com/ethersphere/bee/v2.commitTime={{ .CommitTimestamp }}
- -X github.com/ethersphere/bee/v2/pkg/api.Version={{ .Env.BEE_API_VERSION }}
- -X github.com/ethersphere/bee/v2/pkg/debugapi.Version={{ .Env.BEE_DEBUG_API_VERSION }}
env:
- CGO_ENABLED=0
goos:
Expand Down
4 changes: 2 additions & 2 deletions CODING.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,9 @@ A value of `all` will enable the highest verbosity of V-level.

Examples:

`curl -XPUT http://localhost:1635/loggers/bm9kZS8q/none` - will disable all loggers; `bm9kZS8q` is base64 encoded `node/*` regular expression.
`curl -XPUT http://localhost:1633/loggers/bm9kZS8q/none` - will disable all loggers; `bm9kZS8q` is base64 encoded `node/*` regular expression.

`curl -XPUT http://localhost:1635/loggers/bm9kZS9hcGlbMV1bXT4-ODI0NjM0OTMzMjU2/error` - will set the verbosity of the logger with the subsystem `node/api[1][]>>824634933256` to `error`.
`curl -XPUT http://localhost:1633/loggers/bm9kZS9hcGlbMV1bXT4-ODI0NjM0OTMzMjU2/error` - will set the verbosity of the logger with the subsystem `node/api[1][]>>824634933256` to `error`.

## Commit Messages

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ These are work items that are good if you're contributing to the codebase for th

- Performance optimizations

The best way to propose any optimizations would be to provide the relevant data to describe the problem and then also the same data after the optimizations are done. Keep in mind, Bee nodes work in a distributed system, so changes that would seem good locally may not hold in some cases. The Bee client in debug mode can show you metrics as well as pprof information. This can be used to demonstrate the optimizations.
The best way to propose any optimizations would be to provide the relevant data to describe the problem and then also the same data after the optimizations are done. Keep in mind, Bee nodes work in a distributed system, so changes that would seem good locally may not hold in some cases. The Bee client can show you metrics as well as pprof information. This can be used to demonstrate the optimizations.

- Concurrency related optimizations

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.21 AS build
FROM golang:1.22 AS build

WORKDIR /src
# enable modules caching in separate layer
Expand All @@ -24,7 +24,7 @@ RUN mkdir -p /home/bee/.bee && chown 999:999 /home/bee/.bee

COPY --from=build /src/dist/bee /usr/local/bin/bee

EXPOSE 1633 1634 1635
EXPOSE 1633 1634
USER bee
WORKDIR /home/bee
VOLUME /home/bee/.bee
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN addgroup --system bee --gid 998; \

COPY bee /bee

EXPOSE 1633 1634 1635
EXPOSE 1633 1634
USER bee
WORKDIR /home/bee

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.goreleaser
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN mkdir -p /home/bee/.bee && chown 999:999 /home/bee/.bee

COPY bee /usr/local/bin/bee

EXPOSE 1633 1634 1635
EXPOSE 1633 1634
USER bee
WORKDIR /home/bee
VOLUME /home/bee/.bee
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.scratch
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ COPY --from=0 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs
COPY --from=0 /etc/passwd /etc/passwd
COPY --from=0 /home /home

EXPOSE 1633 1634 1635
EXPOSE 1633 1634
USER bee
WORKDIR /home/bee
VOLUME /home/bee/.bee
Expand Down
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ REACHABILITY_OVERRIDE_PUBLIC ?= false
BATCHFACTOR_OVERRIDE_PUBLIC ?= 5

BEE_API_VERSION ?= "$(shell grep '^ version:' openapi/Swarm.yaml | awk '{print $$2}')"
BEE_DEBUG_API_VERSION ?= "$(shell grep '^ version:' openapi/SwarmDebug.yaml | awk '{print $$2}')"

VERSION ?= "$(shell git describe --tags --abbrev=0 | cut -c2-)"
COMMIT_HASH ?= "$(shell git describe --long --dirty --always --match "" || true)"
Expand All @@ -24,7 +23,6 @@ LDFLAGS ?= -s -w \
-X github.com/ethersphere/bee/v2.commitHash="$(COMMIT_HASH)" \
-X github.com/ethersphere/bee/v2.commitTime="$(COMMIT_TIME)" \
-X github.com/ethersphere/bee/v2/pkg/api.Version="$(BEE_API_VERSION)" \
-X github.com/ethersphere/bee/v2/pkg/api.DebugVersion="$(BEE_DEBUG_API_VERSION)" \
-X github.com/ethersphere/bee/v2/pkg/p2p/libp2p.reachabilityOverridePublic="$(REACHABILITY_OVERRIDE_PUBLIC)" \
-X github.com/ethersphere/bee/v2/pkg/postage/listener.batchFactorOverridePublic="$(BATCHFACTOR_OVERRIDE_PUBLIC)"

Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
[![codecov](https://codecov.io/gh/ethersphere/bee/branch/master/graph/badge.svg?token=63RNRLO3RU)](https://codecov.io/gh/ethersphere/bee)
[![Go Report Card](https://goreportcard.com/badge/github.com/ethersphere/bee)](https://goreportcard.com/report/github.com/ethersphere/bee)
[![API OpenAPI Specs](https://img.shields.io/badge/openapi-api-blue)](https://docs.ethswarm.org/api/)
[![Debug API OpenAPI Specs](https://img.shields.io/badge/openapi-debugapi-lightblue)](https://docs.ethswarm.org/debug-api/)
![Docker Pulls](https://img.shields.io/docker/pulls/ethersphere/bee)
![GitHub all releases](https://img.shields.io/github/downloads/ethersphere/bee/total)
![GitHub](https://img.shields.io/github/license/ethersphere/bee)
Expand All @@ -27,7 +26,7 @@ There are two versioning schemes used in Bee that you should be aware of. The ma
strict Semantic Versioning. Bee hosts different peer-to-peer wire protocol implementations and individual protocol breaking changes would necessitate a bump in the major part of the version. Breaking changes are expected with bumps of the minor version component. New (backward-compatible) features and bug fixes are expected with a bump of the patch component. Major version bumps are reserved for significant changes in Swarm's incentive structure.


The second set of versions that are important are the Bee's API versions (denoted in our [Bee](https://github.com/ethersphere/bee/blob/master/openapi/Swarm.yaml) and [Bee Debug](https://github.com/ethersphere/bee/blob/master/openapi/SwarmDebug.yaml) OpenAPI specifications). These versions **do follow**
The second is the Bee's API version (denoted in our [Bee](https://github.com/ethersphere/bee/blob/master/openapi/Swarm.yaml) OpenAPI specifications). This version **follows**
Semantic Versioning and hence you should follow these for breaking changes.

## Contributing
Expand Down
46 changes: 0 additions & 46 deletions act_ucs.md

This file was deleted.

73 changes: 0 additions & 73 deletions cmd/bee/cmd/bcrypt.go

This file was deleted.

14 changes: 0 additions & 14 deletions cmd/bee/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ const (
optionNameP2PAddr = "p2p-addr"
optionNameNATAddr = "nat-addr"
optionNameP2PWSEnable = "p2p-ws-enable"
optionNameDebugAPIEnable = "debug-api-enable"
optionNameDebugAPIAddr = "debug-api-addr"
optionNameBootnodes = "bootnode"
optionNameNetworkID = "network-id"
optionWelcomeMessage = "welcome-message"
Expand Down Expand Up @@ -78,9 +76,6 @@ const (
optionNameStaticNodes = "static-nodes"
optionNameAllowPrivateCIDRs = "allow-private-cidrs"
optionNameSleepAfter = "sleep-after"
optionNameRestrictedAPI = "restricted"
optionNameTokenEncryptionKey = "token-encryption-key"
optionNameAdminPasswordHash = "admin-password"
optionNameUsePostageSnapshot = "use-postage-snapshot"
optionNameStorageIncentivesEnable = "storage-incentives-enable"
optionNameStateStoreCacheCapacity = "statestore-cache-capacity"
Expand Down Expand Up @@ -144,10 +139,6 @@ func newCommand(opts ...option) (c *command, err error) {
return nil, err
}

if err := c.initHasherCmd(); err != nil {
return nil, err
}

if err := c.initInitCmd(); err != nil {
return nil, err
}
Expand Down Expand Up @@ -256,8 +247,6 @@ func (c *command) setAllFlags(cmd *cobra.Command) {
cmd.Flags().String(optionNameNATAddr, "", "NAT exposed address")
cmd.Flags().Bool(optionNameP2PWSEnable, false, "enable P2P WebSocket transport")
cmd.Flags().StringSlice(optionNameBootnodes, []string{""}, "initial nodes to connect to")
cmd.Flags().Bool(optionNameDebugAPIEnable, false, "enable debug HTTP API")
cmd.Flags().String(optionNameDebugAPIAddr, ":1635", "debug HTTP API listen address")
cmd.Flags().Uint64(optionNameNetworkID, chaincfg.Mainnet.NetworkID, "ID of the Swarm network")
cmd.Flags().StringSlice(optionCORSAllowedOrigins, []string{}, "origins with CORS headers enabled")
cmd.Flags().Bool(optionNameTracingEnabled, false, "enable tracing")
Expand Down Expand Up @@ -297,9 +286,6 @@ func (c *command) setAllFlags(cmd *cobra.Command) {
cmd.Flags().Bool(optionNamePProfMutex, false, "enable pprof mutex profile")
cmd.Flags().StringSlice(optionNameStaticNodes, []string{}, "protect nodes from getting kicked out on bootnode")
cmd.Flags().Bool(optionNameAllowPrivateCIDRs, false, "allow to advertise private CIDRs to the public network")
cmd.Flags().Bool(optionNameRestrictedAPI, false, "enable permission check on the http APIs")
cmd.Flags().String(optionNameTokenEncryptionKey, "", "admin username to get the security token")
cmd.Flags().String(optionNameAdminPasswordHash, "", "bcrypt hash of the admin password to get the security token")
cmd.Flags().Bool(optionNameUsePostageSnapshot, false, "bootstrap node using postage snapshot from the network")
cmd.Flags().Bool(optionNameStorageIncentivesEnable, true, "enable storage incentives feature")
cmd.Flags().Uint64(optionNameStateStoreCacheCapacity, 100_000, "lru memory caching capacity in number of statestore entries")
Expand Down
Loading

0 comments on commit 7c82d2e

Please sign in to comment.