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

Naming update - Blockless => Bless #181

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ jobs:
with:
go-version: "1.21.0"

- name: Install Blockless Runtime
- name: Install Bless Runtime
run: |
mkdir -p /tmp/blockless-runtime
curl -L -o runtime.tar.gz https://github.com/blocklessnetwork/runtime/releases/download/v0.3.1/blockless-runtime.ubuntu-20.04.x86_64.tar.gz
tar xzf runtime.tar.gz -C /tmp/blockless-runtime
mkdir -p /tmp/bls-runtime
curl -L -o runtime.tar.gz https://github.com/blessnetwork/bls-runtime/releases/download/v0.3.1/blockless-runtime.ubuntu-20.04.x86_64.tar.gz
tar xzf runtime.tar.gz -C /tmp/bls-runtime
rm runtime.tar.gz

- name: Run integration tests
run: |
export B7S_INTEG_RUNTIME_DIR=/tmp/blockless-runtime
export B7S_INTEG_RUNTIME_DIR=/tmp/bls-runtime
go test --tags=integration ./...
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ clean:
setup:
@echo "\n📥 Downloading and extracting runtime...\n"
mkdir -p /tmp/runtime
wget -O /tmp/blockless-runtime.tar.gz https://github.com/blocklessnetwork/runtime/releases/download/v0.3.4/blockless-runtime.darwin-latest.x86_64.tar.gz
tar -xzf /tmp/blockless-runtime.tar.gz -C /tmp/runtime
wget -O /tmp/bls-runtime.tar.gz https://github.com/blessnetwork/bls-runtime/releases/download/v0.3.4/blockless-runtime.darwin-latest.x86_64.tar.gz
tar -xzf /tmp/bls-runtime.tar.gz -C /tmp/runtime
@echo "\n✅ Done.\n"
27 changes: 14 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
[![Coverage](https://img.shields.io/badge/Coverage-64.5%25-yellow)](https://img.shields.io/badge/Coverage-64.5%25-yellow)
[![Go Report Card](https://goreportcard.com/badge/github.com/blocklessnetwork/b7s)](https://goreportcard.com/report/github.com/blocklessnetwork/b7s)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/blocklessnetwork/b7s/blob/main/LICENSE.md)
[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/blocklessnetwork/b7s)](https://img.shields.io/github/v/release/blocklessnetwork/b7s)
[![Go Report Card](https://goreportcard.com/badge/github.com/blessnetwork/b7s)](https://goreportcard.com/report/github.com/blessnetwork/b7s)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/blessnetwork/b7s/blob/main/LICENSE.md)
[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/blessnetwork/b7s)](https://img.shields.io/github/v/release/blessnetwork/b7s)


# b7s daemon

b7s is a peer-to-peer networking daemon for the blockless network. It is supported on Windows, Linux, and MacOS platforms for both x64 and arm64 architectures.
b7s is a peer-to-peer networking daemon for the bless network.
It is supported on Windows, Linux, and MacOS platforms for both x64 and arm64 architectures.

## Installation

You can install b7s using either curl or wget:

```bash
# using curl
sudo sh -c "curl https://raw.githubusercontent.com/blocklessnetwork/b7s/main/download.sh | bash"
sudo sh -c "curl https://raw.githubusercontent.com/blessnetwork/b7s/main/download.sh | bash"

# using wget
sudo sh -c "wget https://raw.githubusercontent.com/blocklessnetwork/b7s/main/download.sh -v -O download.sh; chmod +x download.sh; ./download.sh; rm -rf download.sh"
sudo sh -c "wget https://raw.githubusercontent.com/blessnetwork/b7s/main/download.sh -v -O download.sh; chmod +x download.sh; ./download.sh; rm -rf download.sh"
```

You can also use Docker to install b7s. See the [Docker documentation](/docker/README.md) for more information.
Expand All @@ -34,7 +35,7 @@ You can see an example YAML config file [here](/cmd/node/example.yaml).
| config | N/A | N/A | Config file to load. |
| log-level | -l | "info" | Level of logging to use. |
| db | N/A | "db" | Path to database used for persisting peer and function data. |
| role | -r | "worker" | Role this node will have in the Blockless protocol (head or worker). |
| role | -r | "worker" | Role this node will have in the Bless protocol (head or worker). |
| workspace | N/A | "./workspace" | Directory that the node will use for file storage. |
| concurrency | -c | node.DefaultConcurrency | Maximum number of requests the node will process in parallel. |
| load-attributes | N/A | false | Load attributes from the environment. |
Expand Down Expand Up @@ -62,10 +63,10 @@ You can see an example YAML config file [here](/cmd/node/example.yaml).

| Flag | Short Form | Default Value | Description |
| ------------------------- | ---------- | ----------------------- | --------------------------------------------------------------------------------------------- |
| runtime-path | N/A | N/A | Local path to the Blockless Runtime. |
| runtime-cli | N/A | "bls-runtime" | Name of the Blockless Runtime executable, as found in the runtime-path. |
| cpu-percentage-limit | N/A | 1.0 | Amount of CPU time allowed for Blockless Functions in the 0-1 range, 1 being unlimited (100%) |
| memory-limit | N/A | N/A | Memory limit for Blockless Functions, in kB. |
| runtime-path | N/A | N/A | Local path to the Bless Runtime. |
| runtime-cli | N/A | "bls-runtime" | Name of the Bless Runtime executable, as found in the runtime-path. |
| cpu-percentage-limit | N/A | 1.0 | Amount of CPU time allowed for Bless Functions in the 0-1 range, 1 being unlimited (100%) |
| memory-limit | N/A | N/A | Memory limit for Bless Functions, in kB. |

### Head Node

Expand All @@ -87,8 +88,8 @@ You can see an example YAML config file [here](/cmd/node/example.yaml).

b7s depends on the following repositories:

- blocklessnetwork/runtime
- blocklessnetwork/orchestration-chain
- blessnetwork/runtime
- blessnetwork/orchestration-chain

## Contributing

Expand Down
6 changes: 3 additions & 3 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

## Reporting a Vulnerability

At Blockless Network, we take security very seriously. If you discover any security vulnerabilities, we encourage you to report them responsibly.
At Bless Network, we take security very seriously. If you discover any security vulnerabilities, we encourage you to report them responsibly.

Please report any security issues to our Security Advisories page: [Blockless Network Security Advisories](https://github.com/blocklessnetwork/b7s/security/advisories)
Please report any security issues to our Security Advisories page: [Bless Network Security Advisories](https://github.com/blessnetwork/b7s/security/advisories)

### Guidelines for Reporting

Expand All @@ -16,4 +16,4 @@ Please report any security issues to our Security Advisories page: [Blockless Ne

At this time, we do not offer a bounty award for reported vulnerabilities. However, we greatly appreciate your efforts in helping us maintain the security and integrity of our project.

Thank you for contributing to the security of Blockless Network.
Thank you for contributing to the security of Bless Network.
4 changes: 2 additions & 2 deletions api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import (
"github.com/rs/zerolog"
)

// API provides REST API functionality for the Blockless head node.
// API provides REST API functionality for the Bless head node.
type API struct {
Log zerolog.Logger
Node Node
}

// New creates a new instance of a Blockless head node REST API. Access to node data is provided by the provided `node`.
// New creates a new instance of a Bless head node REST API. Access to node data is provided by the provided `node`.
func New(log zerolog.Logger, node Node) *API {

api := API{
Expand Down
4 changes: 2 additions & 2 deletions api/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (

"github.com/labstack/echo/v4"

"github.com/blocklessnetwork/b7s/api"
"github.com/blocklessnetwork/b7s/testing/mocks"
"github.com/blessnetwork/b7s/api"
"github.com/blessnetwork/b7s/testing/mocks"
)

const (
Expand Down
50 changes: 25 additions & 25 deletions api/b7s-swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ externalDocs:
url: http://swagger.io
tags:
- name: functions
description: Everything about Blockless Functions
description: Everything about Bless Functions
externalDocs:
description: Find out more
url: https://blockless.network/docs/network
url: https://bless.network/docs/network
- name: health
description: Verify node health and availability

Expand All @@ -37,11 +37,11 @@ paths:
post:
tags:
- functions
summary: Execute a Blockless Function
description: Execute a Blockless Function
summary: Execute a Bless Function
description: Execute a Bless Function
operationId: executeFunction
requestBody:
description: Execute a Blockless Function
description: Execute a Bless Function
content:
application/json:
schema:
Expand Down Expand Up @@ -89,11 +89,11 @@ paths:
post:
tags:
- functions
summary: Install a Blockless Function
description: Install a Blockless Function
summary: Install a Bless Function
description: Install a Bless Function
operationId: installFunction
requestBody:
description: Install a Blockless Function
description: Install a Bless Function
content:
application/json:
schema:
Expand Down Expand Up @@ -133,7 +133,7 @@ components:
x-go-type-skip-optional-pointer: true
parameters:
type: array
description: CLI arguments for the Blockless Function
description: CLI arguments for the Bless Function
items:
$ref: '#/components/schemas/ExecutionParameter'
example:
Expand All @@ -157,7 +157,7 @@ components:
x-go-type-skip-optional-pointer: true
x-go-type: execute.Parameter
x-go-type-import:
path: github.com/blocklessnetwork/b7s/models/execute
path: github.com/blessnetwork/b7s/models/execute
properties:
value:
type: string
Expand All @@ -169,20 +169,20 @@ components:
x-go-type-skip-optional-pointer: true
x-go-type: execute.Config
x-go-type-import:
path: github.com/blocklessnetwork/b7s/models/execute
path: github.com/blessnetwork/b7s/models/execute
properties:
runtime:
$ref: '#/components/schemas/RuntimeConfig'
env_vars:
description: Environment variables for the Blockless Function
description: Environment variables for the Bless Function
type: array
x-go-type-skip-optional-pointer: true
items:
$ref: '#/components/schemas/NamedValue'
stdin:
description: Standard Input for the Blockless Function
description: Standard Input for the Bless Function
type: string
example: Standard Input for the Blockless Function
example: Standard Input for the Bless Function
x-go-type-skip-optional-pointer: true
permissions:
description: Permissions for the Execution
Expand All @@ -196,7 +196,7 @@ components:
attributes:
$ref: '#/components/schemas/NodeAttributes'
number_of_nodes:
description: Number of nodes that should execute the Blockless Function
description: Number of nodes that should execute the Bless Function
type: integer
example: 1
x-go-type-skip-optional-pointer: true
Expand All @@ -216,12 +216,12 @@ components:
x-go-type-skip-optional-pointer: true

RuntimeConfig:
description: Configuration options for the Blockless Runtime
description: Configuration options for the Bless Runtime
type: object
x-go-type-skip-optional-pointer: true
x-go-type: execute.BLSRuntimeConfig
x-go-type-import:
path: github.com/blocklessnetwork/b7s/models/execute
path: github.com/blessnetwork/b7s/models/execute
properties:
entry:
type: string
Expand Down Expand Up @@ -254,7 +254,7 @@ components:
x-go-type-skip-optional-pointer: true
x-go-type: execute.Attributes
x-go-type-import:
path: github.com/blocklessnetwork/b7s/models/execute
path: github.com/blessnetwork/b7s/models/execute
properties:
attestation_required:
description: Is it necessary that the Node attributes are vouched for by an attestor
Expand All @@ -275,7 +275,7 @@ components:
x-go-type-skip-optional-pointer: true
x-go-type: execute.AttributeAttestors
x-go-type-import:
path: github.com/blocklessnetwork/b7s/models/execute
path: github.com/blessnetwork/b7s/models/execute
properties:
each:
description: LibP2P Peer IDs of each mandatory attestor
Expand All @@ -301,7 +301,7 @@ components:
x-go-type-skip-optional-pointer: true
x-go-type: execute.ResultAggregation
x-go-type-import:
path: github.com/blocklessnetwork/b7s/models/execute
path: github.com/blessnetwork/b7s/models/execute
properties:
enable:
type: boolean
Expand Down Expand Up @@ -341,7 +341,7 @@ components:
x-go-type-skip-optional-pointer: true
x-go-type: aggregate.Results
x-go-type-import:
path: github.com/blocklessnetwork/b7s/node/aggregate
path: github.com/blessnetwork/b7s/node/aggregate
items:
$ref: '#/components/schemas/AggregatedResult'

Expand All @@ -351,7 +351,7 @@ components:
x-go-type-skip-optional-pointer: true
x-go-type: aggregate.Result
x-go-type-import:
path: github.com/blocklessnetwork/b7s/node/aggregate
path: github.com/blessnetwork/b7s/node/aggregate
properties:
result:
$ref: '#/components/schemas/ExecutionResult'
Expand All @@ -377,7 +377,7 @@ components:
x-go-type-skip-optional-pointer: true
x-go-type: execute.RuntimeOutput
x-go-type-import:
path: github.com/blocklessnetwork/b7s/models/execute
path: github.com/blessnetwork/b7s/models/execute
properties:
stdout:
description: Standard Output of the execution
Expand All @@ -398,7 +398,7 @@ components:
x-go-type-skip-optional-pointer: true
x-go-type: execute.Cluster
x-go-type-import:
path: github.com/blocklessnetwork/b7s/models/execute
path: github.com/blessnetwork/b7s/models/execute
properties:
main:
description: LibP2P ID of the Primary node for the cluster
Expand All @@ -422,7 +422,7 @@ components:
x-go-type-skip-optional-pointer: true
x-go-type: execute.EnvVar
x-go-type-import:
path: github.com/blocklessnetwork/b7s/models/execute
path: github.com/blessnetwork/b7s/models/execute
required:
- name
- value
Expand Down
8 changes: 4 additions & 4 deletions api/execute.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (

"github.com/labstack/echo/v4"

"github.com/blocklessnetwork/b7s/models/blockless"
"github.com/blocklessnetwork/b7s/models/execute"
"github.com/blocklessnetwork/b7s/node/aggregate"
"github.com/blessnetwork/b7s/models/bls"
"github.com/blessnetwork/b7s/models/execute"
"github.com/blessnetwork/b7s/node/aggregate"
)

// ExecuteFunction implements the REST API endpoint for function execution.
Expand Down Expand Up @@ -49,7 +49,7 @@ func (a *API) ExecuteFunction(ctx echo.Context) error {
}

// Communicate the reason for failure in these cases.
if errors.Is(err, blockless.ErrRollCallTimeout) || errors.Is(err, blockless.ErrExecutionNotEnoughNodes) {
if errors.Is(err, bls.ErrRollCallTimeout) || errors.Is(err, bls.ErrExecutionNotEnoughNodes) {
res.Message = err.Error()
}

Expand Down
8 changes: 4 additions & 4 deletions api/execute_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (
"github.com/libp2p/go-libp2p/core/peer"
"github.com/stretchr/testify/require"

"github.com/blocklessnetwork/b7s/api"
"github.com/blocklessnetwork/b7s/models/codes"
"github.com/blocklessnetwork/b7s/models/execute"
"github.com/blocklessnetwork/b7s/testing/mocks"
"github.com/blessnetwork/b7s/api"
"github.com/blessnetwork/b7s/models/codes"
"github.com/blessnetwork/b7s/models/execute"
"github.com/blessnetwork/b7s/testing/mocks"
)

func TestAPI_Execute(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion api/health.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/labstack/echo/v4"

"github.com/blocklessnetwork/b7s/models/response"
"github.com/blessnetwork/b7s/models/response"
)

// Execute implements the REST API endpoint for function execution.
Expand Down
2 changes: 1 addition & 1 deletion api/health_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/stretchr/testify/require"

"github.com/blocklessnetwork/b7s/models/response"
"github.com/blessnetwork/b7s/models/response"
)

func TestAPI_HealthResult(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions api/install_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"github.com/labstack/echo/v4"
"github.com/stretchr/testify/require"

"github.com/blocklessnetwork/b7s/api"
"github.com/blocklessnetwork/b7s/testing/mocks"
"github.com/blessnetwork/b7s/api"
"github.com/blessnetwork/b7s/testing/mocks"
)

func TestAPI_FunctionInstall(t *testing.T) {
Expand Down
Loading
Loading