-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
33 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
[package] | ||
name = "ord-canister" | ||
version = "0.1.0" | ||
authors = ["[email protected]"] | ||
repository = "https://github.com/octopus-network/ord-canister" | ||
license = "MIT" | ||
edition = "2021" | ||
|
||
[workspace] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Copyright 2024 Omnity | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Ord canister | ||
|
||
> #### A canister for indexing RUNE UTXOs on bitcoin. | ||
-- | ||
|
||
## Overview | ||
|
||
The Ord canister periodically fetch bitcoin blocks from `btc-rpc-proxy` since `840000` using HTTP-outcall and resolve all transactions to RUNE UTXOs. | ||
|
||
Currently, the Ord canister has been deployed on mainnet: [`o25oi-jaaaa-aaaal-ajj6a-cai`](https://dashboard.internetcomputer.org/canister/o25oi-jaaaa-aaaal-ajj6a-cai) and ready to serve. | ||
|
||
## RPC Proxy | ||
Usually, the bitcoin RPC `getblocks` responses are greater than 2M which exceeds the `max_response_bytes` limit of HTTP-outcall, so we have to implement [Range requests](https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests) in Ord canister then combine the responses into btc raw transactions. | ||
|
||
For the same reason, the ord canister requires the RPC servers to support HTTP Range requests while most RPC providers don't. So, there is a crate `btc-rpc-proxy` behalf the real RPC providers. | ||
|
||
When `btc-rpc-proxy` receives a request from Ord canister, if the request header contains a range field, it will split the response body following the range then return to Ord canister. Typically, Ord caister needs to repeat 3 requests on a same block to fully fetch it. | ||
|
||
## License | ||
[MIT](LICENSE). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters