Skip to content
Merged
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
78 changes: 0 additions & 78 deletions .docker/Dockerfile.optimized

This file was deleted.

9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*.dll
*.so
*.dylib
/main
.cache
# Test binary, built with `go test -c`
*.test
Expand All @@ -28,6 +29,9 @@ go.work
# Zed
.zed

# Emacs
.projectile

# Visual Studio Code
.vscode

Expand All @@ -46,4 +50,7 @@ cmd/web/explorer/.idea
/cmd/tps/data

rag
node_modules
node_modules

# Hardhat
cache/solidity-files-cache.json
3 changes: 0 additions & 3 deletions .projectile

This file was deleted.

1 change: 0 additions & 1 deletion cache/solidity-files-cache.json

This file was deleted.

14 changes: 5 additions & 9 deletions cmd/rpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,8 @@
- /v1/query/validator-set
- /v1/query/checkpoint
- /v1/subscribe-rc-info
- /debug/blocked
- /debug/heap
- /debug/cpu
- /debug/routine
- /debug/pprof
- /debug/pprof/*name
- /v1/eth
- /v1/admin/keystore
- /v1/admin/keystore-new-key
Expand Down Expand Up @@ -5050,11 +5048,9 @@ Jun 11 09:47:09.521 INFO: Reset BFT (NEW_HEIGHT)
## Golang Profiling Debug

**Route:**
- DebugBlockedRoutePath = "/debug/blocked"
- DebugHeapRoutePath = "/debug/heap"
- DebugCPURoutePath = "/debug/cpu"
- DebugRoutineRoutePath = "/debug/routine"
- /debug/pprof
- /debug/pprof/*name

**Description**: returns an HTTP handler that serves the named profile. Available profiles can be found in [runtime/pprof.Profile]. See https://pkg.go.dev/net/http/pprof
**Description**: serves the Go pprof index and named pprof handlers. These routes are exposed on the profiling server bound to `ProfilingPort`, not the main RPC port. Available profiles can be found in `net/http/pprof`. See https://pkg.go.dev/net/http/pprof

**HTTP Method**: `GET`
30 changes: 28 additions & 2 deletions cmd/rpc/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,34 @@ func (s *Server) Blocks(w http.ResponseWriter, r *http.Request, _ httprouter.Par

// TransactionByHash responds with a transaction with the hash h
func (s *Server) TransactionByHash(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
// Invoke helper with the HTTP request, response writer and an inline callback
s.hashIndexer(w, r, func(s lib.StoreI, h lib.HexBytes) (any, lib.ErrorI) { return s.GetTxByHash(h) })
req := new(hashRequest)
if ok := unmarshal(w, r, req); !ok {
return
}
hashBytes, err := lib.StringToBytes(req.Hash)
if err != nil {
write(w, err, http.StatusBadRequest)
return
}
st, ok := s.setupStore(w)
if !ok {
return
}
defer st.Discard()
tx, err := st.GetTxByHash(hashBytes)
if err != nil {
write(w, err, http.StatusBadRequest)
return
}
if tx != nil && tx.GetTxHash() != "" {
write(w, tx, http.StatusOK)
return
}
if pendingTx, found := s.controller.GetPendingTxByHash(req.Hash); found {
write(w, pendingTx, http.StatusOK)
return
}
write(w, map[string]string{"error": "transaction not found"}, http.StatusNotFound)
}

// TransactionsByHeight response with the transactions at block height h
Expand Down
14 changes: 0 additions & 14 deletions cmd/rpc/web/explorer/src/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@ const Footer: React.FC = () => {
<div className="mx-auto px-1 py-6 sm:px-2">
{/* Desktop Layout */}
<div className="hidden md:flex items-center justify-between">
{/* Left side - Logo and Copyright */}
<div className="flex items-center gap-3">
<span className="text-gray-400 text-sm">
© 2025 Canopy Foundation. All rights reserved.
</span>
</div>

{/* Right side - Links */}
<div className="flex items-center gap-6">
<a
Expand Down Expand Up @@ -87,13 +80,6 @@ const Footer: React.FC = () => {
Terms
</a>
</div>

{/* Copyright */}
<div className="text-center">
<span className="text-gray-400 text-xs">
© 2025 Canopy Foundation. All rights reserved.
</span>
</div>
</div>
</div>
</footer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,10 @@ const TransactionDetailPage: React.FC = () => {
}

// Extract data from the API response (using transaction already extracted above)
const status = transaction?.status || 'success'
const blockHeight = transaction?.height || transaction?.blockHeight || transaction?.block || 0
const rawStatus = transaction?.status || ''
const isPending = blockHeight === 0 || rawStatus.toLowerCase() === 'pending'
const status = isPending ? 'pending' : (rawStatus || 'success')
const timestamp = transaction?.transaction?.time || transaction?.timestamp || transaction?.time || new Date().toISOString()
const fee = formatFee(transactionFeeMicro)

Expand Down Expand Up @@ -297,11 +299,11 @@ const TransactionDetailPage: React.FC = () => {
</h1>
</div>
<div className="flex flex-wrap items-center gap-3 mt-2">
<span className="inline-flex min-w-[6.25rem] items-center justify-center rounded-md border border-[#35cd48]/30 bg-[#35cd48]/12 px-1.5 py-0.5 text-center text-[10px] font-medium tracking-tight text-[#35cd48]">
{status === 'success' || status === 'Success' ? 'Success' : 'Pending'}
<span className={`inline-flex min-w-[6.25rem] items-center justify-center rounded-md border px-1.5 py-0.5 text-center text-[10px] font-medium tracking-tight ${isPending ? 'border-yellow-500/30 bg-yellow-500/12 text-yellow-500' : 'border-[#35cd48]/30 bg-[#35cd48]/12 text-[#35cd48]'}`}>
{isPending ? 'Pending' : 'Success'}
</span>
<span className="text-gray-400 text-sm">
Confirmed {getTimeAgo(timestamp)}
{isPending ? 'Awaiting block inclusion' : `Confirmed ${getTimeAgo(timestamp)}`}
</span>
</div>
</div>
Expand Down Expand Up @@ -368,8 +370,8 @@ const TransactionDetailPage: React.FC = () => {

<div className="flex flex-col border-b border-gray-400/30 pb-4 gap-2">
<span className="text-gray-400 text-sm">Status</span>
<span className="inline-flex min-w-[6.25rem] items-center justify-center rounded-md border border-[#35cd48]/30 bg-[#35cd48]/12 px-1.5 py-0.5 text-center text-[10px] font-medium tracking-tight text-[#35cd48]">
{status === 'success' || status === 'Success' ? 'Success' : 'Pending'}
<span className={`inline-flex min-w-[6.25rem] items-center justify-center rounded-md border px-1.5 py-0.5 text-center text-[10px] font-medium tracking-tight ${isPending ? 'border-yellow-500/30 bg-yellow-500/12 text-yellow-500' : 'border-[#35cd48]/30 bg-[#35cd48]/12 text-[#35cd48]'}`}>
{isPending ? 'Pending' : 'Success'}
</span>
</div>

Expand Down
Loading
Loading