Comments (6)
Its already been moved to utils/made a standable function (it was previously in Channel), but it may need a second function to sort inputs (I think most uses are only one input, but maybe I'm wrong). As for the sort order, it should match https://github.com/lightningnetwork/lightning-rfc/blob/master/03-transactions.md#transaction-input-and-output-ordering which appears to not reference length and only sort based on the data itself, but BIP 69 is underspecified so its unclear.
from rust-lightning.
cc @TheBlueMatt tagging you in case you didn't get a notification about this issue, and questions I had.
from rust-lightning.
Honestly probably best to rewrite BOLT 3 to not reference BIP 69 since the BIP is underspecified and just write what is intended there.
from rust-lightning.
ah, cool, should've checked the BOLTs. It says "the respective output scriptPubKeys (as a byte-array) will be compared lexicographically, in ascending order". Looking at the btcd implementation (https://git.io/fNCx8), they use Bytes.compare
, and I can find the rust-equivalent of that for now.
I'm not convinced its better for BOLT 3 to have its own spec of tx ordering. Then, the bitcoin ecosystem will have to deal with both BIP 69 and the BOLT3 versions, which could diverge over time. Feels better to add clarity to BIP69. At the least, provide a test-case where tx.amount are equal but the tx.scriptPubKeys are different.
from rust-lightning.
from rust-lightning.
from rust-lightning.
Related Issues (20)
- Change `WalletSource::sign_tx` to `sign_psbt`
- Small payments not going through on mainnet HOT 10
- add probing code HOT 8
- Simplify serialization where backwards compat. to LDK prior 0.0.113 kept us from doing so HOT 3
- Coop close v3 (`option_simple_close`) HOT 1
- tx-sync: Re-register watched outputs after spend has been reorged out of chain HOT 3
- make `InFlightHtlc` take into account blinded data
- Differentiate between coop close and force-close in `Balance` HOT 1
- Builld scoring data from local channels
- Support multiple funding transaction (candidates) per channel (Splicing, Dual Funding)
- Bump `rust-bitcoin` to version 0.31 HOT 1
- Keep a cache of recent onions seen and refuse replay
- Make node pubkey/node-secret-ECDH signing methods infallible HOT 2
- Log the errors before we return them from `ChannelManager::do_accept_inbound_channel` HOT 1
- Trampoline Pending Requirements Tracking HOT 2
- `ln::peer_handler::tests::test_process_events_multithreaded` is flaky HOT 1
- Panic-during-panic in `lightning-background-processor` tests HOT 3
- Add `PaymentHash` to log `Record`s HOT 3
- Add channel's funding txo to Channel `Event::ChannelClosed`
- Panic on hitting async signing for 0.0.119
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust-lightning.