He will briefly cover infrastructure of the Ethereum platform, smart contract execution principles including the "gas economics".
High-level programming language for smart contracts Solidity will be presented with practical examples.
In the conclusion we will speak about common problems that could be solved in our society using smart contracts, and why it is worth to learn smart contract programming now.
Anatoly is a Senior Software Developer at C.T.Co, Co-founder at AssistUnion, Board Member of Latvian Blockchain Association. He is a TSI ex-lecturer with more than a decade experience in teaching functional and logic programming and compiler design. Anatoly is a crypto-currency and blockchain enthusiast since 2011
What is the promise of smart contracts? How is their development different from software engineering? What practices should one adopt if becoming a smart contracts engineer?
Ever wondered how a blockchain works. What about bitcoin?
It's very interesting that a lot of engineering tricks have been used there that you don't find in system at large. Let's dig in...
What is the promise of smart contracts? How is their development different from software engineering? What practices should one adopt if becoming a smart contracts engineer?
Ever wondered how a blockchain works. What about bitcoin?
It's very interesting that a lot of engineering tricks have been used there that you don't find in system at large. Let's dig in...
Introduction into blockchains and cryptocurrenciesSergey Ivliev
Slides from my intro course:
- mapping the digital asset ecosystem (as of August 2019)
- how bitcoin works - step-by-step primer?
- hashrate, dollar value transferred, transaction rate and other metrics (as of August 2019)
- hard money, uncorrelated asset and other use cases
- proof-of-stake and proof-of-identity
- horizontal and vertical scaling
- how ethereum smart contracts work?
- ERC20 token standard
- boom and bust of the ICO market (as of August 2019)
- intro into #DeFI (as of August 2019)
- stablecoins
- MarkerDAO, Compound, Uniswap and other cool decentralized finance protocols
- Cryptokitties, Storj, Peepeth and examples of non-financial dapps
A short seminar presentation on the technical background of Bitcoins. Some basic concepts behind bitcoin addresses are discussed. An overview on the concepts of transactions and blocks is given.
* Présentation du concept Ethereum
* Comment acheter des ether
* Mettre un place un account/wallet avec mist
* Comment sécuriser ses ether
* Introduction au minage dans un pool
* Tour de table pour les prochains meetup
MAC (메시지 인증 코드)
무결성 : 공격자는 비밀 키가 필요하기 때문에 데이터를 수정 한 다음 새 MAC을 계산할 수 없습니다.
인증 : 비밀 키를 가지고있는 사용자 만 메시지를 인증 할 수 있습니다.
대칭 암호화
기밀성 : 데이터가 암호화 됨
인증 : 2 명의 사용자 만이 비밀 키를 공유합니다.
갈로 아 / 카운터 모드 (GCM)는 관련 데이터로 인증 된 암호화입니다.
GCM은 블록 크기가 128 비트 인 승인 된 대칭 키 블록 암호로 구성됩니다.
GCM은 NIST Special Publication 800-38D에 정의 된 범용 해시 기능을 사용하여 기밀 데이터의 신뢰성을 보장합니다.
인증 된 암호화 솔루션
암호화
블록 암호 AES의 사용
CTR과 유사한 운영 모드
인증
제공된 MAC은 일종의 키순 요약(다이제스트)입니다.
인증 만 제공 할 수 있습니다 → GMAC
기밀성과 무결성에 사용
메시지의 암호화되지 않은 선택적 부분 (예 : 네트워크 패킷 헤더)이있을 수 있습니다.
무결성 검사 값 (ICV)은 암호문 (일반 텍스트가 아님)에 대해 계산됩니다. DoS (Denial of Service) 공격 대응으로 네트워크 트래픽 보호에 효과적입니다.
기밀 유지 및 무결성을위한 가장 빠른 모드
이 모드에 대한 특수 Intel 및 AMD 프로세서 어셈블러 명령 (PCLMULQDQ)
길이 확장 공격 보호
무결성 검사를 위해 약한 키가있을 수 있음
매우 빠른 속도, 10Gbps 이상
소프트웨어 및 하드웨어로 구현하기 쉽습니다.
원하는 경우에만 인증에 사용할 수 있습니다.
128 비트로 최적화 된 AES 용으로 설계되었습니다.
96 비트에 최적화 된 임의 길이 IV.
인증 및 암호화를위한 단 하나의 키.
지적 재산권 금지.
Gctr와 ghash 합친 상태이다.
0의 128승 초기 비트이며, IV or n 형식의 카운트형식으로 계속 간다.
거기에 Ghash을 값을 섞어 위와 같은 그림을 볼 수 있다.
앞에와 비슷하지만 해쉬함수의 초기벡터 0의 32승이 포함된 모습을 볼 수 있고,
authentication tag(TAG) 을 통해 인증할 수 있는 것이 추가되었다.
1. H = CIPHK (0128)라고합시다.
2. 다음과 같이 블록 J0을 정의하십시오.
len (IV) = 96이라면, J0 = IV || 031 || 1.
len (IV) ≠ 96이라면 s = 128 [len (IV) / 128] -len (IV)이라고하고,
J0 = GHASHH (IV || 0s + 64 || [len (IV)] 64).
3. C = GCTRK (inc32 (J0), P)
4. u = 128이면, [len (C) / 128] -len (C) 및 v = 128로한다. [len (A) / 128] -len (A)
5. 다음과 같이 블록 S를 정의하십시오.
S = GHASHH (A || 0v || C || 0u || [len (A)] 64 || [len (C)] 64).
6. T = MSBt (GCTRK (J0, S))
7. Return (C, T)
References
Morris Dworkin, “Recommendation for Block Cipher Modes of Operation: Galois/Counter Mode (GCM) and GMAC”, NIST, 2007
David A. McGrew, John Viega, “The Galois/Counter Mode of Operation (GCM)”,
Sharon S. Keller, Timothy A. Hall, “The Galois/Counter Mode (GCM) and GMAC Validation System (GCMVS) with the Addition of XPN Validation Testing”, National Institute of Standards and Technology, 2016
Vidder,"Galois/Counter Mode (GCM) and GMAC",youtube,2016
Hands-on introduction to blockchain technologies.
First, basic concepts as peer-to-peer networks, mining and distributed consens are introduced basd on the Bitcoin protocol. Next smart contracts are discussed for the Ethereum protocol and demonstrated using a local/private blockchain.
The session concludes with a live demo of the interaction of a Java based classical business application with a smart contract running in the Ethereum network.
The goal of the session is to provide a meaningful background of blockchain technologies in genral and to enable developers to start exploring Ethereum and smart contracts within a few hours.
The proposed development setup is oriented towards Java developers and contains Docker images for the Geth and TestRPC Ethereum clients that can be run locally. To access Ethereum from Java the web3j Java library is used. The business application that integrates with the smart contracts is built with the Eclipse Scout framework.
Slides have been created by @ZimMatthias for the JUG Switzerland session on May 22, 2017 https://www.jug.ch/html/events/2017/blockchain_ethereum.html
The speaker share his vision on the prospects of employing the technology for practical tasks. He presented basics of the blockchain architecture with case studies of JavaScript blockchain implementation using Node.js.
This presentation by Valerii Radchenko (Senior Software Engineer, Consultant, GlobalLogic, Kharkiv) was delivered at GlobalLogic Kharkiv JS TechTalk #2 on August 17, 2018.
Introduction into blockchains and cryptocurrenciesSergey Ivliev
Slides from my intro course:
- mapping the digital asset ecosystem (as of August 2019)
- how bitcoin works - step-by-step primer?
- hashrate, dollar value transferred, transaction rate and other metrics (as of August 2019)
- hard money, uncorrelated asset and other use cases
- proof-of-stake and proof-of-identity
- horizontal and vertical scaling
- how ethereum smart contracts work?
- ERC20 token standard
- boom and bust of the ICO market (as of August 2019)
- intro into #DeFI (as of August 2019)
- stablecoins
- MarkerDAO, Compound, Uniswap and other cool decentralized finance protocols
- Cryptokitties, Storj, Peepeth and examples of non-financial dapps
A short seminar presentation on the technical background of Bitcoins. Some basic concepts behind bitcoin addresses are discussed. An overview on the concepts of transactions and blocks is given.
* Présentation du concept Ethereum
* Comment acheter des ether
* Mettre un place un account/wallet avec mist
* Comment sécuriser ses ether
* Introduction au minage dans un pool
* Tour de table pour les prochains meetup
MAC (메시지 인증 코드)
무결성 : 공격자는 비밀 키가 필요하기 때문에 데이터를 수정 한 다음 새 MAC을 계산할 수 없습니다.
인증 : 비밀 키를 가지고있는 사용자 만 메시지를 인증 할 수 있습니다.
대칭 암호화
기밀성 : 데이터가 암호화 됨
인증 : 2 명의 사용자 만이 비밀 키를 공유합니다.
갈로 아 / 카운터 모드 (GCM)는 관련 데이터로 인증 된 암호화입니다.
GCM은 블록 크기가 128 비트 인 승인 된 대칭 키 블록 암호로 구성됩니다.
GCM은 NIST Special Publication 800-38D에 정의 된 범용 해시 기능을 사용하여 기밀 데이터의 신뢰성을 보장합니다.
인증 된 암호화 솔루션
암호화
블록 암호 AES의 사용
CTR과 유사한 운영 모드
인증
제공된 MAC은 일종의 키순 요약(다이제스트)입니다.
인증 만 제공 할 수 있습니다 → GMAC
기밀성과 무결성에 사용
메시지의 암호화되지 않은 선택적 부분 (예 : 네트워크 패킷 헤더)이있을 수 있습니다.
무결성 검사 값 (ICV)은 암호문 (일반 텍스트가 아님)에 대해 계산됩니다. DoS (Denial of Service) 공격 대응으로 네트워크 트래픽 보호에 효과적입니다.
기밀 유지 및 무결성을위한 가장 빠른 모드
이 모드에 대한 특수 Intel 및 AMD 프로세서 어셈블러 명령 (PCLMULQDQ)
길이 확장 공격 보호
무결성 검사를 위해 약한 키가있을 수 있음
매우 빠른 속도, 10Gbps 이상
소프트웨어 및 하드웨어로 구현하기 쉽습니다.
원하는 경우에만 인증에 사용할 수 있습니다.
128 비트로 최적화 된 AES 용으로 설계되었습니다.
96 비트에 최적화 된 임의 길이 IV.
인증 및 암호화를위한 단 하나의 키.
지적 재산권 금지.
Gctr와 ghash 합친 상태이다.
0의 128승 초기 비트이며, IV or n 형식의 카운트형식으로 계속 간다.
거기에 Ghash을 값을 섞어 위와 같은 그림을 볼 수 있다.
앞에와 비슷하지만 해쉬함수의 초기벡터 0의 32승이 포함된 모습을 볼 수 있고,
authentication tag(TAG) 을 통해 인증할 수 있는 것이 추가되었다.
1. H = CIPHK (0128)라고합시다.
2. 다음과 같이 블록 J0을 정의하십시오.
len (IV) = 96이라면, J0 = IV || 031 || 1.
len (IV) ≠ 96이라면 s = 128 [len (IV) / 128] -len (IV)이라고하고,
J0 = GHASHH (IV || 0s + 64 || [len (IV)] 64).
3. C = GCTRK (inc32 (J0), P)
4. u = 128이면, [len (C) / 128] -len (C) 및 v = 128로한다. [len (A) / 128] -len (A)
5. 다음과 같이 블록 S를 정의하십시오.
S = GHASHH (A || 0v || C || 0u || [len (A)] 64 || [len (C)] 64).
6. T = MSBt (GCTRK (J0, S))
7. Return (C, T)
References
Morris Dworkin, “Recommendation for Block Cipher Modes of Operation: Galois/Counter Mode (GCM) and GMAC”, NIST, 2007
David A. McGrew, John Viega, “The Galois/Counter Mode of Operation (GCM)”,
Sharon S. Keller, Timothy A. Hall, “The Galois/Counter Mode (GCM) and GMAC Validation System (GCMVS) with the Addition of XPN Validation Testing”, National Institute of Standards and Technology, 2016
Vidder,"Galois/Counter Mode (GCM) and GMAC",youtube,2016
Hands-on introduction to blockchain technologies.
First, basic concepts as peer-to-peer networks, mining and distributed consens are introduced basd on the Bitcoin protocol. Next smart contracts are discussed for the Ethereum protocol and demonstrated using a local/private blockchain.
The session concludes with a live demo of the interaction of a Java based classical business application with a smart contract running in the Ethereum network.
The goal of the session is to provide a meaningful background of blockchain technologies in genral and to enable developers to start exploring Ethereum and smart contracts within a few hours.
The proposed development setup is oriented towards Java developers and contains Docker images for the Geth and TestRPC Ethereum clients that can be run locally. To access Ethereum from Java the web3j Java library is used. The business application that integrates with the smart contracts is built with the Eclipse Scout framework.
Slides have been created by @ZimMatthias for the JUG Switzerland session on May 22, 2017 https://www.jug.ch/html/events/2017/blockchain_ethereum.html
The speaker share his vision on the prospects of employing the technology for practical tasks. He presented basics of the blockchain architecture with case studies of JavaScript blockchain implementation using Node.js.
This presentation by Valerii Radchenko (Senior Software Engineer, Consultant, GlobalLogic, Kharkiv) was delivered at GlobalLogic Kharkiv JS TechTalk #2 on August 17, 2018.
Bitcoin has brought about a true revolution in how we think about money. In one fell stroke it solved the main problems that afflicted previous attempts at a truly digital currency: distributed consensus, double spending, and external attacks. Perhaps more importantly, it provided the first working version of a blockchain or distributed ledger. However, despite their relative simplicity, the underlying concepts on which these technologies are built are not well known and often obscured by hype and technical jargon.
Since the days of Bitcoin’s founding, many other crypto-currencies have been proposed and released. This tutorial will introduce these technologies in an intuitive way for data scientists, explaining their driving algorithms, motivations, and data structures.
The Ethereum Blockchain - Introduction to Smart Contracts and Decentralized A...Alessandro Sanino
This set of slides is about Ethereum Blockchain and and introduction to Ethereum Smart Contracts. Arguments covered:
- Ethereum chain
- Ethereum nodes
- Solidity language
- Truffle suite
- Dapps development principles
Presentation of 05/30/2019 in University of Turin
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
In this insightful webinar, Inflectra explores how artificial intelligence (AI) is transforming software development and testing. Discover how AI-powered tools are revolutionizing every stage of the software development lifecycle (SDLC), from design and prototyping to testing, deployment, and monitoring.
Learn about:
• The Future of Testing: How AI is shifting testing towards verification, analysis, and higher-level skills, while reducing repetitive tasks.
• Test Automation: How AI-powered test case generation, optimization, and self-healing tests are making testing more efficient and effective.
• Visual Testing: Explore the emerging capabilities of AI in visual testing and how it's set to revolutionize UI verification.
• Inflectra's AI Solutions: See demonstrations of Inflectra's cutting-edge AI tools like the ChatGPT plugin and Azure Open AI platform, designed to streamline your testing process.
Whether you're a developer, tester, or QA professional, this webinar will give you valuable insights into how AI is shaping the future of software delivery.
Search and Society: Reimagining Information Access for Radical FuturesBhaskar Mitra
The field of Information retrieval (IR) is currently undergoing a transformative shift, at least partly due to the emerging applications of generative AI to information access. In this talk, we will deliberate on the sociotechnical implications of generative AI for information access. We will argue that there is both a critical necessity and an exciting opportunity for the IR community to re-center our research agendas on societal needs while dismantling the artificial separation between the work on fairness, accountability, transparency, and ethics in IR and the rest of IR research. Instead of adopting a reactionary strategy of trying to mitigate potential social harms from emerging technologies, the community should aim to proactively set the research agenda for the kinds of systems we should build inspired by diverse explicitly stated sociotechnical imaginaries. The sociotechnical imaginaries that underpin the design and development of information access technologies needs to be explicitly articulated, and we need to develop theories of change in context of these diverse perspectives. Our guiding future imaginaries must be informed by other academic fields, such as democratic theory and critical theory, and should be co-developed with social science scholars, legal scholars, civil rights and social justice activists, and artists, among others.
Let's dive deeper into the world of ODC! Ricardo Alves (OutSystems) will join us to tell all about the new Data Fabric. After that, Sezen de Bruijn (OutSystems) will get into the details on how to best design a sturdy architecture within ODC.
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
Accelerate your Kubernetes clusters with Varnish Caching
"Programming Smart Contracts on Ethereum" by Anatoly Ressin from AssistUnion at CryptoCurrency focused 54th DevClub.lv
1. Smart Contract Programming
Anatoly Ressin
anatoly@assistunion.com
Senior Software Developer at C.T.Co
board member of Latvian Blockchain Association
co-founder at AssistUnion
2. …an idea
• Bitcoin script language allows
some sophisticated calculations
(verifying conditions) though it
is not Turing-Complete…
• Blockchain system with
embedded Turing-Complete
language would allow to verify
any [computable] condition!
Vitalik Buterin
2013
3. Why do we need custom logic
on blockchain?
• Auctions;
• Lotteries;
• Voting;
• Different kinds of ledgers (tax-statements, land-books…)
• Obligations and rights management;
• Custom crypto-currencies connected to arbitrary
business-processes;
• … [try to imagine more - maybe it’ll be your fresh startup]
4. Most important papers
• Ethereum White paper (by Vitalik Buterin)
• Ethereum Yellow paper (by Gavin Wood)
• formal description of the semantics
5. Accounts
• External — controlled by Private/Public keys
• Public address + Private Key
• Balance
• Contract — controlled by code. Contract has:
• Public address
• Code
• Persistent storage [mapping (256bit => 256bit)]
• Balance
7. Classical problem
• Undecidability
• Time: how many steps are needed to complete
an execution (and whether it completes at all?)
• Space: how many memory it would consume for
the execution.
8. Gas Economics
• Gas is a unit for measuring execution complexity.
• Every OpCode costs well-defined amount of Gas.
• To initiate a transaction, you need to specify
• gas: Amount of Gas you allow to spend for execution;
• gasPrice: how many ethers (wei) you are agree to pay
per 1 gas unit;
• Miners are free to to include transactions into blocks if
gasPrice combined with gas amount is profitable for
them.
9. Meet Solidity
• Object Oriented (Multiple inheritance with
linearization)
• JavaScript inspired
• Statically Typed
• Targets to EVM
by Gavin Wood (!)
10. Example: Mortal.sol
contract mortal {
address owner;
function mortal() {
owner = msg.sender;
}
function kill() {
if (msg.sender == owner) {
selfdestruct(owner);
}
}
} greeter.sol
source code example
11. globals: block, msg, tx
• block.blockhash(uint blockNumber) returns (bytes32): hash of the given block - only works for 256 most
recent blocks excluding current
• block.coinbase (address): current block miner’s address
• block.difficulty (uint): current block difficulty
• block.gaslimit (uint): current block gaslimit
• block.number (uint): current block number
• block.timestamp (uint): current block timestamp
• msg.data (bytes): complete calldata
• msg.gas (uint): remaining gas
• msg.sender (address): sender of the message (current call)
• msg.sig (bytes4): first four bytes of the calldata (i.e. function identifier)
• msg.value (uint): number of wei sent with the message
• now (uint): current block timestamp (alias for block.timestamp)
• tx.gasprice (uint): gas price of the transaction
• tx.origin (address): sender of the transaction (full call chain)
12. Basic data types
• address: account identifier, similar to a 160-bit hash type.
• bool: two-state value.
• uint: 256-bit unsigned integer, operable with bitwise and
unsigned arithmetic operations.
• int: 256-bit signed integer, operable with bitwise and signed
arithmetic operations.
• hash: 256-bit, 32-byte data chunk, indexable into bytes and
operable with bitwise operations.
• string32: zero-terminated ASCII string of maximum length 32-
bytes (256-bit).
14. Reference type location
modifiers
• memory
• storage
• calldata
function (uint[8] memory args) {
…
}
Affects how assignments are performed
(copy if needed to change location)
16. Security considerations
• Avoid sending money from the contract. Allow
users to withdraw it!
• Preferred execution flow on inter-contract
communication:
1. Check preconditions;
2. Modify state;
3. Only then call other contracts.
18. And many-many more…
• Full Solidity language labs;
• ERC20: token standard;
• Different kinds of Voting Schemes;
• DAO;
• Contract verification;
• Web3 and DApps
19. Thank you!
Your questions…
If you are interested in a full Solidity course — drop
me a line: anatoly@assistunion.com