Giter Club home page Giter Club logo

livepeerevents's People

Contributors

stronk-dev avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

livepeerevents's Issues

Fix unstake events

https://nframe.nl/livepeer?orchAddr=0x08f10D03A0CF7a9eADdc7EacD4cf135a07A0feff

has a 10K unstake from https://explorer.livepeer.org/accounts/0x5ec2be1adc70bc338471277c2dcc183b0b2c91be/delegating

{
"address":"0x35Bcf3c30594191d53231E4FF333E8A770453e40",
"transactionHash":"0x8bec6edb47f5085c61abf28e0ff9a70280929fc7d9cc95b615df485881361d8d",
"transactionUrl":"https://arbiscan.io/tx/0x8bec6edb47f5085c61abf28e0ff9a70280929fc7d9cc95b615df485881361d8d",
"name":"Unbond",
"data":{
"0":"0x08f10D03A0CF7a9eADdc7EacD4cf135a07A0feff",
"1":"0x5Ec2be1aDC70Bc338471277c2dCc183b0b2C91be",
"2":"1",
"3":"10000000000000000000000",
"4":"2491",
"delegate":"0x08f10D03A0CF7a9eADdc7EacD4cf135a07A0feff",
"delegator":"0x5Ec2be1aDC70Bc338471277c2dCc183b0b2C91be",
"unbondingLockId":"1",
"amount":"10000000000000000000000",
"withdrawRound":"2491"
}
},
{
"address":"0x35Bcf3c30594191d53231E4FF333E8A770453e40",
"transactionHash":"0x8bec6edb47f5085c61abf28e0ff9a70280929fc7d9cc95b615df485881361d8d",
"transactionUrl":"https://arbiscan.io/tx/0x8bec6edb47f5085c61abf28e0ff9a70280929fc7d9cc95b615df485881361d8d",
"name":"EarningsClaimed",
"data":{
"0":"0x08f10D03A0CF7a9eADdc7EacD4cf135a07A0feff",
"1":"0x5Ec2be1aDC70Bc338471277c2dCc183b0b2C91be",
"2":"118964187072793932562",
"3":"0",
"4":"2481",
"5":"2484",
"delegate":"0x08f10D03A0CF7a9eADdc7EacD4cf135a07A0feff",
"delegator":"0x5Ec2be1aDC70Bc338471277c2dCc183b0b2C91be",
"rewards":"118964187072793932562",
"fees":"0",
"startRound":"2481",
"endRound":"2484"
}
},

Fix Mobile scaling

livepeer.js header, as well as the event viewer and buttons do not scale for mobile devices yet

Show Orchestrator info when clicking on a delegator

Right now if you click on a delegator in the eventViewer, it clears your current selected orchestrator info

On clicking an address in the event viewer, set a loading screen in the orchestrator viewer, if getOrchestrator returns an empty list, getOrchestratorByDelegator (separate issue) and remove the loading screen once we have an orchestrator. If we do not have an O at this point, show an error

In src/livepeer.js render the OrchestratorViewer if we have a loaded Orchestrator object, else the text

Add a simple mode for the backend

Leave out all of the event stuff, only use the backend as a caching mechanism for the CMC, L1, L2 and thegraph stuff. Only stuff we want to leave in are the JSON outputs and the prometheus integration

Fix Bond eventButton

Doesn't display the right information right now. Should parse nested obj.subEvents in order to display better info

Add DB Fullsync optie

Manier om de Event DB helemaal opnieuw te syncen, alle events uitlezen

Bij booten doen we fullsync totdat alle blokken behandeld zijn
Dus een teller voor block verwerkt, een lege collectie, en dan alle events niet cachen, alleen aanmaken in de DB
Tijdens de fullsync, geen contract listener aanhebben
Als afgerond, gehele lijst ophalen en in de cache stoppen. De timeout op 1x per uur zetten ofzo
Contract listener vervangen door een timed event die blocks in de gaten houdt

Replace imported draggable scroller package

Currrent scroller is very simple.
Try something which handles large list sizes better, since dragging when there are many elements becomes very slow
Would be nice if you can scroll like on mobile, where it slowy comes to a stop when releasing the drag button

Rework loading screen

We will be increasing the amount of processing done in the loading screen

Also show a progress indicator or an error thingy if there is no backend connection

Split transaction into multiple sub-transactions

