警告:您可能成为了企图假冒本网站内容的目标。 我们检测到该网站被IFRAME包裹,这意味着与EOS Canada无关的人试图向您展示他们的内容与我们的内容相关,可能为了让您相信他们与EOS Canada有关。 我们与任何试图这样做的组织都没有联系,它也没有受到我们的认可



WARNING: you may have been the target of an attempt to misrepresent the content of this site. We detected that the site was wrapped in an IFRAME, which means that someone else, not associated with EOS Canada, attempted to show you their content combined in some way with ours, possibly to make you believe they are associated with EOS Canada. We are not associated with, and do not endorse, any organization attempting to do this.
background-flotant-top-right-01

Blog: EOS Block Producer Tips & News

background-flotant-top-left-01

Q&A - How a Wallet Interacts With the EOS Blockchain

April 30, 2018 / by Alexandre Bourget

In our Q&A series, we gather the questions most asked on Telegram, Reddit, Twitter, SteemIt... and try to provide the community with succinct, precise, and technically accurate answers.  

In this episode, Alexandre walks us through how a wallet talks to the EOS blockchain.

Transcription: 
Okay, hi everyone! 
So we've received a few questions about how the wallet interacts with "nodeos." 
"Nodeos" is the "daemon," like the the main blockchain software. It's been called like that, they left it. Whatever. So "nodeos" is the blockchain where you have all the database, and in-memory contracts, and all that. The wallet is also another server --  
(phone rings) woah... Hi Michelle? It's recording… Okay, love you, bye…
Okay back to the wallet. The wallet is another "daemon." It listens on another port and what happens is this. If you want to create a transaction, a transaction is made up of one or many actions, and actions are the operation. Like if you want to transfer funds, the action is "transfer." And if you want to use another contract that votes on presidential candidates, well there's going to be a "vote" action on the contract perhaps, like, "presidential candidate," or something like that. Okay. 
And see, these are two separate actions, and they can be put into one transaction. Actions and transaction. Then you take the transaction, and you ask the blockchain, so "nodeos," we're calling there, first of all, for a few of the latest blocks. Because you want to mark in the transaction what's the few latest blocks you've seen. And that adds to the security of the network. You're vouching for an irreversible block there. 
And also you'll want to ask the blockchain which keys do I need to sign with for that transaction to be valid? So you're asking for the required keys. And then, it'll give you: "oh you need to sign with that key." And now you turn around, and you go query the wallet and you send the transaction, plus the key it needs to sign with. And then the wallet is just going take the transaction, it does not communicate with the outside world. The only thing it does, is it takes
your transaction, signs it, and gives you the signature back with the transaction there. So you can take the signature now and go back to the blockchain and publish it. You just push the transaction that is signed and all the blockchains are going to propagate over there. Everyone's
going to execute the actions, update the internal state of the memory in there, and verify the signature. If the signature is good, then a transaction is accepted. If the signature is not good,
it's going to be refused by the first node so that it never propagates through the network. 
So that's how "nodeos" relates to the wallet. The wallet manages your secret keys, and secret key material. You want that to be very secure. And the blockchain "nodeos" is very public. It can communicate, and you can read, and push transactions. The only 'write' operation on the blockchain is "push transaction." So that's how the database is updated through transactions. 

Topics: Video, Q&A, EOS Wallet, nodeos, EOS Blockchain, Education

Alexandre Bourget

Written by Alexandre Bourget

Alexandre lives through technology. He wrote his first botnet at 12, later graduated in classical piano and went on to a prolific career in software engineering, with notable open source contributions. Alexandre co-founded two startups, including Bitcredits (a bitcoin payments processor, FounderFuel 2014 Spring Cohort). He then helped PasswordBox (acquired by Intel) craft their data stack and ended up as a lead Data Scientist in the Intel Security Consumer division. Today, Alexandre is very active in the blockchain space, advising several early stage companies. Alexandre taught programming for many years. He does live-coding presentations like no one else (Confoo, PyCon conferences) and is the lead organizer of Golang Montréal. You’ll often find him on Telegram, working through lines of code and bugs with others, doing what he can to help build the EOS community.

dfuse - Template Blog Post Thumbnail-5

Building on EOSIO?

Develop your project with dfuse, the most powerful blockchain API.

BUILD NOW

cubes-solid

ABCs of EOS

A glossary of terms that every EOS user should know.

MORE