Bitcoin Forum
June 27, 2024, 11:57:39 AM
Welcome,
Guest
. Please
login
or
register
.
News
: Latest Bitcoin Core release:
27.0
[
Torrent
]
Home
Help
Search
Login
Register
More
Bitcoin Forum
>
Bitcoin
>
Development & Technical Discussion
>
Wallet software
>
Electrum
>
Understanding Electrum Codes
Pages: [
1
]
« previous topic
next topic »
Print
Author
Topic: Understanding Electrum Codes (Read 525 times)
darylchua
(OP)
Newbie
Offline
Activity: 11
Merit: 0
Understanding Electrum Codes
October 28, 2017, 04:50:09 PM
#1
Hi, I will like to learn in-depth on Electrum's functionalities from the source codes but there isn't much commenting in the .py files.
Will mainly be interested to know:
1. The main .py file to start looking into
2. The functions and a brief description about them
3. How these functions relate to one another
Your help is much appreciated!
achow101
Staff
Legendary
Offline
Activity: 3430
Merit: 6720
Just writing some code
Re: Understanding Electrum Codes
October 28, 2017, 09:42:32 PM
#2
Your questions are extremely broad. There are thousands of functions in Electrum's source code, we can't possibly explain what they all do to you, that is just too much time with little reward. Start from the program entry point:
https://github.com/spesmilo/electrum/blob/master/electrum
and read through it. If you have questions about how something works, ask a specific question, not a super general "explain everything to me" question.
Bitcoin Core contributor |
Tip Me!
|
GitHub
|
GPG Key Fingerprint 0x17565732E08E5E41
darylchua
(OP)
Newbie
Offline
Activity: 11
Merit: 0
Re: Understanding Electrum Codes
October 29, 2017, 02:46:31 AM
#3
Then may I ask on where is the Proof-of-Work functionality that I can look into?
HCP
Legendary
Offline
Activity: 2086
Merit: 4316
<insert witty quote here>
Re: Understanding Electrum Codes
October 29, 2017, 11:41:30 AM
#4
Proof of work? Electrum is a light weight SPV wallet... It doesn't do block validation etc. It leaves all the "heavy lifting" to Electrum servers (which generally rely on Bitcoin Core to download and verify the blockchain)
The is some block header validation of that's what you mean:
https://github.com/spesmilo/electrum/blob/master/lib/blockchain.py
█████████████████████████
████
▐██▄
█████████████████
████
▐████
██
▄▄▄
███████████
████
▐████▄█████▄▄
████████
████
▐█████▀▀▀▀▀███▄
██████
████
▐███▀
███████
████
█████
████
▐███
██
██
██
▄█████▌
████
████
▐██▌
█████
▀██████▌
████
████
▐███
███████
▀████▌
████
█████
▀███▄
█████
▄███▀
█████
███████
▀█████████▀
███████
██████████
▀███▀
██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄
████████
▄▄▄
▀
██████████████
█████░░▄▄▄▄
████████
▄▄▄▄▄▄▄▄▄
██
▄█
█
█
█████
▄▄▄▄
████
▄██
█
█
█▄█▄▄████████
██
▄█
█
███▄
████
██
███████████████████████
██▀
███
▀████▄██▄██▄░░░░▄
██████
███
███
▀▀▀█████▄▄▄████
█████
██▀
██
███
██
███████
████
███▀
██
██
███
██████████
████▄
██
▄██
████
███████
█
████
██▄
██
███
██
██
████████
█
█████
█▀
██
██████████████████████▄
.
..
CASINO
.
.
..
SPORTS
..
.
.
RACING
..
█░
░░░░
░█░
░░░░
░█
▀███▀░░▀███▀░░▀███▀
▀░▀
░░░░
▀░▀
░░░░
▀░▀
▄
░░░░░░░░░░░░
▀██████████
░░░░░
███
░░░░
▀
░░█
░░░
███▄█
░░░
█
░░██▌
░░
███░▀
░░
██▌
░█░██
░░
███
░░░
█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄
░░░
██▄███▄█▄
░░
▄██▄
▄███▄
░░░░
▀██▄▀
▄▄████▄▄
▄███▀▀███▄
███
████
███
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███
████
▄▄▀▀████▄▄▀▀
████
███
▀███▄▄███▀
░░░
▀▀████▄▄▄███▀
▀▀████▀▀
████████
▀▀████▀▀
WELCOME BONUS
UP TO
5 BTC
darylchua
(OP)
Newbie
Offline
Activity: 11
Merit: 0
Re: Understanding Electrum Codes
October 29, 2017, 04:05:14 PM
#5
Oh thank you so much! I'll look into it!
darylchua
(OP)
Newbie
Offline
Activity: 11
Merit: 0
Re: Understanding Electrum Codes
October 30, 2017, 03:25:36 AM
#6
May I enquire on where I can start with if I want to further optimize Electrum's lightweight performance?
achow101
Staff
Legendary
Offline
Activity: 3430
Merit: 6720
Just writing some code
Re: Understanding Electrum Codes
October 30, 2017, 03:27:13 AM
#7
Quote from: darylchua on October 30, 2017, 03:25:36 AM
May I enquire on where I can start with if I want to further optimize Electrum's lightweight performance?
Performance doing what? Electrum does a lot of things and each has its own "performance". These include things like syncing, network bandwidth, key generation, storage, etc. What kind of performance do you want to optimize?
Bitcoin Core contributor |
Tip Me!
|
GitHub
|
GPG Key Fingerprint 0x17565732E08E5E41
darylchua
(OP)
Newbie
Offline
Activity: 11
Merit: 0
Re: Understanding Electrum Codes
October 30, 2017, 06:33:34 AM
#8
I'd like to focus on the syncing aspect and will greatly appreciate any help in terms of optimising the performance.
My understanding is that the current lightweight client syncs only the block headers (80 bytes) which prevents downloading of the entire blockchain.
However, I'd wanna try further optimising this to make it sync even faster.
darylchua
(OP)
Newbie
Offline
Activity: 11
Merit: 0
Re: Understanding Electrum Codes
November 01, 2017, 05:43:49 PM
#9
Hi, is there any help from anyone regarding my previous message?
Abdussamad
Legendary
Offline
Activity: 3640
Merit: 1571
Re: Understanding Electrum Codes
November 01, 2017, 06:17:40 PM
#10
You can ask in #electrum on freenode. The devs tend to gather there.
jonald_fyookball
Legendary
Offline
Activity: 1302
Merit: 1004
Core dev leaves me neg feedback #abuse #political
Re: Understanding Electrum Codes
November 06, 2017, 07:02:41 PM
#11
Quote from: darylchua on October 30, 2017, 06:33:34 AM
I'd like to focus on the syncing aspect and will greatly appreciate any help in terms of optimising the performance.
My understanding is that the current lightweight client syncs only the block headers (80 bytes) which prevents downloading of the entire blockchain.
However, I'd wanna try further optimising this to make it sync even faster.
lib/network.py
lib/blockchain.py
a good place to start looking
proof LN isn't Decentralized
official Electron Cash wallet
darylchua
(OP)
Newbie
Offline
Activity: 11
Merit: 0
Re: Understanding Electrum Codes
November 12, 2017, 02:28:44 AM
#12
Quote from: jonald_fyookball on November 06, 2017, 07:02:41 PM
Quote from: darylchua on October 30, 2017, 06:33:34 AM
I'd like to focus on the syncing aspect and will greatly appreciate any help in terms of optimising the performance.
My understanding is that the current lightweight client syncs only the block headers (80 bytes) which prevents downloading of the entire blockchain.
However, I'd wanna try further optimising this to make it sync even faster.
lib/network.py
lib/blockchain.py
a good place to start looking
Thanks for the good advice.
I'm now trying to measure the time taken for blockchain_headers to be downloaded during the first sync. However I am unable to find the right place/code to insert into. Do you have any idea on how I can track the time so that I may further optimise it?
jonald_fyookball
Legendary
Offline
Activity: 1302
Merit: 1004
Core dev leaves me neg feedback #abuse #political
Re: Understanding Electrum Codes
November 12, 2017, 05:31:11 AM
#13
not really. its downloaded from here
https://github.com/spesmilo/electrum/blob/0ecb665b95917459d17ef3f9e47bde4864a2e318/lib/network.py#L959
but not sure how to time it
proof LN isn't Decentralized
official Electron Cash wallet
darylchua
(OP)
Newbie
Offline
Activity: 11
Merit: 0
Re: Understanding Electrum Codes
November 12, 2017, 06:02:58 AM
#14
Quote from: jonald_fyookball on November 12, 2017, 05:31:11 AM
not really. its downloaded from here
https://github.com/spesmilo/electrum/blob/0ecb665b95917459d17ef3f9e47bde4864a2e318/lib/network.py#L959
but not sure how to time it
Ok sure thanks alot. I'll try to look into it.
Pages: [
1
]
Print
Bitcoin Forum
>
Bitcoin
>
Development & Technical Discussion
>
Wallet software
>
Electrum
>
Understanding Electrum Codes
« previous topic
next topic »
Jump to:
Please select a destination:
-----------------------------
Bitcoin
-----------------------------
=> Bitcoin Discussion
===> Legal
===> Press
===> Meetups
===> Important Announcements
=> Development & Technical Discussion
===> Wallet software
=====> Electrum
=====> Bitcoin Wallet for Android
=====> BitcoinJ
=====> Armory
=====> Mycelium
=====> Hardware wallets
=> Mining
===> Mining support
===> Pools
===> Mining software (miners)
===> Hardware
=====> Group buys
===> Mining speculation
=> Bitcoin Technical Support
=> Project Development
-----------------------------
Economy
-----------------------------
=> Economics
===> Speculation
=> Marketplace
===> Goods
=====> Computer hardware
=====> Digital goods
=======> Invites & Accounts
=====> Collectibles
===> Services
===> Currency exchange
===> Gambling
=====> Games and rounds
=====> Investor-based games
=====> Gambling discussion
===> Lending
=====> Long-term offers
===> Securities
===> Auctions
===> Service Announcements
=====> Micro Earnings
===> Service Discussion
=====> Web Wallets
=====> Exchanges
=> Trading Discussion
===> Scam Accusations
===> Reputation
-----------------------------
Other
-----------------------------
=> Meta
===> New forum software
===> Bitcoin Wiki
=> Politics & Society
=> Beginners & Help
=> Off-topic
=> Serious discussion
===> Ivory Tower
=> Archival
===> Корзина
===> CPU/GPU Bitcoin mining hardware
===> Chinese students
===> Obsolete (buying)
===> Obsolete (selling)
===> MultiBit
-----------------------------
Alternate cryptocurrencies
-----------------------------
=> Altcoin Discussion
=> Announcements (Altcoins)
===> Tokens (Altcoins)
=> Mining (Altcoins)
===> Pools (Altcoins)
=> Marketplace (Altcoins)
===> Service Announcements (Altcoins)
===> Service Discussion (Altcoins)
===> Bounties (Altcoins)
=> Speculation (Altcoins)
-----------------------------
Local
-----------------------------
=> العربية (Arabic)
===> العملات البديلة (Altcoins)
=====> النقاشات
===> إستفسارات و أسئلة المبتدئين
===> التعدين
===> النقاشات الأخرى
===> منصات التبادل
=> Bahasa Indonesia (Indonesian)
===> Marketplace (Bahasa Indonesia)
===> Mining (Bahasa Indonesia)
===> Altcoins (Bahasa Indonesia)
===> Trading dan Spekulasi
===> Ekonomi, Politik, dan Budaya
===> Topik Lainnya
=> Español (Spanish)
===> Mercado y Economía
=====> Servicios
=====> Trading y especulación
===> Hardware y Minería
===> Esquina Libre
===> Mercadillo
=====> Mexico
=====> Argentina
=====> España
=====> Centroamerica y Caribe
===> Primeros pasos y ayuda
===> Altcoins (criptomonedas alternativas)
=====> Minería de altcoins
=====> Servicios
=====> Tokens (Español)
=> 中文 (Chinese)
===> 跳蚤市场
===> 山寨币
===> 媒体
===> 挖矿
===> 离题万里
=> Hrvatski (Croatian)
===> Trgovina
===> Altcoins (Hrvatski)
=====> Announcements (Hrvatski)
===> Off-topic (Hrvatski)
=> Deutsch (German)
===> Anfänger und Hilfe
===> Mining (Deutsch)
===> Trading und Spekulation
===> Projektentwicklung
===> Off-Topic (Deutsch)
===> Treffen
===> Presse
===> Altcoins (Deutsch)
=====> Announcements (Deutsch)
===> Marktplatz
=====> Auktionen
=====> Suche
=====> Biete
=> Ελληνικά (Greek)
===> Αγορά
===> Mining Discussion (Ελληνικά)
===> Altcoins (Ελληνικά)
=====> Altcoin Announcements (Ελληνικά)
=====> Altcoin Mining (Ελληνικά)
=> עברית (Hebrew)
=> Français
===> Actualité et News
===> Débutants
===> Discussions générales et utilisation du Bitcoin
===> Mining et Hardware
===> Économie et spéculation
===> Place de marché
=====> Échanges
=====> Produits et services
=====> Petites annonces
===> Le Bitcoin et la loi
===> Wiki, documentation et traduction
===> Développement et technique
===> Vos sites et projets
===> Hors-sujet
===> Altcoins (Français)
=====> Annonces
=> India
===> Mining (India)
===> Marketplace (India)
===> Regional Languages (India)
===> Press & News from India
===> Alt Coins (India)
===> Buyer/ Seller Reputations (India)
===> Off-Topic (India)
=> Italiano (Italian)
===> Guide (Italiano)
===> Progetti
===> Discussioni avanzate e sviluppo
===> Trading, analisi e speculazione
===> Mercato
=====> Mercato valute
=====> Beni
=====> Servizi
=====> Esercizi commerciali
=====> Hardware/Mining (Italiano)
=====> Gambling (Italiano)
===> Accuse scam/truffe
===> Mining (Italiano)
===> Alt-Currencies (Italiano)
=====> Annunci
===> Raduni/Meeting (Italiano)
===> Crittografia e decentralizzazione
===> Off-Topic (Italiano)
=> 日本語 (Japanese)
===> アルトコイン
=> Nederlands (Dutch)
===> Markt
===> Gokken/lotterijen
===> Mining (Nederlands)
===> Beurzen
===> Alt Coins (Nederlands)
===> Off-topic (Nederlands)
===> Meetings (Nederlands)
=> Nigeria (Naija)
===> Politics and society (Naija)
===> Off-topic (Naija)
=> 한국어 (Korean)
===> 대체코인 Alt Coins (한국어)
=> Pilipinas
===> Altcoins (Pilipinas)
=====> Altcoin Announcements (Pilipinas)
===> Pamilihan
===> Others (Pilipinas)
=> Polski
===> Tablica ogłoszeń
===> Alternatywne kryptowaluty
=====> Nowe kryptowaluty i tokeny
=====> Tablica ogłoszeń (altcoiny)
=> Português (Portuguese)
===> Primeiros Passos (Iniciantes)
===> Economia & Mercado
===> Mineração em Geral
===> Desenvolvimento & Discussões Técnicas
===> Criptomoedas Alternativas
===> Brasil
===> Portugal
=> Русский (Russian)
===> Новички
===> Бизнес
=====> Барахолка
=====> Обменники
===> Идеи
===> Кодеры
===> Майнеры
===> Политика
===> Трейдеры
===> Альтернативные криптовалюты
=====> Токены
=====> Бayнти и aиpдpoпы
===> Хайпы
===> Работа
===> Разное
===> Oбcyждeниe Bitcoin
=====> Новости
=====> Юристы
=> Română (Romanian)
===> Anunturi importante
===> Offtopic
===> Market
=====> Discutii Servicii
===> Minerit
===> Tutoriale
===> Bine ai venit!
===> Presa
===> Altcoins (Monede Alternative)
=====> Anunturi Monede Alternative
=> Skandinavisk
=> Türkçe (Turkish)
===> Bitcoin Haberleri
===> Pazar Alanı
===> Madencilik
===> Ekonomi
===> Servisler
=====> Fonlar
===> Proje Geliştirme
===> Alternatif Kripto-Paralar
=====> Madencilik (Alternatif Kripto-Paralar)
=====> Duyurular (Alternatif Kripto-Paralar)
===> Konu Dışı
===> Yeni Başlayanlar & Yardım
===> Buluşmalar
=> Other languages/locations
Loading...