• About
  • Advertise
  • Privacy & Policy
  • Contact
coinmarketcap.yt
Advertisement
  • Home
  • Bitcoin
  • Blockchain
  • Ethereum
  • Market
  • Videos
  • Tools
  • Bridges
  • Privacy Policy
  • Contact Us
No Result
View All Result
  • Home
  • Bitcoin
  • Blockchain
  • Ethereum
  • Market
  • Videos
  • Tools
  • Bridges
  • Privacy Policy
  • Contact Us
No Result
View All Result
coinmarketcap.yt
No Result
View All Result
Home Bitcoin

Edge cases when dealing with incoming Bitcoin transactions

coinmarketcap.yt by coinmarketcap.yt
February 19, 2023
in Bitcoin
0
btcpay – LTC Address Derivation Path from Address and Seed
0
SHARES
0
VIEWS
Share on FacebookShare on Twitter

I have an app that accepts Bitcoin payments. After some research I’ve settled with using Bitcoin Core’s bitcoind with RPC to manage new addresses and verify for new transactions for those addresses.

  1. A new deposit address is generated with getnewaddress
  2. Every minute a job runs and calls listsinceblock with the target_confirmations set to 6 (so that my database transaction records update up to 6 confirmations)

Currently I’m accepting transactions with at least one confirmation. I might start accepting unconfirmed transactions for high value users, with certain security measures in place.

Initially my business logic was having the txid unique to the transactions table, but, even though highly unlikely, a user might make a transaction to two different Bitcoin addresses associated to their account, so I must account for that case in which the txid is the same but addresses are different, but they are still valid deposit addresses for that user. Another case is, when a user might make a transaction in which more than one output belong to the same address. Bitcoin Core does not allow sending to the same address more than once in the same transaction, but other wallets do (e.g. Trezor). I’ve worked that out by using the vout index within the transaction.

So right now my unique index for Bitcoin transactions is a combination of these three: txid:vout:address

My question is, would there be other edge case scenarios that might need special validation logic? I’m not worried about RBF since I’m not accepting unconfirmed transactions (for now).

I have an app that accepts Bitcoin payments. After some research I’ve settled with using Bitcoin Core’s bitcoind with RPC to manage new addresses and verify for new transactions for those addresses.

  1. A new deposit address is generated with getnewaddress
  2. Every minute a job runs and calls listsinceblock with the target_confirmations set to 6 (so that my database transaction records update up to 6 confirmations)

Currently I’m accepting transactions with at least one confirmation. I might start accepting unconfirmed transactions for high value users, with certain security measures in place.

Initially my business logic was having the txid unique to the transactions table, but, even though highly unlikely, a user might make a transaction to two different Bitcoin addresses associated to their account, so I must account for that case in which the txid is the same but addresses are different, but they are still valid deposit addresses for that user. Another case is, when a user might make a transaction in which more than one output belong to the same address. Bitcoin Core does not allow sending to the same address more than once in the same transaction, but other wallets do (e.g. Trezor). I’ve worked that out by using the vout index within the transaction.

So right now my unique index for Bitcoin transactions is a combination of these three: txid:vout:address

My question is, would there be other edge case scenarios that might need special validation logic? I’m not worried about RBF since I’m not accepting unconfirmed transactions (for now).

Previous Post

Blockchain.com Dismisses Rumours About Its Business Sale

Next Post

EOS Price Gains 3% In 24 Hours As Bulls Battle Major Resistance: Will They Keep Their Selling Appetite In Check?

coinmarketcap.yt

coinmarketcap.yt

Next Post
EOS Price Gains 3% In 24 Hours As Bulls Battle Major Resistance: Will They Keep Their Selling Appetite In Check?

EOS Price Gains 3% In 24 Hours As Bulls Battle Major Resistance: Will They Keep Their Selling Appetite In Check?

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Stay Connected test

  • 23.8k Followers
  • 99 Subscribers
  • Trending
  • Comments
  • Latest
Breaking Barriers: How Bitcoin Can Transform The Real Estate Industry

Breaking Barriers: How Bitcoin Can Transform The Real Estate Industry

June 2, 2023
Living in Merida Mexico – Cost of Living in Mexico – Tips for living in Mexico on a Budget

Living in Merida Mexico – Cost of Living in Mexico – Tips for living in Mexico on a Budget

December 25, 2022
Singapore Financial Authority Orders Crypto Companies to Keep Customer Assets in Trust 

Singapore Financial Authority Orders Crypto Companies to Keep Customer Assets in Trust 

July 3, 2023
DeeLance Leads Freelancing’s Web3 Future

DeeLance Leads Freelancing’s Web3 Future

April 30, 2023
Introduction to Bitcoin: what is bitcoin and why does it matter?

Introduction to Bitcoin: what is bitcoin and why does it matter?

0
Bitcoin Explained in the Bitcoin Basics Workshop CBP Prep [Free Workshop Extras – See Description]

Bitcoin Explained in the Bitcoin Basics Workshop CBP Prep [Free Workshop Extras – See Description]

0
Crypto Security: Passwords and Authentication – Livestream aantonop

Crypto Security: Passwords and Authentication – Livestream aantonop

0
Bitcoin for Beginners: Bitcoin Explained in Simple Terms

Bitcoin for Beginners: Bitcoin Explained in Simple Terms

0
Best Websites To Buy Gift Card With Cryptocurrency 2023

Best Websites To Buy Gift Card With Cryptocurrency 2023

September 25, 2023
Prices for Cobalt Used in Electric Vehicle Batteries Crash Following Oversupply from Miners

Prices for Cobalt Used in Electric Vehicle Batteries Crash Following Oversupply from Miners

September 25, 2023
Ethereum Name Service Price Prediction for Today, September 24 – ENS Technical Analysis

Ethereum Name Service Price Prediction for Today, September 24 – ENS Technical Analysis

September 25, 2023
Where Can You Do Online Shopping With Bitcoin In 2023

Where Can You Do Online Shopping With Bitcoin In 2023

September 25, 2023

Recent News

Best Websites To Buy Gift Card With Cryptocurrency 2023

Best Websites To Buy Gift Card With Cryptocurrency 2023

September 25, 2023
Prices for Cobalt Used in Electric Vehicle Batteries Crash Following Oversupply from Miners

Prices for Cobalt Used in Electric Vehicle Batteries Crash Following Oversupply from Miners

September 25, 2023
Ethereum Name Service Price Prediction for Today, September 24 – ENS Technical Analysis

Ethereum Name Service Price Prediction for Today, September 24 – ENS Technical Analysis

September 25, 2023
Where Can You Do Online Shopping With Bitcoin In 2023

Where Can You Do Online Shopping With Bitcoin In 2023

September 25, 2023
coinmarketcap.yt

© 2022 All Rights Reserved coinmarketcap.yt

Navigate Site

  • Home
  • Bitcoin
  • Blockchain
  • Ethereum
  • Market
  • Videos
  • Tools
  • Bridges
  • Privacy Policy
  • Contact Us

No Result
View All Result
  • Home
  • Bitcoin
  • Blockchain
  • Ethereum
  • Market
  • Videos
  • Tools
  • Bridges
  • Privacy Policy
  • Contact Us

© 2022 All Rights Reserved coinmarketcap.yt