Skip to content

Commit

Permalink
Merge pull request #100 from block-bites/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
CommonDrum authored Apr 18, 2024
2 parents e1e3374 + 68ae5b4 commit 842f365
Show file tree
Hide file tree
Showing 72 changed files with 37,547 additions and 37,321 deletions.
42 changes: 34 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,45 @@

# Change Log

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).


## Unreleased

### Added

#### Frontend

- [Added support for smaller screens](https://github.com/block-bites/fondant-app/pull/91)
- [Added modal (popup) window for networks reset confirmation](https://github.com/block-bites/fondant-app/pull/77)
- [Added preloaders for all pages, visual bugs fixed](https://github.com/block-bites/fondant-app/pull/80)
- [Added loader to topbar start/pasue buttons](https://github.com/block-bites/fondant-app/issues/81)
- Prepared frontend to handle CCTL

#### Backend

- Exchanged NCTL container to in-house created CCTL container
- Discarded Lean API. Now the API uses rust rocket framework.
- Merged API and CCTL containers.
- Run endpoint that is compatible with all CCTL commands.

### Fixed

#### Frontend

- [Deploy, Event and Logs mapped elements are separated](https://github.com/block-bites/fondant-app/pull/78)
- [Navbar menu is working correctly](https://github.com/block-bites/fondant-app/pull/64)
- [Fixed access to all other subpages when network is not initialized](https://github.com/block-bites/fondant-app/issues/85)
- [Fixed Start/Pause buttons](https://github.com/block-bites/fondant-app/issues/82)
- Fixed pagination on all subpages

## [1.0.0] - 2024-01-15

### Added

#### Frontend

- Accounts page. Displays users private and public keys.
- Logs, Event and Deploy pages presenting with JSON info on each coressponding topic.
- Blocks page, displays basic information about block generated on the network.
Expand All @@ -20,8 +49,5 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
#### Backend

- Lean API that acts as a proxy for the original nctl container.
- [Documentation](https://github.com/block-bites/fondant-app/blob/master/OpenAPI.yml) for the Lean API.
- [Documentation](https://github.com/block-bites/fondant-app/blob/master/OpenAPI.yml) for the Lean API.
- Flask API deployed on the nctl container to ease up interaction between Lean API and nctl.



235 changes: 0 additions & 235 deletions OpenAPI.yml

This file was deleted.

34 changes: 9 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,16 @@
# Fondant: A Blockchain Application Suite
## Current Status

Welcome to the Fondant app, version 1.0! This guide will walk you through setting up both the frontend and backend components. Get ready to explore and test the capabilities of this blockchain application.
Welcome to Fondant version 1.1! Fondant is a suite of tools the purpose of which is to help you develop and test your applications on the Casper blokchain. We provide all the functionality of CCTL packaged in a slick UI. The app runs on docker containers so you don't have to wander about cross-compatibility or demanding compilations.

## Prerequisites:
To get started install **docker** and run
```curl -sL https://raw.githubusercontent.com/block-bites/fondant-app/master/setup/docker-compose.yml | docker-compose -f - up```

You will need **docker** installed and running on your machine for this application to work.


## Running the Application:

Paste this command into your terminal
```curl -sL https://raw.githubusercontent.com/block-bites/fondant-app/master/setup/docker-compose.yml | docker-compose -f - up```

In case of a docker-compose error try ```sudo docker-compose -f - up``` instead

Or:
### Want to add something to fondant?

1. **Clone the repo**.
2. **Script Selection:** Choose the appropriate script for your operating system (Windows or Linux) and execute it.
3. **Initialization** Feedback: Monitor the initial output from nctl (Note: This feedback mechanism will be updated in future releases).
4. **Launch:** Once the setup is complete, your Fondant app is ready for use!
You can clone this repository and build the docker-compose file that's inside root folder, or use one of our setup scripts.

## Frontend Features

Expand All @@ -30,21 +20,15 @@ Explore the user-friendly interface of Fondant's frontend:
- **Blocks Section:** View all blockchain blocks arranged in chronological order.
- **Deploys, Events, Logs:** Access detailed information about deploys, events, and logs for in-depth analysis.

If you don't want to use any tools but want to see how deploy data looks like you can use `http://localhost:3000/transfer` endpoint. It will transfer some funds from the faucet account and generate some traffic.

## Backend Capabilities

We've set up proxies for essential ports as backend endpoints. *Example: http://localhost:3001/net/1/rpc*. These endpoints allow direct connection to the respective node's RPC port.
We've set up proxies for essential ports as backend endpoints. *Example: http://localhost/node-1/rpc*. These endpoints allow direct connection to the respective node's RPC port.
Sample Commands:
- To check the status of node 1:
`casper-client get-node-status -n http://localhost:3001/net/1/rpc`
`casper-client get-node-status -n http://localhost/node-1/rpc`
- To retrieve the latest block info from node 2:
`casper-client get-block -n http://localhost:3001/net/2/rpc`
`casper-client get-block -n http://localhost/node-1/rpc`
- To get the current state root hash from node 3:
`casper-client get-state-root-hash -n http://localhost:3001/net/3/rpc` (applicable after the first block emission)
`casper-client get-state-root-hash -n http://localhost/node-1/rpc` (applicable after the first block emission)

Currently, nodes 1 to 5 are supported, with plans to make this configurable in future updates.

### Endpoint Documentation:

For comprehensive information on all available endpoints, refer to the OpenAPI.yml file included in the package
36 changes: 36 additions & 0 deletions cctl-container/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
FROM --platform=linux/amd64 rust:buster as builder

WORKDIR /usr/src/myapp

COPY api/Cargo.toml ./
COPY api/Rocket.toml ./

RUN mkdir src && \
echo "fn main() {}" > src/main.rs && \
cargo build --release && \
rm -rf src

COPY api/src ./src

RUN cargo build --release

FROM commondrum/cctl-fondant:latest

USER root

RUN apt-get update && \
apt-get install -y nginx && \
rm -rf /var/lib/apt/lists/*

WORKDIR /usr/local/bin

COPY --from=builder /usr/src/myapp/target/release/api ./
COPY api/src/commands.json ./

RUN chmod -R +x /home/cctl

ENTRYPOINT ["/usr/local/bin/api"]

EXPOSE 3001 80

CMD ["tail", "-f", "/dev/null"]
Loading

0 comments on commit 842f365

Please sign in to comment.