Right now in a transaction events like moving stake take priority over claiming eanings. During some rebond events claiming and moving stake happens in 1 transaction. We should split a transaction into possible subtransactions, or just leave out earnings all together

[
{
"address": "0x35Bcf3c30594191d53231E4FF333E8A770453e40",
"transactionHash": "0x23b41d7f7fd388766484d7288ec164171a185e15d09a694270c091164ecdbafe",
"transactionUrl": "https://arbiscan.io/tx/0x23b41d7f7fd388766484d7288ec164171a185e15d09a694270c091164ecdbafe",
"name": "WithdrawFees",
"data": {
"0": "0xDFc452Da1fA53f5DCD1EBc63A3E5f6C5F9139F76",
"1": "0x2cC53Ae643038a51C0F10964efEdb04285607771",
"2": "6915574260931571",
"delegator": "0xDFc452Da1fA53f5DCD1EBc63A3E5f6C5F9139F76",
"recipient": "0x2cC53Ae643038a51C0F10964efEdb04285607771",
"amount": "6915574260931571"
}
},
{
"address": "0x35Bcf3c30594191d53231E4FF333E8A770453e40",
"transactionHash": "0x23b41d7f7fd388766484d7288ec164171a185e15d09a694270c091164ecdbafe",
"transactionUrl": "https://arbiscan.io/tx/0x23b41d7f7fd388766484d7288ec164171a185e15d09a694270c091164ecdbafe",
"name": "Rebond",
"data": {
"0": "0x525419FF5707190389bfb5C87c375D710F5fCb0E",
"1": "0x2cC53Ae643038a51C0F10964efEdb04285607771",
"2": "0",
"3": "13175701400114191076727",
"delegate": "0x525419FF5707190389bfb5C87c375D710F5fCb0E",
"delegator": "0x2cC53Ae643038a51C0F10964efEdb04285607771",
"unbondingLockId": "0",
"amount": "13175701400114191076727"
}
},
{
"address": "0x35Bcf3c30594191d53231E4FF333E8A770453e40",
"transactionHash": "0x23b41d7f7fd388766484d7288ec164171a185e15d09a694270c091164ecdbafe",
"transactionUrl": "https://arbiscan.io/tx/0x23b41d7f7fd388766484d7288ec164171a185e15d09a694270c091164ecdbafe",
"name": "EarningsClaimed",
"data": {
"0": "0x0000000000000000000000000000000000000000",
"1": "0x2cC53Ae643038a51C0F10964efEdb04285607771",
"2": "0",
"3": "0",
"4": "1",
"5": "2483",
"delegate": "0x0000000000000000000000000000000000000000",
"delegator": "0x2cC53Ae643038a51C0F10964efEdb04285607771",
"rewards": "0",
"fees": "0",
"startRound": "1",
"endRound": "2483"
}
},
{
"address": "0x35Bcf3c30594191d53231E4FF333E8A770453e40",
"transactionHash": "0x23b41d7f7fd388766484d7288ec164171a185e15d09a694270c091164ecdbafe",
"transactionUrl": "https://arbiscan.io/tx/0x23b41d7f7fd388766484d7288ec164171a185e15d09a694270c091164ecdbafe",
"name": "TransferBond",
"data": {
"0": "0xDFc452Da1fA53f5DCD1EBc63A3E5f6C5F9139F76",
"1": "0x2cC53Ae643038a51C0F10964efEdb04285607771",
"2": "161",
"3": "0",
"4": "13175701400114191076727",
"oldDelegator": "0xDFc452Da1fA53f5DCD1EBc63A3E5f6C5F9139F76",
"newDelegator": "0x2cC53Ae643038a51C0F10964efEdb04285607771",
"oldUnbondingLockId": "161",
"newUnbondingLockId": "0",
"amount": "13175701400114191076727"
}
},
{
"address": "0x35Bcf3c30594191d53231E4FF333E8A770453e40",
"transactionHash": "0x23b41d7f7fd388766484d7288ec164171a185e15d09a694270c091164ecdbafe",
"transactionUrl": "https://arbiscan.io/tx/0x23b41d7f7fd388766484d7288ec164171a185e15d09a694270c091164ecdbafe",
"name": "Unbond",
"data": {
"0": "0x525419FF5707190389bfb5C87c375D710F5fCb0E",
"1": "0xDFc452Da1fA53f5DCD1EBc63A3E5f6C5F9139F76",
"2": "161",
"3": "13175701400114191076727",
"4": "2490",
"delegate": "0x525419FF5707190389bfb5C87c375D710F5fCb0E",
"delegator": "0xDFc452Da1fA53f5DCD1EBc63A3E5f6C5F9139F76",
"unbondingLockId": "161",
"amount": "13175701400114191076727",
"withdrawRound": "2490"
}
}
]

Add timestamp to events

Display datetime in locale format

Would require some major modifications, since the backend does not even attach a date. Maybe just add the time an event was inserted into the database?

Rework filterbuttons

Normal: inset effect
When active: hide that type of event and grey out the color

New Readme

Should contain more info on what the program does, requirements, how to install, how to update, other useful commands

Add support for Livepeer Subgraph

https://thegraph.com/hosted-service/subgraph/livepeer/livepeer

We can then create an endpoint in the API to get all details on a given Orchestrator:
{
transcoders(where: {id: "0x847791cbf03be716a7fe9dc8c9affe17bd49ae5e"}) {
activationRound
deactivationRound
active
lastRewardRound {
id
length
startBlock
endBlock
mintableTokens
volumeETH
volumeUSD
totalActiveStake
totalSupply
participationRate
movedStake
newStake
}
rewardCut
feeShare
pricePerSegment
pendingPricePerSegment
pendingFeeShare
pendingRewardCut
totalStake
totalVolumeETH
totalVolumeUSD
serviceURI
delegators {
id
bondedAmount
startRound
}
delegator {
id
bondedAmount
startRound
}
}
}

Add filter buttons

Pass a name to the eventViewer in order to filter out specific transactions

Add buttons to livepeer.js in order to set this to ALL, TranscoderActivated, TranscoderUpdate, Reward, WithdrawStake

TBD event types, which we might throw away or not:
EarningsClaimed
Unbond
TransferBond
Bond
Rebond

Do something with the filtered out events

At least check if we are not missing any events like stake moving around

Events we are skipping:
// Filter
if (eventObj.name === "WithdrawFees" || eventObj.name === "TransferBond"
|| eventObj.name === "Rebond" || eventObj.name === "Unbond" || eventObj.name === "EarningsClaimed") {
return;
}

Create new layout for /livepeer page

Maybe make the topbar a side bar? find a way to make the feed taller at least
Would also make scaling for mobile easier if all components are less wide

Think making events 3 lines tall and very narrow?

Convert components into more subcomponents

All components are currently just in the root directory
A lot of components also have conditional subcomponents which should be split off into separate components
Todo: organize the components and split off large components into multiple subcomponents

Limit of 100 delegators in the Orchestrator Viewers

https://api.thegraph.com/subgraphs/name/livepeer/arbitrum-one/graphql
Due to a limitation in gql queries, it is only getting max 100 delegators. Something like this does not work:
{
transcoders(limit: 2,
where: {id: "0x525419ff5707190389bfb5c87c375d710f5fcb0e"}) {
activationRound
deactivationRound
active
lastRewardRound {
id
length
startBlock
endBlock
mintableTokens
volumeETH
volumeUSD
totalActiveStake
totalSupply
participationRate
movedStake
newStake
}
rewardCut
feeShare
pendingFeeShare
pendingRewardCut
totalStake
totalVolumeETH
totalVolumeUSD
serviceURI
delegators {
id
bondedAmount
startRound
}
delegator {
id
bondedAmount
startRound
}
}
}

Maybe we have to try a different query, or see if this is a limitation in the api itself:
https://github.com/livepeer/livepeerjs/tree/master/packages/subgraph
Maybe we need to create a PR there to get more than 100 results, which seems to be the default limit

Find a way to render a large list of Events

When fully synced, we have thousands of events

Loads in a few seconds, but can be quicker if we simply don't render any event which is too old

Biggest problem being the filters and search function, which should function on the entire set of events

This is a problem since right now the render functions determines the type of the event bundle

[Backend] Expand fullSync option

Since watching for events can cause you to miss one or two

Rather than start from scratch, keep track of what range of blocks have been added live and what range of blocks have been synced by getting all events

Then on boot continueSync all blocks which were added live

Any events which come in live do not get added to the database, but only cached serverside

Make Guide for hosting your own frontend for your own Orchestrator

Make a separate guide on how to use just the frontend and my API in order to easily host a website for your own orchestrator

steps:
installing dependencies
cloning repo
modifying my orch address to theirs
modifying grafana panel links
build the website
explanation on updating and and resetting branch to master
modifying nginx config
certbot

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.