Celestia-Blockspacerace - pfb-ui

Description

Create a UI for allowing users to submit PayForBlob Transactions. You can check out the Node tutorial here. It shows you how you can call the API in order to submit a PFB transaction, and how to retrieve the data by block height and namespace.

Create a UI for allowing users to submit PayForBlob Transactions.

To perform the PayForBlob transaction, I prepared something like this. Let's see together.

For deploy the light-node automatically

wget -O auto-install-light-node.sh https://raw.githubusercontent.com/owlstake/celestia-race/main/deploy-light-node/auto-install-light-node.sh && chmod +x auto-install-light-node.sh && ./auto-install-light-node.sh

How to work ?

1-First of all, we go into the server where we set up the Celestia light node and stop the node.

systemctl disable celestia-lightd
systemctl stop celestia-lightd

2- Create service

sudo tee <<EOF >/dev/null /etc/systemd/system/celestia-lightd.service
[Unit]
Description=celestia-lightd Light Node
After=network-online.target

[Service]
User=$USER
ExecStart=/usr/local/bin/celestia light start --core.ip https://api-blockspacerace.pops.one/ --core.rpc.port 26657 --core.grpc.port 9090 --keyring.accname my_celes_key --metrics.tls=false --metrics --metrics.endpoint otel.celestia.tools:4318 --gateway --gateway.addr 0.0.0.0 --gateway.port 26659 --p2p.network blockspacerace
Restart=on-failure
RestartSec=3
LimitNOFILE=4096

[Install]
WantedBy=multi-user.target
EOF

3-Start node

systemctl enable celestia-lightd
systemctl start celestia-lightd

4-Check logs

journalctl -u celestia-lightd.service -f

5-Install Python and Flask

sudo apt install python3
pip install flask

6-Create directories

mkdir pfb 
cd pfb 
mkdir templates 
cd 
mv app.py pfb/ 
mv index.html pfb/templates/
mv result.html pfb/templates/

NOTE:File contents are shared in repo as open source.Please check.

7-To start

cd pfb
python3 app.py

Start and use . As a result it will give you a demo website. Everything is ready !

Don't forget to open the port! :26659

Web demo

Enter the server ip



Port :26659

And it should output this .