Skip to content

Instantly share code, notes, and snippets.

how do I publish newton-cli?
Searched for 2 patterns, read 1 file, listed 1 directory (ctrl+o to expand)
⏺ Here's the honest answer: there is currently no path to publish newton-cli — and it's blocked by three distinct issues, some of which
are hard blockers.
Blockers
1. License is not accepted by crates.io (hard blocker)
@denniswon
denniswon / gist:8a55e803f87d96eca546ac7aeea8297a
Created April 14, 2026 14:38
Gateway Scalability & Throughput Analysis
---
Gateway Scalability & Throughput Analysis
End-to-End Flow Timeline
Here's the create_task critical path with approximate timings:
Client Request
├── Phase 0: Request Setup ..................... ~1-5ms
@denniswon
denniswon / gist:06d1c34ba5ca47a4fcfefc4de1ef49bf
Created April 10, 2026 22:33
TEE Integration for Newton Protocol
---
Meeting: TEE Integration for Newton Protocol
---
Problem Statement
Newton Protocol accumulates sensitive data (identity PII, confidential data, policy client secrets) that operators must decrypt and
process during policy evaluation. Two core concerns:
1. Operator data leakage — operators currently decrypt private data locally, meaning a malicious or compromised operator could exfiltrate
@denniswon
denniswon / gist:a5e55a5d515bb7234f550647df5cbc3a
Created April 10, 2026 13:14
Pipelined Batch Transaction Submitter
one question: does the contract revert only detectable from transaction receipt? or can it be detected from just sendTransaction?
currently, the problem with batch tx submission is that it is a single loop, sequential process with retry. Instead, let's explore
pipelining architecture where the initial submission of the batch doesn't block, and the failures are handled on a separate queue
(will we need a failed tx handling dedicated task generator signer key that is separate from the main submission signer key?)
/clarify-plan
⏺ Skill(/clarify-plan)
⎿ Successfully loaded skill
⏺ Good questions. Let me first answer your initial question, then clarify the design space.
@denniswon
denniswon / gist:28aa29640e8e9eb6677a6e175a013834
Created April 9, 2026 13:51
Newton Privacy Layer — Known Limitations & Next Steps
Here's the full picture:
---
Newton Privacy Layer — Known Limitations & Next Steps
★ Insight ─────────────────────────────────────
The limitations fall into three buckets: (1) security gaps where the system doesn't enforce what it should, (2) trust assumptions
where centralization remains, and (3) missing infrastructure that blocks future phases. Each has a clear resolution path — none are
architectural dead ends.
─────────────────────────────────────────────────
@denniswon
denniswon / gist:1e3cebe58982d56885e23102df39fc2a
Created April 8, 2026 22:21
Two-Phase Consensus Support for sendTask Async Flow
Ready to code?
Here is Claude's plan:
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
Plan: Two-Phase Consensus Support for sendTask Async Flow
Context
The async sendTask path (channel.rs) currently uses a single-phase broadcast where each operator independently fetches data,
evaluates, and BLS-signs. This diverges from the sync createTask path (sync.rs), which supports two consensus modes:
@denniswon
denniswon / gist:89352ed92f47057929f2187efc1b3972
Created April 8, 2026 18:42
Load Test Analysis: Two Distinct Failure Modes
---
Load Test Analysis: Two Distinct Failure Modes
★ Insight ─────────────────────────────────────
The Datadog CSV export only includes the Content (message) column, but the critical diagnostic data — the revert selector and
classification — is logged as tracing structured fields (classification = ?classification), which Datadog stores as attributes, not in
the message string. This is why every "non-recoverable" line looks identical. We're diagnosing blind.
─────────────────────────────────────────────────
Failure Mode 1: Two-Phase on Base Sepolia — 100% On-Chain Submission Failure
@denniswon
denniswon / gist:50d8801ab6948d0dc1294be36b88e6af
Created April 8, 2026 05:38
Auto-Compaction Resilience System
---
Research Synthesis
★ Insight ─────────────────────────────────────
What you already have vs. what's missing:
- OMC's PreCompact hooks save mode state + project memory directives before compaction — solid foundation
- OMC's HUD statusline shows context % — but nobody acts on it automatically
- Gap 1: No UserPromptSubmit hook to warn you before auto-compact fires (~95% threshold)
- Gap 2: No SessionStart:compact hook to re-inject work-in-progress context after compaction
- Gap 3: No CLAUDE_AUTOCOMPACT_PCT_OVERRIDE to lower the auto-compact trigger point
@denniswon
denniswon / gist:d3bd9cebaa01f935c7eb8e8f251394c3
Created April 6, 2026 15:16
Proposed newton-warp Structure
★ Insight ─────────────────────────────────────
Separation of concerns: newton-prover-avs is the consensus infrastructure (operators, BLS aggregation, slashing, ZK proofs).
newton-warp is the chain abstraction + compliance layer — the bridge between smart accounts and Newton's policy engine via Rhinestone
Warp. These are fundamentally different domains with different deployment lifecycles, dependencies, and audiences.
Why monorepo: The Rust backend service (intent routing, Rhinestone orchestrator client) and the TypeScript SDK (newton-account-sdk)
must stay in lockstep — API changes in the backend require SDK updates. Colocating them enables atomic PRs, shared CI, and type
consistency.
─────────────────────────────────────────────────
⏺ ★ Insight ─────────────────────────────────────
The latest published SDK is 0.7.1. The HPKE privacy functions (createSecureEnvelope, uploadEncryptedData, getPrivacyPublicKey) were added in v0.5.0. The newton-identity app is on
^0.2.10 — way behind. We need to bump to ^0.7.1.
The identity app's current flow is:
1. RSA-OAEP encrypt → hex string (encryptSecret)
2. EIP-712 sign the hex string ({ data: encryptedInquiryData })
3. Upload via newt_uploadIdentityEncrypted with encrypted_data field
After migration: