Saturday, June 2, 2018

How Ethereum Virtual Machine (EVM) works

The diagram below shows the design of the EVM where virtual ROM (right) stores the program code which is copied into main memory by using CODECOPY. Main memory is then read by the EVM by referring to the Program counter and executes instructions step by step. Program counter and EVM stack are updated accordingly with each instruction execution.
EVM is an entirely isolated and sandboxed runtime environment. The code that runs on the EVM does not have access to any external resources such as network or file system.
As discussed above EVM is based on a stack-based architecture. EVM is big endian by design, and it uses 256 bit wide words. This word size allows for Keccak 256 bit hash and Elliptic curve cryptography computations.
There are two types of storage available to contracts and EVM. First is called memory which is a byte array. When a smart contract finishes the code execution, the memory is cleared. It is akin to the concept of RAM. The other type called storage is permanently stored on the blockchain. It is a key-value store. 
Memory is unlimited but constrained by gas fee requirements. The storage associated with the virtual machine is a word addressable word array which is non-volatile and is maintained as part of the system state. Keys and value are 32 bytes in size in storage. The program code is stored in a virtual read-only memory (Virtual ROM) which is accessible by using CODECOPY instruction. CODECOPY instruction is used to copy the program code into main memory. Initially, all storage and memory are set to zero in the EVM.

53 comments:

  1. These days, the speed of mechanical leaps forward has no chronicled point of reference.machine learning course

    ReplyDelete
  2. it was a wonderful chance to visit this kind of site and I am happy to know. thank you so much for giving us a chance to have this opportunity.. windows vps

    ReplyDelete
  3. Wow, What a Excellent post. I really found this to much informatics. It is what i was searching for.I would like to suggest you that please keep sharing such type of info.Thanks comprar criptomoneda ethereum

    ReplyDelete
  4. Hello, this weekend is good for me, since this time i am reading this enormous informative article here at my home. ethereum generator 2020

    ReplyDelete
  5. This comment has been removed by the author.

    ReplyDelete
  6. If you set out to make me think today; mission accomplished! I really like your writing style and how you express your ideas. Thank you. comprar criptomoeda bitcoin brasil

    ReplyDelete
  7. Thanks so much for this information. I have to let you know I concur on several of the points you make here and others may require some further review, but I can see your viewpoint. btc to skrill

    ReplyDelete
  8. This is my first time i visit here. I found so many interesting stuff in your blog especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here keep up the good work crisis económica

    ReplyDelete
  9. Thanks for the blog loaded with so many information. Stopping by your blog helped me to get what I was looking for. 저렴한 도메인 등록

    ReplyDelete
  10. This is highly informatics, crisp and clear. I think that everything has been described in systematic manner so that reader could get maximum information and learn many things. 借錢網

    ReplyDelete
  11. Very good written article. It will be supportive to anyone who utilizes it, including me. Keep doing what you are doing – can’r wait to read more posts. Bitcoin to PayPal

    ReplyDelete
  12. The blog and data is excellent and informative as well Bitmain Antminer K15

    ReplyDelete
  13. Things being what they are, should humankind simply start wrapping up its undertakings, prepared to hand over ourselves to our rising overlords?cyber security course in hyderabad

    ReplyDelete
  14. Buying Bitcoins isn't modest. Furthermore, aside from EBay, purchasing Bitcoins isn't basic or simple; and with the exception of (most likely) EBay, a portion of the Bitcoin merchants appear to be somewhat flaky.bitcoin mixer

    ReplyDelete
  15. Whether it is a manual or electric-driven sewing machine, its versatility encompasses those highly specialized machines for manufacturing purposes. Gebrauchtmaschinenbewertung

    ReplyDelete
  16. I haven’t any word to appreciate this post.....Really i am impressed from this post....the person who create this post it was a great human..thanks for shared this with us. שרת וירטואלי

    ReplyDelete
  17. This is truly a great read for me. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work!. Joe Ephgrave

    ReplyDelete
  18. Hello, this weekend is good for me, since this time i am reading this enormous informative article here at my home. munkagép szállítás Europa-Road Kft

    ReplyDelete
  19. You can design sewing ventures with your hover of sewing companions, and have a ton of fun chipping away at them together.Karen @ Sew Ways

    ReplyDelete
  20. Great content! MintonBlock is a growing blockchain investment firm that provides opportunities and secure access to the digital currency asset class for accredited investors through its proven strategies and diversified portfolio. how to buy and invest in ethereum

    ReplyDelete
  21. The site is looking piece garish and it gets the guests eyes. Outline is really basic and a decent easy to use interface. crypto invest summit USA

    ReplyDelete
  22. I got too much interesting stuff on your blog 홀덤사이트
    . I guess I am not the only one having all the enjoyment here! Keep up the good work 온라인홀덤

    ReplyDelete
  23. Thanks for the blog filled with so many information. Stopping by your blog helped me to get what I was looking for 인싸홀덤
    . Now my task has become as easy as ABC 인싸포커 .

    ReplyDelete
  24. I love it, this site is so easy to navigate through, and easy to get back on track if you find something else you want to explore. Thank you. 바카라카지노

    ReplyDelete
  25. I agree completely with you here. It is a very valuable and helpful collection of blogs. I am trying to gain information from all these. Really helpful post. Thank you!! 모바일바카라

    ReplyDelete
  26. Ӏ’lⅼ love this blog personally and I recⲟmmended it to my friends.
    I’m sure they’ll be benefited from tһis site. 야한동영상

    ReplyDelete
  27. Hi to every one, it’s in fact a nice for me to pay a quick
    visit this website, it consists of important Information.
    한국야동

    ReplyDelete

  28. Thanks for sharing the informative post. If you are looking the Linksys extender setup guidelines . so, we have a best technical expert for handlings your quires. for more information gets touch with us.
    일본야동

    ReplyDelete
  29. GREAT JOB! This blog presents a very valuable information. Keep up the good work! Visit our website too. Thanks! GREAT JOB! This blog presents a very valuable information. Keep up the good work! Visit our website too. Thanks! 야설

    ReplyDelete
  30. You obviopusly know what youre talking about, why throw aaway your intelligence oon just posting videos to your blog when you could be giving us something enlightening too read?
    한국야동

    ReplyDelete
  31. You're so awesome! I don't believe I've read a single thing like that before. So great to discover someone with some genuine thoughts on this topic. Seriously .. thank you for starting this up. This web site is something that is needed on the web, someone with some originality!
    바카라사이트

    ReplyDelete
  32. Hard to ignore such an amazing article like this. You really amazed me with your writing talent. Thank you for sharing again.
    카지노사이트

    ReplyDelete
  33. This is a great inspiring article.I am pretty much pleased with your good work.You put really very helpful information.. 룰렛

    ReplyDelete
  34. It's excellent. You will certainly really feel that your writing is extraordinary even if you check out it. I enjoyed to see your writing as well as my sensations are still remaining. I wish you will certainly be impressed much like me when you see my writing. Would certainly you such as to find and also see my blog post? 바카라사이트

    ReplyDelete
  35. At the time that this article was written, the total bitcoins in circulation was 16,275,288, which means that the percentage of total bitcoins "mined" was 77.5%. at that time. Bitcoin machine near me

    ReplyDelete
  36. I feel very grateful that I read this. It is very helpful and very informative and I really learned a lot from it. Bitmain Antminer E9

    ReplyDelete
  37. Great information. Lucky me I recently found your website by chance (stumbleupon). I have book-marked it for later! 토토사이트

    ReplyDelete

  38. I am impressed by the information that you have on this blog!
    "cyber security course in hyderabad

    ReplyDelete
  39. The content is utmost interesting! I have completely enjoyed reading your points and have come to the conclusion that you are right about many of them. You are great, and your efforts are outstanding! Aesthetic machines

    ReplyDelete
  40. Thinking of consistently foreclosures in florida on the agenda limited if it is bill-paying time? Will them appear to be any take-home pay shrinks plus every single payment evolves astronomically? totalsportsapparel.com

    ReplyDelete
  41. Once again, it is easy to see why this is one of the finest blogs on the entire Internet, keep pumping out the great content! get more details

    ReplyDelete
  42. Its far simpler to just "print more cash" by increasing government rates (yet not to an extreme), get more from the public business sectors against the acquiring force of people in the future, https://bit.ly/3p0p24g

    ReplyDelete
  43. Really appreciate you sharing this post. Really thank you! Keep writing.
    NFT's

    ReplyDelete
  44. I Like your post. It gives more information to us.
    Sex Crimes Lawyer VA

    ReplyDelete
  45. Good post. It's a great warning for users still not taking their online security seriously. I had someone steal $70,000 from me once (crypto). It took me 3 months with the help of WIZESAFETYRECOVERY @ GMAIL COM. and a bunch of stress to finally get it back but it was a learning experience. Ever since then I have had to tighten up my online presence. If anyone reading this has a similar issue, I recommend using them to recover your lost funds.

    ReplyDelete
  46. Hello, I'm Rosa Dankert from Bonn, Germany. I want to share our story of how Spyweb cyber was able to recover our stolen Bitcoins. Some weeks ago, my husband and I saw an opportunity to invest in Bitcoins with huge profit returns, and we invested €197,000 in a cryptocurrency exchange platform, while we continue to be patient as they suggested we put in more money but my husband fell sick and couldn’t work, I tried withdrawing our investment but the platform didn’t allow us and requested we pay 15% of our money before we can withdraw. I was depressed and almost lost my life, but I saw a post about Spyweb on Facebook. I did some research about them and found out they have helped many people recover their money from fake cryptocurrency investments. I contacted Spyweb and was able to recover all my money, Spyweb helped us get our life back. I recommend Spyweb cyber to everyone out there.
    Spyweb@cyberdude.com
    Contact@spyweb.tech

    ReplyDelete

Thrilled to see that my book Mastering blockchain - the third edition is a best-seller at Amazon!  https://www.amazon.com/Mastering-Blockcha...