2ndtlmining / fluxnode Goto Github PK
View Code? Open in Web Editor NEWFluxnode Website
Home Page: https://fluxnode.app.runonflux.io/
Fluxnode Website
Home Page: https://fluxnode.app.runonflux.io/
Problem Statement
Love to include the Flux block height within the home page:
Proposed Solution
Love to only how this on the home page as illustrated above. Getting this information we can hit this API:
https://api.runonflux.io/daemon/getinfo
looking for the value on "Blocks":
Icons
Thinking:
SiHiveBlockchain
from Si React set
Currently the Home page is straight into a search for the wallet with a lot of information on the screen. Like to split this into two distinct pages. Home Page and Wallet Page. The wallet page will only be triggered once the user has clicked the search. This will hopefully free up some space and have a better UI experience.
The idea is to keep this for now as the Wallet page, but create a new Home page that only displays key and is very clean. Idea is zero state for the user. Thus when they enter wallet in only display the wallet related information.
Like to display the following information on the Home page:
Decentralised Network
Not sure if we can do interactive pie chart of sort but data looking to show
_ Network Utilisation_
Love to show the data in % based on what we already have today in the current home page:
_ Application Deployment_
Like to highlight some of the applications that is deployed on the Flux network. Again similar to Node counts like to do some sort of Pie chart or icons if possible with the logos if we can some how, but the thinking is:
Map
Not exactly sure where we place the map, but my thinking was just below the main stats just to show the amount of nodes around the world. Thus what i am looking for is just a number within a country. For example if the US has 3000 nodes just like to show the number, and if possible gradient of colour. Thus darker is more and lighter is less. This data should be obtainable from the API information. Couple ideas on map:
Most of the information above we already have as part of the site, but just displaying it in a different place such as the Utilisation ect. There are couple new pieces of information we dont have yet:
Node Operators:
In this example we are looking for the unique count of wallet addresses attached to nodes.
API: https://stats.runonflux.io/fluxinfo?projection=flux,node
Need to count the unique count of: "payment_address"
Application Deployments:
This can be achieved by searching for the app deployments based on docker repo for that:
We will need to maintain in the Variable file the Docker repo searches to be used in case it changes in the future.
The above will count instances. Suspect for something like wordpress where there is master slave relationship and streamer might need to want to count it differently. The above will count repos with instances. But what we can also do is this:
API:https://api.runonflux.io/apps/globalappsspecifications
Sample count code:
This sample code will count how many Wordpress websites hosted. Think we dont need to count individual instances of repo. Might need to do same for Presearch
Spotted another API: https://jetpackbridge.runonflux.io/api/v1/wordpress.php?action=COUNT
Think its not private but hopefully we can use it.
Country Count (Map):
Suspect in order to display values on the Map idea we would need values per country. Not sure what information we can put on a map yet, but below is some ideas, depending on how gradular we can get and what makes sense UI wise:
API: https://stats.runonflux.io/fluxinfo?projection=flux,geolocation
Details are available for example:
continentCode":"EU","country":"Germany","countryCode":"DE","region":"RP","regionName":"Rheinland-Pfalz","lat":50.7159,"lon":7.9805
Sample code for unique addresses:
fetch('https://api.runonflux.io/daemon/viewdeterministiczelnodelist')
.then(response => response.json())
.then(data => {
const uniquePaymentAddresses = new Set();
data.data.forEach(item => {
uniquePaymentAddresses.add(item.payment_address);
});
console.log(Array.from(uniquePaymentAddresses));
})
.catch(error => console.error(error));
question .. is there any way to pass the optoins to your app from the URL.. Something like:
https://fluxnode.app.runonflux.io/#/nodes?font=small
This is where cookies are not saved
Users like to perform their own speedtest. Like to add it to the guide section
Add another step into the guide section that states this at number 26:
sudo apt-get install curl
curl -s https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.deb.sh | sudo bash
sudo apt-get install speedtest
speedtest
Use a logging driver that supports encryption: Docker provides several logging drivers that support encryption, such as GELF, Fluentd, and Syslog.
Configure the logging driver to use encryption: Set the logging driver options to enable encryption. For example, when using the GELF logging driver, you can set the gelf-tls option to true to enable TLS encryption.
Store logs in a secure location: Store the encrypted logs in a secure location that is only accessible to authorized users. This can be a cloud storage service such as AWS S3 or a private server. - Dont think we need to do this. There might be a flux drive option, but not really needed, i havent looked at the logs at all. I can download them if needed. Would there be an option for me to download them and unencrypt?
Rotate encryption keys regularly: Rotate the encryption keys used to encrypt the logs regularly to ensure that they remain secure.
Could it be possible to implement it in such a way that the encryption can be toggled on and off in the code if required. Thus if we really want to have a look at the log files we need to spin up a docker container with the encryption turned off. In such a way no one really can see log file unless its a dev looking to troubleshoot. Idea here is dont really want to have access. Would love the flag in the .env.production and .env.development files as a flag.
Today we make use of the Uptime API to retrieve the data. For example:
That retrieves the Flux OS uptime here:
Now this data displayed above is purely the Flux OS uptime. And what happens pretty frequently updates on Flux OS is pushed out and when Flux oS is updated this uptime gets reset. Eventhough the FLlux OS updates the uptime resets, which is not really a true reflection on the uptime of the node just by an Flux OS update. Like to update this to be a more true reflection of the actual node uptime and not the Flux OS uptime.
Like to make a couple changes:
Calculation changes
Like to fundamentally change the calcs to make use of the "Active since" field. Calculation needs to be (Time now) - (Active Since). Just need to make sure the data is converted correctly. Timestamp from API looks to be Unix. Thus need to apply the Js for it:
API change
Current pickup is:
http://<IP>:<Port>/flux/uptime
For example:
Ideal:
https://api.runonflux.io/daemon/viewdeterministiczelnodelist?filter=<Wallet>'
example:
The above mentioned API is already used in the apidata.js file so should be able to use it and simplify the APIs at least.
Tool-tip changes
Current tool tip relates to Flux OS data we are extracting today:
As is: "Uptime is the amount of time Flux OS has been up. If Flux OS updates or restarts will reset the timer"
New: " Uptime is the amount of time since the Node has been started in Zelcore. If node is Offline or DOS in Zelcore the time will reset"
Currently we making use :
https://api.runonflux.io/flux/version
https://raw.githubusercontent.com/RunOnFlux/flux/master/package.json
Some users as requested in the past to have a auto refresh timer on the website.
A usecase is to have a seperate monitor with the Fluxnode view site open and as such refreshing it manually.
Proposed solution:
Some websites have a little clock that you can play with some options. Looking at it, default for a 1st time user would need to be off.
Problem Statement
The current wallet search bar both the Home Page and the Node Page takes a lot of space and looks a bit funny. Love to make it a bit more modern and alligned with what we see on other platforms. The areas it is used:
Proposed Solution
Was thinking something more alligned with what we see on other popular platforms:
Thus in the bar say Wallet search
Fractus rewards has finally been announced and lined out in Medium article:
https://fluxofficial.medium.com/earn-more-with-fractus-cumulus-store-more-flux-earned-cbeac46bc9e7
Reading through the details couple things confirmed:
Front-end changes
The expectation is that there will not be fractus there as such we need to use another api and code as specified here:
Just getting a Promise issue, when doing into the website. I struggling to get the await and promise to work on the website as needed. Hopefully someone can help.
Estimated Earnings
Back-end changes
As Fractus really is part of Cumulus need to perform some updates in couple places but majority i expect:
Testing key points
Like to visually show Utilisation across the Flux network at the given point of time at a refresh. Similar to the data today that counts Total nodes, price, and the count per node tier. Similar today no history is needed and as much as possible trying to stay away from any DB's.
Looking to track 4 metrics
Looking to make it as visual and fun as possible sticking to the sites existing design. But besides just showing numbers like to make use of visual effects, idea so far is speedo dials or numbers within a circle. At this stage circle is what i had in mind. Colour full is ideal.
Happy to have a look to what makes most sense. Also one of the guys mentioned seeing we using React may be look at Framer for React
Total Resource
This should be fairly easy to calculate in two ways:
Either count the total nodes per tier, and then multiply with the Resource specifications per tier. Suspect this will be good from performance perspective.
Stats.runonflux.io: Should be able to count the specifications benchmarked as that will have the true resources. This might take a little longer to calculate but should be what we use. more discussed in API section.
Resource Utilisation
This should be easy with the Stats.runonflux.io and have a look at the locked resources. Example code in the API section.
API
If we have more efficient ways by all means but looking at what we already using today. Some ideas around calculating Resource utilisation:
https://stats.runonflux.io/fluxinfo/apps.resources
Couple things we need to be careful for:
Node Utilisation
This calculation we need to make use of our existing code to count the apps. But in this case we just need to make sure we can the 0 app nodes:
Also these nodes will return no locked resources like this:
Couple example of code to calculate the values we need.
Node Resource Utilisation
const api_url = 'https://stats.runonflux.io/fluxinfo/apps.resources'
async function getdata() {
const res = await fetch(api_url);
const json = await res.json();
var sumram = 0;
json.data.map((index)=> { sumram = sumram + (index?.apps?.resources?.appsRamLocked)});
console.log(sumram/1000000,"Tb");
}
getdata();
Total Resources
Using the same API, but focusing on Ram. In this case the API returns ram in GB and not MB above:
const api_url = 'https://stats.runonflux.io/fluxinfo/benchmark'
async function getdata() {
const res = await fetch(api_url);
const json = await res.json();
var sumram = 0;
json.data.map((index)=> { sumram = sumram + (index?.benchmark?.bench?.ram)});
console.log(sumram/1000,"Tb");
}
getdata();
Node Utilization
To calculate this we can use existing data. Today in the main screen we count total nodes, thus we have the base value to devide to calculate % utilisation, thus calculation will be: Node Utilisation = Utilised nodes/Total nodes
To calculate Utilised nodes:
const api_url = 'https://stats.runonflux.io/fluxinfo/apps.resources'
async function getdata() {
const res = await fetch(api_url);
const json = await res.json();
const sumemptynodes = json.data.filter((data) => data.apps.resources.appsRamLocked == 0).length;
console.log(sumemptynodes);
}
getdata();
Today we display the amount of apps in the Node Overview section per node:
But user need to click on the button to actually find out which Apps that actually is. We do show the most apps and then a tooltip here:
Could we show a similar tooltip that is on the "Most Hosted Node" but within the Node Overview?
More details
https://docs.fusion.runonflux.io/#tag/Swap
https://docs.fusion.runonflux.io/#tag/Coinbase/operation/coinbaseclaim
https://github.com/ZelCore-io/Zelcore
https://academy.binance.com/en/articles/what-are-liquidity-pools-in-defi
https://www.investopedia.com/what-are-cross-chain-bridges-6750848
Details to be added.
below resources:
https://titan.runonflux.io/config will give the lockups and their fees which are needed for the calculations.
https://titan.runonflux.io/nodes will fetch a list of Titan nodes
https://titan.runonflux.io/stats will get the total Flux staked.
Tested the above API's no real data that can be useful to display. Search continues to find something different
Noticed behaviour if the Utilization or the benchmark API results doesnt come back for some reason. That totally stops the wallet search functionality. Looks something like
Looking at the docker log file, while doing this not going out at all or at least not starting anything.
Tested also once the Stats API had all the data (i got lucky ;) ) but doesnt fetch the wallet info at all:
At the start of the website we focused on features and getting it up and running and as Docker is fairly secure we didnt really build extra features ontop to secure it even more. In this enhancement like to see if we can improve the security elements of the app.
Looking to see if we can update the following
Any other suggestions welcome here or best practises like to apply.
Flux Block rewards are expected to half around the 8 Feb 2023. Need to make sure that the website take the new block reward structure into account for all calculations regarding node rewards APR ect.
Expectation is to update the app-content.js file that contains the constant data:
Ensure testing is done before 8 Feb but dont go live before the halving
Some users having issues with their Flux daemon not being updated.
Add the flux daemon to Overview screen.
Focus thus far has been desktop usage, however looking at the analytics mobile and tablet usage is +-40%
Love the recent Node Overview changes allowing you to move columns around and do filtering. Could we continue on that with the following:
1. Button Customisation
Ability to customise bottom window or size of the data grid (YouTube alike).
2. Clean up the Wallet overview class file
**3. Sorting Continued **
The ability to extend the sorting functionality to the IP, Flux OS and Benchmark please:
4. Column moves remembered after refresh
Fantastic that we can now move the columns around allowing the user the swap the data around to his/her heart content, but could we save changes made to cookies, as when they hit the wallet refresh it all defaults back to what it was. If its not possible not a train smash.
5. Column width
Feels all columns are a bit bigger now with even the small ones taking up a little more space. Not sure if its possible to size the column based on the space taken up by any chance.
6. Filter padding
Any chance we can move the up and down arrow slightly further to allow more padding between them.
7. Filter Next and Last Reword
Filtering on the Next and Last reword is not quite working right:
8. Demo mode dark mode bug
Currently if you use Darkmode and going demo it comes in white:
To date there are 7 Flux Parallel assets, which is basically Tokens of Flux on other Smart Contract Crypto currency such as Ethereum, Binance smart chain, Kadena, Tron, Solana, Avalanche and Ergo. There are various different DEFI protocols that can be used with these various different Flux-PA's. In this new feature i would like to start looking at providing visibility of these DEFI protocols. Starting with Ergo.
Ergo Example:
The above is if you would like to swap. But also want to show this type of informaiton:
Managed to reach out to Gazza on the Ergo discord and he provided the following:
Some users move columns around by mistake causing them a little heart ache.
This can be reset today by clearing your cache, however users not really fond of that idea.
Reset to default button to reset the layout back to normal:
Hey Team
Looks like the Donation bug is back :)
Had a quick look on couple donations addesses:
(https://explorer.flux.zelcore.io/tx/9a4a4a74cdd2c608b90ad40b595566b18d78b9f13f3f4f9716524eeaa93eeb6b)
and
(https://explorer.flux.zelcore.io/tx/0614bbeb5cf8f48699332fe27b069b2d5689972eccc5a93f7f915c67268aac2a)
The donation item does not popup:
Looking a the previous issue that change still there:
Not sure if the front end is just not calling for it
Problem Statement
Flux team is now performing Enterprise scores next to nodes. Like to provide node operators this information so they can see what their score per node is and then total score.
Requirements
API
The API that contains information is here: https://api.runonflux.io/apps/enterprisenodes
Calculations
Tooltip Calculation: There is only 1 calculation and that will be for the tooltip on the wallet. What we are looking for is a sum of all the "Score" against that wallet. Thus sum Score against the searched wallet in the API.
Node Overview: UPNP nodes will not be listed in the API, thus if there is a search for them they will not be found in the API, thus need to put a 0 against them. So to make it simple if the node is not found in the API response just put 0.
UI
Tooltip that shows the sum that is mentioned above in calculations:
Score added to Node Overview: Score tab should be added to Node overview screen showing the number received from API
Score Tooltip: We should display a Tooltip for the new column Score in the Node overview: Can put this as tooltip:
"Enterprise score is an aggregated score taking maturity, node tier, identity and collateral into account". UPNP nodes are not considered thus have 0."
Testing
Currently making use of prejections.
This can be shortened with /xxxxx.xxxx
Please add EUR for estimated earnings, flux value and wallet.
Problem Statement
New addition of the Home page brought about some duplication of code that is not needed. The code between Home and Main folders are duplicated.
Simplifications needed
Example not sure if Best Uptime is used in home page, or Payout timer, Wallet nodes, Most hosted, Parallel Assets or Payout timer is used. Try to only keep whats needed in the home page making it easier to read and maintain.
Can see code related to wallets in home page section, dollar signs that is commented ect. Thus a lot of things copied but never used thus creating a little bit of clutter.
Like to continue to gameify the website and allow people to brag about their nodes and the performance of their nodes. As such like to introduce Achievements & Medal metrics similar to what you would find on various other platforms. Even Github :
Like to introduce couple categories:
As mentioned within the above categories thinking have specific Medals and Achievement badges. But ontop of that need to try and configure the code in such a way that where we have values searching it can be easy to modify it in the future. Idea is have some of the variables either in its own file similar to app-content.js. Jump into calculations and functionality
Wallet
Idea here is that we just use some of Achievement badge to indicate wallet size but dollar based:
This can be calculated based on the Wallet amount once we hit the explorer API.
Performance
The idea here is to award medals Gold, Silver and Brownze within each Node Tier or category, thus Gold Medal in Cumulus but also a Gold Medal in Nimbus and subsequently Stratus. Gold -> Brownze is based on 1st -> 3rd, but based on category, the below are the categories:
Bonus Rewards
Currently there are some bonus rewards that are paid out to Node operators that are lucky enough to host some applications on their nodes. Its completely random if you host an app as such like to highlight it if they are currently hosting this app. This will be purely based on the name of the app running on the wallet. Also like to code it in such a way that it could be easy to add more in the future as more is planned. From a icon perspective i was thinking to just list the actual Crypto curency logo. Today there is only 2:
In terms of logo we can just pickup the Kadena logo we are using already for the Parallel asset section.
There is a couple containers so any one of the MOKX-MOKY whatever there are.
In terms of logos: Miner of Kadena website think logo wise
Crypto
There are various crypto projects that can be hosted on the Flux network to support them, so wanted to show at least some logos of the Crypto projects that wallet/Node provider might be supporting with a number next to it like X2 if they support more than 1 app within a category. Thus for example one where we will for sure see more is Presearch. Tons of Presearch apps on the Flux network. But below is the Crytpo project at least would like to highlight. Again we will need to grep (sorry bash speak) the description of the app on the node provider. But below:
logo: https://cryptologos.cc/logos/presearch-pre-logo.png?v=024
https://cryptologos.cc/logos/ravencoin-rvn-logo.png?v=024
https://cryptologos.cc/logos/polkadot-new-dot-logo.png?v=024
https://cryptologos.cc/logos/dogecoin-doge-logo.png?v=024
Games
There are various games that can also be hosted on Flux and like to highlight or at least show their logos:
https://valheim.fandom.com/wiki/Valheim
Special
Expecting to see quite a number of new items being coming to the Flux network, but the big item i would like to highlight is Wordpress. Could we list Wordpress if we find it on a node please:
Hopefully the above makes sense. But generally like to search the apps hosted by wallet, if there are any of these unique names like to show an Achievement of some sort depending what they have.
Not really sure where is the best to place the medals, and how big will make sense on most platforms (Desktop and Mobile). Need a little guidance here.
https://stats.runonflux.io/fluxinfo?projection=benchmark
Some of the community had some ideas around the Node Overview section:
Couple features to look to add:
+ Ability to sort columns: This will allow them to sort on for example benchmarks or versions to quickly find problematic nodes
+ Ability to customise bottom window: The box has a predefined hight as such there is a lot of scrolling required for people that have a lot of nodes. As such look at either customizing the size by dragging it longer or potentially auto sizing depending on the amount of nodes.
+ Ability to move columns around: This will be nice to have but theability to re-arrange columns around
Key considerations to consider:
This is basically a building ontop of the Flux Network Utilisation. As the Network utilization provides you an overview of the whole network, the intent of this feature is to provide the person a view of his individual nodes. Thus his own node utilisation.
Ideally like to track a summary view and an individual node details.
Summary view
Like to track:
Individual node view
The above mentioned is totalled across all the nodes. Next love to see individual nodes also with the same data minus the Total node utilisation:
I am open for suggestion on what is possible and what will look best in this department. But what i had in mind is 2 separate section.
The Summary View
Placement:
Idea 1: In Notable node section:
Idea 2: Node Overview section
Idea 3: New Node Utilisation section: Discussed below but for individual nodes we need a section:
Regarding actual design, like to keep it consistent with what we do with Network Utilization thus if its % spinners like to keep it like that if we can. But got ideas down at the bottom for inspiration.
The Individual Node View
As mentioned in idea 3 above think we will need a separate tab. But within the tab not sure what is the best way to show it but we need to show 3 metrics as %. vCPU, Ram and SSD, what i had in mid potentially is the lenght but split into 3 something like this:
So something like that, that shows total but then what is used. Not sure what would make sense in the screen and how best to fit, but what i was thinking 3 details column with the actual bar within the column going left to right 0% -> 100%. The IP of the node needs to be on the left. Might need to have an indicator or logo that specifies the tier node if we can fit it. But the idea is we can then filter per column to see the highest CPU % usage for example.
This is where we will need to have a look at what we can re-use in code. Especially the Individual Node view as i suspect the API to get this information will be low.
https://stats.runonflux.io/fluxinfo
https://stats.runonflux.io/fluxinfo/benchmark,paymentAddress,apps
The above will give you what you need.
this lines.
One of the community members designed this amazing design:
love to see if we could potentially get this cool one day :)
We ran into an issue with the website completely not launching when we received a NULL value for one of the fees:
https://fusion.runonflux.io/fees
Resulting in website breaking a bit:
Although we should not be receiving NULL value, we should still render the site with no value in if we can.
It was 9250 but was later reduced to 9000
Nodes Overview grid is fantastic allowing users to customize their view and saving that data into cookies.
Noticed that if you made changes by mistake you need to remove cookies to get the default settings back. Could we have a button that resets defaults?
Proposed button that puts the default layout back.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.