Phantasma Blocks is a A dynamic transactional engine optimized for consistent, high-frequency operations. Designed to process 10 transactions per minute, Phantasma-Blocks offers a seamless blend of speed and reliability, ensuring that every transaction, like a phantom, moves swiftly and effortlessly through the digital realm.
Before you begin, ensure you have met the following requirements:
- [Software or tool name] - [Version] (e.g., Node.js v14+)
-
Clone the Repository:
git clone https://github.com/phantasma-io/Phantasma-Blocks.git cd Phantasma-Blocks
-
Install Dependencies:
npm install
-
Configuration:
- Rename
.env.mainnet
to.env
(if applicable) - Edit
.env
to include your settings and save the file.
- Rename
-
Build the Project (if applicable):
npm run build
-
Start the application:
npm start
To configure the Run Blockz
service to work with your setup, you will need to modify the ExecStart
path in the existing service file. This ensures that the service correctly points to the autostart.sh
script in your repository. Follow these steps:
-
Locate the Service File: Find the
runblockz.service
file. This is typically located in the/etc/systemd/system/
directory. -
Edit the Service File: Open the
runblockz.service
file in a text editor with administrative privileges. You can use editors likenano
orvim
. For instance:sudo nano /etc/systemd/system/runblockz.service
-
Modify the ExecStart Path: In the service file, locate the
ExecStart
line. Change the path to point to yourautostart.sh
script within the cloned repository. For example:ExecStart=sh /path/to/your/repo/autostart.sh
Replace
/path/to/your/repo/
with the actual path where your repository is located. -
Save the Changes: After making the changes, save the file and exit the editor. For
nano
, you can do this by pressingCTRL+X
, thenY
to confirm, andEnter
to save. -
Reload Systemd: To apply the changes, reload the systemd configuration:
sudo systemctl daemon-reload
-
Restart the Service: Restart the
Run Blockz
service to apply the new configuration:sudo systemctl restart runblockz.service
-
Verify the Service: Ensure that the service is running with the new settings:
sudo systemctl status runblockz.service
-
Check Logs for Debugging: If needed, you can check the service logs for any issues:
journalctl -u runblockz.service
By following these steps, you will have successfully configured the Run Blockz
service to use the autostart.sh
script from your repository. This ensures that the service will behave as expected with your setup.
If you're using npm
or bun
in your Run Blockz
service, it's important to ensure that the autostart.sh
script points to the correct executable paths. This involves updating the PATH
variable within the script to include the directories where npm
or bun
are located. Here's how to do it:
-
Locate the Autostart Script: Find the
autostart.sh
script within your cloned repository. -
Edit the Autostart Script: Open
autostart.sh
in a text editor. You might need administrative rights to modify this file. -
Update the PATH Variable: Look for a commented
PATH
variable line in the script:#PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
Uncomment and modify this line to include the paths to
npm
orbun
. For instance, ifnpm
is located in/usr/local/bin/npm
andbun
in/usr/local/bin/bun
, ensure these paths are included:PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
If you're unsure of where
npm
orbun
are installed, you can usewhich npm
orwhich bun
in your terminal to find out. -
Save and Close the File: After adjusting the
PATH
, save your changes and close the editor. -
Make the Script Executable: Confirm that the
autostart.sh
script is executable:chmod +x /path/to/your/repo/autostart.sh
-
Restart the Service: Apply the changes by restarting the
Run Blockz
service:sudo systemctl restart runblockz.service
-
Check the Service Status: Verify that the service is functioning correctly with the new script configuration:
sudo systemctl status runblockz.service
By customizing the PATH
in the autostart.sh
script, you ensure that the correct versions of npm
or bun
are used by the Run Blockz
service. This step is crucial for the proper operation of your application.
If you want to contribute to Phantasma Blocks, see the CONTRIBUTING.md for details.
This project is licensed under the [License Name] License - see the LICENSE.md file for details.
If you want to contact the maintainers, you can reach out at [info@phantasma.io].