Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lookup rune number #3440

Merged
merged 7 commits into from
Apr 13, 2024
Merged

Lookup rune number #3440

merged 7 commits into from
Apr 13, 2024

Conversation

lugondev
Copy link
Contributor

@lugondev lugondev commented Apr 2, 2024

No description provided.

Copy link
Collaborator

@raphjaph raphjaph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good so far.

Try etching multiple runes and check that the order is correct

src/subcommand/server.rs Outdated Show resolved Hide resolved
src/index.rs Outdated Show resolved Hide resolved
@lugondev lugondev requested a review from raphjaph April 13, 2024 10:00
Copy link
Collaborator

@raphjaph raphjaph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great PR!

@raphjaph raphjaph enabled auto-merge (squash) April 13, 2024 21:51
@raphjaph raphjaph merged commit 5dd1f3e into ordinals:master Apr 13, 2024
5 checks passed
thedoublejay pushed a commit to sadoprotocol/ord that referenced this pull request Jun 3, 2024
* Fix type in runes docs (ordinals#3447)

* Fix deploy bitcoin.conf typo (ordinals#3443)

* Remove `etch` from error message (ordinals#3449)

* Update rune docs for Chinese version (ordinals#3457)

* Update testing.md (ordinals#3463)

* Fix typo in zh.po (ordinals#3464)

* Update required Rust version in README (ordinals#3466)

* Add package necessary for Ubuntu (ordinals#3462)

* Add rune logo and link to navbar (ordinals#3442)

* Fix maturation loop (ordinals#3480)

* Add wallet batch outputs and inscriptions endpoints (ordinals#3456)

* Check etching commit confirmations correctly (ordinals#3507)

Previously, we were checking if an etching commit transaction had matured by
asking bitcoind how many confirmations it had. This was incorrect, because if
ord was behind bitcoind, the number of confirmations would be based on
bitcoind's current block height, and would be greater than the number of
confirmations the commit transaction had as of the reveal transaction block
height.

This commit fixes this by calculating the number of confirmations using the
block height of the commit transaction, which is correct even if bitcoind is
ahead.

* Show decimal rune balances (ordinals#3505)

* Allow inscribing without file (ordinals#3451)

This allows inscribing only the delegate without having to specify a file. In the batch it allows you to comletely omit the file as well.

* Add etching turbo flag (ordinals#3511)

Future runes features may be opt-in, for example, if they increase light client
validation costs, or if they are simply too degenerate.

This commit adds a "turbo" flag, which, if set, premptively opts in to such
future features.

It also sets the "turbo" flag on the genesis rune, UNCOMMON•GOODS.

Because the genesis rune is inserted into the index when it is created, the
schema version is also incremented, to force rebuilding indices created before
this commit.

* Update data carriersize to match with ord (ordinals#3506)

* Document allowed opcodes in runestones (ordinals#3461)

Document that data push opcodes 0 through 78 inclusive are allowed in
runestones, and opcodes 79 and above will produce a cenotaph. Also add a test
that makes sure that this is actually true.

* Fix typo in zh.po (ordinals#3498)

* Better error message when bitcoind doesn't start (ordinals#3500)

* Updated rust-version to 1.74.0 (ordinals#3492)

Ord now requires Rust 1.74 to build, update `rust-version` in Cargo.toml files
to reflect this.

* Mint with destination (ordinals#3497)

* Bump ord crate required rust version to 1.76 (ordinals#3512)

* Add postage flag to mint command (ordinals#3482)

* Test that mints without a cap are unmintable (ordinals#3495)

Test that if the `cap` field of an etching is unset, it is treated as being
zero, and the rune is unmintable.Test that if the `cap` field of an etching is
unset, it is treated as being zero, and the rune is unmintable.

* Release 0.18.0 (ordinals#3513)

- Bump version: 0.17.1 → 0.18.0
- Update changelog
- Update changelog contributor credits
- Update dependencies

* Fix off-by-one in wallet when waiting for etching commitment to mature (ordinals#3515)

While waiting to broadcast a rune etching, take into account the fact that the
commit transaction will have an additional confirmation in the next block.
Previously we weren't, so the wallet was waiting for one confirmation too many.

* Release 0.18.1 (ordinals#3522)

- Bump version: 0.18.0 → 0.18.1
- Update changelog
- Update changelog contributor credits

* Forbid etching below rune activation height (ordinals#3523)

Don't allow etching if the etching reveal height is below the runes activation
height, otherwise the user would waste funds on an ineffective etching.

* Put rune higher on /inscription (ordinals#3363)

* Fix typo in recursion docs (ordinals#3529)

* Add Red Had build instructions to readme (ordinals#3531)

* Add runes pagination (ordinals#3215)

* Lookup rune by number (ordinals#3440)

* Emit rune-related events (ordinals#3219)

Emit rune etched, rune minted, rune transferred, and rune burned events to the
index event channel.

* Address runes review comments (ordinals#3547)

- Fix overflow in Rune::from_str
- Use checked_pow in Pile Display implementation
- Only report first flaw in cenotaph
- Add comment to Edict::from_integers for output == tx.output.len()
- Avoid divide by zero in RuneUpdater
- Add test for zero rune ID delta
- Make varint::decode return a Result instead of an Option

* Lock runes commit output (ordinals#3504)

* Display etched runes on /block (ordinals#3366)

* Remove /runes/balances page (ordinals#3555)

* Fix typo in zh.po (ordinals#3540)

* Fix typos (ordinals#3541)

* Store wallets in /wallets subdir of data dir (ordinals#3553)

Makes the data dir cleaner, and avoids a conflict with wallet named `index`,
since there's already an `index.redb`.

* Add command to export BIP-329 labels for wallet outputs (ordinals#3120)

Add `ord wallet label`, which exports BIP-320 wallet output labels. Especially
useful for labeling outputs in Sparrow wallets.

* Add open mint tests (ordinals#3558)

* Document turbo flag (ordinals#3579)

* Release 0.18.2 (ordinals#3582)

- Bump version: 0.18.1 → 0.18.2
- Update changelog
- Update changelog contributor credits
- Update dependencies

* Bump ord version to 0.18.2 in Cargo.toml (ordinals#3583)

* Resume cycles through all pending etchings (ordinals#3566)

* Generate sample batch.yaml in env command (ordinals#3530)

* Add default content proxy and decompress to env command (ordinals#3509)

* Address runes review comments (ordinals#3605)

- Use inclusive range in Index::get_runes_in_block
- Remove out-of-date comment
- Use checked_pow in Decimal Display impl
- Use checked_pow in impl FromStr for Decimal

* Remove duplicated word (ordinals#3598)

* Show premine percentage (ordinals#3567)

* Add back runes balances API (ordinals#3571)

* Remove timeout for wallet client (ordinals#3621)

* Add `dry-run` flag to `resume` command (ordinals#3592)

* Clear etching when rune commitment is spent (ordinals#3618)

* Add test Rune cannot be minted less than limit amount (ordinals#3556)

* Update recursion.md with consistant syntax (ordinals#3585)

* Check rune minimum at height before sending (ordinals#3626)

* Release 0.18.3 (ordinals#3625)

* Update sparrow-wallet.md --name flag update (ordinals#3635)

* Fix zh.po translations (ordinals#3588)

* Allow minting if mint begins next block (ordinals#3659)

Make `ord wallet mint` check whether the rune to be minted is mintable in the
next block, since that's the block in which our mint transaction might actually
be mined.

* Do not show runic outputs in cardinals command (ordinals#3656)

* Update sat-hunting.md with how to transfer specific sats (ordinals#3666)

* Allow longer request body for JSON API (ordinals#3655)

* Clarify that inscriptions must be served from URLs with path /content/<INSCRIPTION_ID> (ordinals#3209)

In order for inscriptions to retrieve their own inscription ID, inscription
content must be served from URLs with path `/content/<INSCRIPTION_ID>`.

When an inscription with ID X delegates to another inscription with ID Y,
meaning that X has a delegate field whose value is Y, when requesting the
content of inscription ID X, the content of inscription Y must be returned from
the URL with path `/content/X`. This allows inscription Y to use the ID of
delegating inscriptions as seeds for generative content, since the delegating
inscriptions will all have different inscription IDs.

* Use contains_key instead of get / is_some (ordinals#3705)

* Fix typo on sat hunting page (ordinals#3668)

* Add support for mjs files (ordinals#3653)

* Use correct content type for .mjs inscriptions (ordinals#3712)

`text/javascript` is the preferred MIME type for JavaScript, so use it instead
of `application/x-javascript` when inscribing `.mjs` files.

* Remove duplicate endpoint from explorer.md (ordinals#3716)

Output `/output/<OUTPOINT>` was listed twice.

* Persist config files for ord env command (ordinals#3715)

* Add alt text to preview image (ordinals#3713)

* Fix send runes (ordinals#3484)

* Release 0.18.4 (ordinals#3720)

- Bump version: 0.18.3 → 0.18.4
- Update changelog
- Update changelog contributor credits
- Update dependencies

* Show progress bar for etching (ordinals#3673)

* Bump rustfmt version 2018 to 2021 (ordinals#3721)

* Patch some omissions in the Chinese translation (ordinals#3694)

* Update runes.md docs (ordinals#3681)

* Update sat-hunting.md (ordinals#3724)

* Allow higher rpcworkqueue limit conf (ordinals#3615)

* Allow specifying different output formats (ordinals#3424)

* Release 0.18.5 (ordinals#3741)

* Fix old conflicts

* Resolve issues with Ordzaar modifications

* Remove duplicate /inscriptions endpoint

---------

Co-authored-by: twosatsmaxi <112330467+twosatsmaxi@users.noreply.github.com>
Co-authored-by: bitspill <github@bitspill.net>
Co-authored-by: Ordinarius <137325073+ordinariusprof@users.noreply.github.com>
Co-authored-by: Dr.JingLee <95461562+DrJingLee@users.noreply.github.com>
Co-authored-by: gmart7t2 <49558347+gmart7t2@users.noreply.github.com>
Co-authored-by: RandolphJiffy <RandolphJiffy@hotmail.com>
Co-authored-by: nine <118634361+cryptoni9n@users.noreply.github.com>
Co-authored-by: Petrius Lima <petrius.lima@gmail.com>
Co-authored-by: 0xLugon <lugon@alphatrue.com>
Co-authored-by: raph <raphjaph@protonmail.com>
Co-authored-by: Casey Rodarmor <casey@rodarmor.com>
Co-authored-by: tgscan-dev <136890925+tgscan-dev@users.noreply.github.com>
Co-authored-by: ynohtna92 <ynohtna92@users.noreply.github.com>
Co-authored-by: nix.eth <113411347+nix-eth@users.noreply.github.com>
Co-authored-by: rongyi <sqrongyi@163.com>
Co-authored-by: Felipe Lincoln <mail.felipelincoln@gmail.com>
Co-authored-by: blackj <yuan_gou@hotmail.com>
Co-authored-by: StevenMia <166844090+StevenMia@users.noreply.github.com>
Co-authored-by: Javier Villanueva <javiervd@gmail.com>
Co-authored-by: oxSaturn <oxSaturn@proton.me>
Co-authored-by: zmeyer44 <54515037+zmeyer44@users.noreply.github.com>
Co-authored-by: Taha Abbasi <taha.abbasi@ferrum.network>
Co-authored-by: losingle <losingle@gmail.com>
Co-authored-by: Vannix <134819232+Vanniix@users.noreply.github.com>
Co-authored-by: knowmost <167442703+knowmost@users.noreply.github.com>
Co-authored-by: Eloc <42568538+elocremarc@users.noreply.github.com>
Co-authored-by: bingryan <41174435+bingryan@users.noreply.github.com>
Co-authored-by: AM shadow <154503348+shadowv0vshadow@users.noreply.github.com>
Co-authored-by: Han Tuzun <hantuzun@users.noreply.github.com>
Co-authored-by: Jeremy Rubin <j@rubin.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants