Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
256ae6f
New updates for leaderboard
directcuteo Feb 13, 2025
dd8ed9d
New updates for leaderboard
directcuteo Feb 13, 2025
f3c5d79
More updates
directcuteo Feb 13, 2025
6c5c51b
Merge commit 'd03842cab38b25a754052bacaa7431dc0e90e69f' into webnode-gtm
tizoc Feb 18, 2025
177c474
Merge commit '52c20c66654578bf640ac02f3f2e5caeccf8fb74' into webnode-gtm
tizoc Feb 18, 2025
278161f
feat(heartbeats): Implement more advanced rate limiting on API
tizoc Feb 20, 2025
a110bb7
Merge branch 'develop' of https://github.com/openmina/openmina into f…
directcuteo Feb 24, 2025
617e350
Sentry
directcuteo Feb 24, 2025
4eedfa4
Merge branch 'webnode-gtm' of https://github.com/openmina/openmina in…
directcuteo Feb 24, 2025
793a25d
Leaderboard
directcuteo Feb 27, 2025
3c48450
fix(mempool): Really verify tx snarks in another thread
tizoc Feb 27, 2025
1301bfc
Sentry
directcuteo Feb 24, 2025
50cdfa4
Leaderboard
directcuteo Feb 27, 2025
c074fdb
Add allowed_keys.txt to .gitignore
tizoc Feb 28, 2025
325682d
fix(heartbeats): Perform allowed keys replacements on generated .js f…
tizoc Feb 28, 2025
853a8e0
fix(frontend): Don't log stake
tizoc Feb 28, 2025
b4fc7cb
feat(rpc): Include previous block production attempt in /status response
tizoc Feb 28, 2025
20df436
Merge branch 'webnode-gtm' of github.com:openmina/openmina into webno…
directcuteo Mar 3, 2025
cf01cdc
Block production sentry reporting
directcuteo Feb 28, 2025
8e1aeed
Remove sentry for BP for now
directcuteo Mar 3, 2025
f6ffbdd
fix(frontend/webnode): key upload file names
binier Mar 3, 2025
ac4bcb9
Version
directcuteo Mar 3, 2025
efe8b3f
Fix light theme
directcuteo Mar 3, 2025
2a8b3b1
New version - fix light theme
directcuteo Mar 3, 2025
f0a23ea
Sentry - block production event
directcuteo Mar 3, 2025
438150d
feat(transition_frontier/sync/ledger/snarked): randomize which peer i…
binier Mar 3, 2025
5b28760
fix(transition_frontier/sync/ledger/snarked): edge case query not bei…
binier Mar 3, 2025
c892f78
Merge branch 'webnode-gtm' of github.com:openmina/openmina into webno…
directcuteo Mar 3, 2025
a3fbd52
Sentry - report BP Duration
directcuteo Mar 3, 2025
17945d5
Duration for block produced
directcuteo Mar 3, 2025
6e8a8c1
Leaderboard Whales Keys included
directcuteo Mar 4, 2025
09e665b
Sentry BP report flattening attempt object
directcuteo Mar 4, 2025
f6b9681
Sentry BP report flattening attempt object 2
directcuteo Mar 4, 2025
9545ed3
Heartbeat sentry - improve http on bad internet
directcuteo Mar 4, 2025
304e368
Heartbeats with context in Sentry
directcuteo Mar 4, 2025
35a9b9b
Leaderboard page css
directcuteo Mar 5, 2025
63f84d0
Remove mina explorer and add fetch parts label
directcuteo Mar 7, 2025
a5adba9
Merge branch 'webnode-gtm' of github.com:openmina/openmina into frontend
directcuteo Mar 18, 2025
96bff17
Leaderboard testnet finished
directcuteo Mar 18, 2025
9b32aca
Merge branch 'develop' of github.com:openmina/openmina into frontend
directcuteo Mar 25, 2025
4583849
Dashboard splits
directcuteo Mar 25, 2025
aad3df8
Merge branch 'develop' of github.com:openmina/openmina into frontend
directcuteo Mar 28, 2025
25b031b
Web node local startup
directcuteo Jul 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions frontend/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,15 @@
],
"outputHashing": "all"
},
"webnodelocal": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.webnodelocal.ts"
}
],
"outputHashing": "all"
},
"fuzzing": {
"fileReplacements": [
{
Expand Down Expand Up @@ -120,6 +129,9 @@
"development": {
"browserTarget": "frontend:build:development"
},
"webnodelocal": {
"browserTarget": "frontend:build:webnodelocal"
},
"local": {
"browserTarget": "frontend:build:local"
},
Expand Down
4 changes: 2 additions & 2 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"name": "frontend",
"version": "1.0.180",
"version": "1.0.183",
"scripts": {
"install:deps": "npm install",
"start": "npm install && ng serve --configuration local --open",
"start:dev": "ng serve --configuration development",
"start:webnode": "ng serve --configuration webnodelocal",
"start:dev:mobile": "ng serve --configuration development --host 0.0.0.0",
"start:fuzzing": "npm run install:deps && ng build --configuration fuzzing && npm run start:bundle",
"build": "ng build",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<a href="https://tinyurl.com/MWNT-Application-Form" class="gradient fx-row-full-cent w-100 pointer">
Applications Close Soon <span class="mina-icon icon-200">arrow_right_alt</span>
<a class="gradient fx-row-full-cent w-100">
<span class="mina-icon icon-200 mr-5">sports_score</span>
Mina Web Node Testnet Finished
<span class="mina-icon icon-200 ml-5">sports_score</span>
</a>
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
}

&:hover .mina-icon {
animation: bounceLeftToRight .85s infinite ease-out;
//animation: bounceLeftToRight .85s infinite ease-out;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[@dropdownAnimation]="isMenuOpen ? 'open' : 'closed'"
[class.open]="isMenuOpen"
(clickOutside)="closeMenu()">
<a [class.active]="route === '/leaderboard'" routerLink="/leaderboard">Leaderboard</a>
<a target="_blank" href="https://docs.google.com/spreadsheets/d/15XDlohOD9wUl1_ixNaso1B3zbcWdb-ZHOAxQUwX1Gyc">Prize results</a>
<a target="_blank" href="https://docs.google.com/document/d/1RcLo6NMZzTHixI3Q6lyzhib1oHJKDyrqMscEmXmS9NE/edit?usp=sharing">Program Details</a>
<a target="_blank" href="https://docs.google.com/document/d/1YGsVuWNgS8CJPnMngLo7w44B7a955IS5-xUn6dCCcik/edit?usp=sharing">Prize Draw & Tie-Break
Process</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!--</div>-->

<div class="flex-column h-100 w-100 overflow-y-scroll" #scrollContainer>
<!-- <mina-leaderboard-apply class="w-100 flex-row"></mina-leaderboard-apply>-->
<mina-leaderboard-apply class="w-100 flex-row"></mina-leaderboard-apply>
<mina-leaderboard-header></mina-leaderboard-header>
<main class="flex-1 flex-column">
<mina-leaderboard-title></mina-leaderboard-title>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ export class DashboardSplitsGraphComponent extends StoreDispatcher implements On
private tooltip: d3.Selection<HTMLDivElement, unknown, HTMLElement, undefined>;
private simulation: Simulation<DashboardSplitsPeerSimulation, undefined>;
private circles: d3.Selection<SVGCircleElement, DashboardSplitsPeerSimulation, SVGGElement, undefined>;
private webnodeInnerCircles: d3.Selection<SVGCircleElement, DashboardSplitsPeerSimulation, SVGGElement, undefined>;
private webnodeOuterCircles: d3.Selection<SVGCircleElement, DashboardSplitsPeerSimulation, SVGGElement, undefined>;
private triangles: d3.Selection<SVGPathElement, DashboardSplitsPeerSimulation, SVGGElement, undefined>;
private squares: d3.Selection<SVGRectElement, DashboardSplitsPeerSimulation, SVGGElement, undefined>;
private diamonds: d3.Selection<SVGPathElement, DashboardSplitsPeerSimulation, SVGGElement, undefined>;
Expand Down Expand Up @@ -158,7 +160,8 @@ export class DashboardSplitsGraphComponent extends StoreDispatcher implements On
console.log('Spectral Gap:', spectralGap);

this.renderGraph({ peers, links, sets });
}, tap(({ fetching }) => {
},
tap(({ fetching }) => {
if (fetching) {
this.fetching = fetching;
}
Expand Down Expand Up @@ -245,7 +248,8 @@ export class DashboardSplitsGraphComponent extends StoreDispatcher implements On
.attr('class', d => `link ${d.source.address} ${d.target.address}`)
.attr('stroke', 'var(--base-divider)');

const circleNodes = nodes.filter(peer => !peer.node || ['node', 'generator'].some(n => peer.node.toLowerCase().includes(n)));
const circleNodes = nodes.filter(peer => !peer.node || ['node', 'generator'].some(n => peer.node.toLowerCase().includes(n) && !peer.node.toLowerCase().includes('webnode')));
const webnodeNodes = nodes.filter(p => p.node).filter(peer => peer.node.toLowerCase().includes('webnode'));
const triangleNodes = nodes.filter(p => p.node).filter(peer => peer.node.toLowerCase().includes('snark'));
const squareNodes = nodes.filter(p => p.node).filter(peer => peer.node.toLowerCase().includes('prod'));
const diamondNodes = nodes.filter(p => p.node).filter(peer => peer.node.toLowerCase().includes('seed'));
Expand All @@ -259,6 +263,34 @@ export class DashboardSplitsGraphComponent extends StoreDispatcher implements On
.attr('r', (d: DashboardSplitsPeerSimulation) => d.radius);
this.addCommonProperties(this.circles, lines);

this.webnodeOuterCircles = this.getG('webnodes-outer', 'circle')
.attr('class', 'webnodes-outer')
.selectAll('circle')
.data(webnodeNodes)
.enter()
.append('circle')
.attr('r', (d: DashboardSplitsPeerSimulation) => d.radius)
.attr('fill', 'none')
this.addCommonProperties(this.webnodeOuterCircles, lines, true);

this.webnodeInnerCircles = this.getG('webnodes-inner', 'circle')
.attr('class', 'webnodes-inner')
.selectAll('circle')
.data(webnodeNodes)
.enter()
.append('circle')
.attr('r', (d: DashboardSplitsPeerSimulation) => d.radius * 0.7)
.attr('fill', 'var(--success-primary)')
.on('mouseover', (event: MouseEvent & { target: HTMLElement }, peer: DashboardSplitsPeerSimulation) => this.mouseOverHandle(peer, event, true))
.on('mouseout', (event: MouseEvent & { target: HTMLElement }, peer: DashboardSplitsPeerSimulation) => this.mouseOutHandler(peer, event, true))
.on('click', (_event: MouseEvent & { target: HTMLElement }, peer: DashboardSplitsPeerSimulation) => {
let selectedPeer = this.peers.find(p => p.address === peer.address);
if (selectedPeer === this.activePeer) {
selectedPeer = undefined;
}
this.dispatch(DashboardSplitsSetActivePeer, selectedPeer);
})

this.triangles = this.getG('triangles', 'path')
.attr('class', 'triangles')
.selectAll('path')
Expand Down Expand Up @@ -291,6 +323,30 @@ export class DashboardSplitsGraphComponent extends StoreDispatcher implements On
private createSimulation(sets: DashboardSplitsSet[], nodes: DashboardSplitsPeerSimulation[], lines: DashboardSplitsLinkSimulation[]): void {
const numberOfSets = sets.length;
const matrixSize = Math.ceil(Math.sqrt(numberOfSets));
const getRepulsion = (sets: number) => {
switch (sets) {
case 1:
return 30;
case 2:
return 25;
case 3:
return 22;
case 4:
return 20;
case 5:
return 15;
case 6:
return 12;
case 7:
return 9;
case 8:
return 7;
case 9:
return 5;
default:
return 2;
}
}
this.simulation = d3.forceSimulation<DashboardSplitsPeerSimulation>(nodes)
.force('link', d3.forceLink(lines).distance(numberOfSets === 1 ? 250 : 100)) // This adds links between nodes and sets the distance between them
.force('charge', d3.forceManyBody().strength(-30)) // control the repulsion between groups - negative means bigger distance
Expand All @@ -310,7 +366,7 @@ export class DashboardSplitsGraphComponent extends StoreDispatcher implements On
}
return this.height;
}).strength(0.05))
.force('collide', d3.forceCollide().radius(numberOfSets < 3 ? 25 : 17)) // This adds repulsion between nodes. Play with the radius
.force('collide', d3.forceCollide().radius(getRepulsion(numberOfSets))) // This adds repulsion between nodes. Play with the radius
.force('center', d3.forceCenter(this.width / 2, this.height / 2))
.force('bounds', () => {
for (let node of nodes) {
Expand All @@ -331,6 +387,12 @@ export class DashboardSplitsGraphComponent extends StoreDispatcher implements On
this.circles
.attr('cx', (d: DashboardSplitsPeerSimulation) => d.x)
.attr('cy', (d: DashboardSplitsPeerSimulation) => d.y);
this.webnodeInnerCircles
.attr('cx', (d: DashboardSplitsPeerSimulation) => d.x)
.attr('cy', (d: DashboardSplitsPeerSimulation) => d.y);
this.webnodeOuterCircles
.attr('cx', (d: DashboardSplitsPeerSimulation) => d.x)
.attr('cy', (d: DashboardSplitsPeerSimulation) => d.y);
this.triangles
.attr('transform', (d: DashboardSplitsPeerSimulation) => `translate(${d.x}, ${d.y})`);
this.squares
Expand All @@ -346,14 +408,14 @@ export class DashboardSplitsGraphComponent extends StoreDispatcher implements On
this.simulation.alpha(0.1); // controls how much the animation lasts
}

private addCommonProperties(selection: d3.Selection<any, DashboardSplitsPeerSimulation, SVGGElement, undefined>, lines: DashboardSplitsLinkSimulation[]): void {
private addCommonProperties(selection: d3.Selection<any, DashboardSplitsPeerSimulation, SVGGElement, undefined>, lines: DashboardSplitsLinkSimulation[], noColorChange: boolean = false): void {
selection
.attr('fill', 'var(--special-node)')
.attr('stroke', (d: DashboardSplitsPeerSimulation) => `var(--${lines.some(link => link.source.address === d.address || link.target.address === d.address) ? 'success' : 'warn'}-primary)`)
.attr('stroke-width', 1)
.on('mouseover', (event: MouseEvent & { target: HTMLElement }, peer: DashboardSplitsPeerSimulation) => this.mouseOverHandle(peer, event))
.on('mouseout', (event: MouseEvent & { target: HTMLElement }, peer: DashboardSplitsPeerSimulation) => this.mouseOutHandler(peer, event))
.on('click', (event: MouseEvent & { target: HTMLElement }, peer: DashboardSplitsPeerSimulation) => {
.on('mouseover', (event: MouseEvent & { target: HTMLElement }, peer: DashboardSplitsPeerSimulation) => this.mouseOverHandle(peer, event, noColorChange))
.on('mouseout', (event: MouseEvent & { target: HTMLElement }, peer: DashboardSplitsPeerSimulation) => this.mouseOutHandler(peer, event, noColorChange))
.on('click', (_event: MouseEvent & { target: HTMLElement }, peer: DashboardSplitsPeerSimulation) => {
let selectedPeer = this.peers.find(p => p.address === peer.address);
if (selectedPeer === this.activePeer) {
selectedPeer = undefined;
Expand All @@ -372,7 +434,7 @@ export class DashboardSplitsGraphComponent extends StoreDispatcher implements On
.attr('class', cls);
}

private mouseOverHandle(peer: DashboardSplitsPeerSimulation, event: MouseEvent & { target: HTMLElement }): void {
private mouseOverHandle(peer: DashboardSplitsPeerSimulation, event: MouseEvent & { target: HTMLElement }, noColorChange: boolean = false): void {
const selection = this.tooltip.html(`${peer.node || peer.address}, <span class="tertiary">→</span> ${peer.incomingConnections} <span class="tertiary">/</span> ${peer.outgoingConnections} <span class="tertiary">→</span>`)
.style('display', 'block');

Expand All @@ -386,7 +448,9 @@ export class DashboardSplitsGraphComponent extends StoreDispatcher implements On
if (this.activePeer?.address === peer.address) {
return;
}
d3.select(event.target).attr('fill', 'var(--special-node-selected)');
if (!noColorChange) {
d3.select(event.target).attr('fill', 'var(--special-node-selected)');
}
this.hoveredConnectedLinks = this.connections.filter(link => {
const isDirectConnection = link.source.address === peer.address || link.target.address === peer.address;
if (this.activePeer) {
Expand All @@ -398,12 +462,14 @@ export class DashboardSplitsGraphComponent extends StoreDispatcher implements On
this.hoveredConnectedLinks.attr('stroke', 'var(--success-primary)');
}

private mouseOutHandler(peer: DashboardSplitsPeerSimulation, event: MouseEvent & { target: HTMLElement }): void {
private mouseOutHandler(peer: DashboardSplitsPeerSimulation, event: MouseEvent & { target: HTMLElement }, noColorChange: boolean = false): void {
this.tooltip.style('display', 'none');
if (this.activePeer?.address === peer.address) {
return;
}
d3.select(event.target).attr('fill', 'var(--special-node)');
if (!noColorChange) {
d3.select(event.target).attr('fill', 'var(--special-node)');
}
this.hoveredConnectedLinks.attr('stroke', 'var(--base-divider)');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
<mina-copy [value]="row.address"></mina-copy>
</span>
<span>{{ row.node || '-' }}</span>
<span>
<mina-copy [value]="row.peerId" [display]="row.peerId | truncateMid: 0: 4"></mina-copy>
</span>
<span class="primary text-right pr-12 mr-5">
<span class="tertiary">→</span> {{ row.incomingConnections }} <span class="tertiary">/</span> {{ row.outgoingConnections }} <span class="tertiary">→</span>
</span>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
:host ::ng-deep .mina-table .row.head {
span:last-child {
justify-content: flex-end;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export class DashboardSplitsSidePanelTableComponent extends MinaTableRustWrapper
protected readonly tableHeads: TableColumnList<DashboardSplitsPeer> = [
{ name: 'address' },
{ name: 'name', sort: 'node' },
{ name: 'peer ID', sort: 'peerId' },
{ name: 'Conn. \nIn / Out', sort: 'outgoingConnections' },
];

Expand All @@ -30,13 +29,13 @@ export class DashboardSplitsSidePanelTableComponent extends MinaTableRustWrapper
constructor(private router: Router) { super(); }

override async ngOnInit(): Promise<void> {
this.height = isDesktop() ? ((this.peers.length + 1) * 36 +1) : ((this.peers.length) * 104) + 90;
this.height = isDesktop() ? ((this.peers.length + 1) * 36 + 1) : ((this.peers.length) * 104) + 90;
await super.ngOnInit();
this.listenToActivePeerChanges();
}

protected override setupTable(): void {
this.table.gridTemplateColumns = [115, 85, 80, '1fr'];
this.table.gridTemplateColumns = [140, 85, '1fr'];
this.table.minWidth = 400;
this.table.sortClz = DashboardSplitsSortPeers;
this.table.sortSelector = selectDashboardSplitsSort;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
<ng-template #template>
<div class="fx-row-vert-cent flex-between w-100">
<div class="fx-row-vert-cent shrink-0">
<div class="f-600 mr-10">{{ setsLength === undefined ? 'Loading ' : setsLength }} Branch{{ setsLength | plural: 'es' }}</div>
<div class="f-600 mr-10">{{ setsLength === undefined ? 'Loading ' : setsLength }}
Branch{{ setsLength | plural: 'es' }}
</div>
<button class="h-sm btn-primary mr-5"
[tooltip]="networkSplitTime"
[disabled]="fetching"
Expand Down Expand Up @@ -32,18 +34,17 @@
</button>
</div>
<div class="fx-row-vert-cent shrink-0" *ngIf="stats">
<span class="mina-icon icon-200 f-20 mr-5 success-primary">crop_square</span>
<span class="success-primary">{{ stats.producers }}</span>
<span class="success-secondary mr-10">&nbsp;Producer{{ stats.producers | plural }}</span>
<span class="mina-icon icon-200 f-18 mr-5 success-primary rotate-45">crop_square</span>
<span class="success-primary">{{ stats.seeders }}</span>
<span class="success-secondary mr-10">&nbsp;Seeder{{ stats.seeders | plural }}</span>
<span class="mina-icon icon-200 f-22 mr-5 success-primary">change_history</span>
<span class="success-primary">{{ stats.snarkers }}</span>
<span class="success-secondary mr-10">&nbsp;Snarker{{ stats.snarkers | plural }}</span>
<span class="mina-icon icon-200 f-20 mr-5 success-primary webnode">radio_button_checked</span>
<span class="success-secondary mr-10">&nbsp;Current node</span>
<!-- <span class="mina-icon icon-200 f-18 mr-5 success-primary rotate-45">crop_square</span>-->
<!-- <span class="success-primary">{{ stats.seeders }}</span>-->
<!-- <span class="success-secondary mr-10">&nbsp;Seeder{{ stats.seeders | plural }}</span>-->
<!-- <span class="mina-icon icon-200 f-22 mr-5 success-primary">change_history</span>-->
<!-- <span class="success-primary">{{ stats.snarkers }}</span>-->
<!-- <span class="success-secondary mr-10">&nbsp;Snarker{{ stats.snarkers | plural }}</span>-->
<span class="mina-icon icon-200 f-20 mr-5 success-primary">circle</span>
<span class="success-primary">{{ stats.nodes + stats.transactionGenerators }}</span>
<span class="success-secondary">&nbsp;Other</span>
<span class="success-secondary">&nbsp;Peers</span>
</div>
</div>
</ng-template>
Loading
Loading