بازگشت Back
جلسات باز نرم افزاری تبریز Tabriz Open Software Sessions رویدادها Events

جلسات باز نرم افزار دوباره در تبریز آغاز به کار کرد : موضوع جلسه اول Blockchain Open Software Sessions in Tabriz Kick Off with Blockchain Focus

احسان عبدی‌پور
احسان عبدی‌پور Ehsan Abdipour
·
جلسات باز نرم افزار دوباره در تبریز آغاز به کار کرد : موضوع جلسه اول Blockchain

جلسات باز نرم‌افزار بستری برای تعامل و به اشتراک‌گذاری دانش بین توسعه‌دهندگان نرم‌افزار شهرمان است که با هدف هم‌افزایی و آشنایی توسعه‌دهندگان با مفاهیم روز حوزه نرم‌افزار به وجود‌ آمده است. این جلسات که برای مدت طولانی در تبریز برگزار نشده بود، در واپسین روز های سال دوباره آغاز به کار کرد. اولین جلسه باز نرم افزاری تبریز در سال ۸۹ برگزار شده بود و به مدت بیش از ۱۵۰ جلسه ادامه یافت.

روز 17 اسفند سال 96 نخستین جلسه از فصل جدید جلسات باز نرم‌افزاری با حضور تعدادی از علاقه مندان برگزار شد. در این جلسه که با موضوع "Blockchain"  برگزار گردید، آقای دکتر فرید دهقان ( تحلیل‌گر داده، توسعه‌دهنده میکروسرویس) و آقای نیما یزدان‌مهر به ارائه مطالب پر داختند. ارائه آقای دکتر دهقان در راستای مفاهیم و مکانیزم بلاکچین‌ها و انواع proof ها و ابزارهای پیاده سازی آن‌ها بود. طی ارتباطی که به صورت آنلاین با آقای یزدان‌مهر برقرار شد، ایشان درباره Hyperledger مطالبی را ارئه کردند.

در ادامه نگاه کوتاهی به مباحث ارائه شده در جلسه اول می پردازیم، در پایان باید اضافه کنیم که جلسات باز نرم افزاری در سال جدید نیز ادامه خواهد داشت. جلسه بعدی در هفته سوم فروردین ماه برگزار خواهد شد که اطلاعات کامل متعاقبا از طریق تبریز آیو اطلاع رسانی خواهد شد.

بلاک‌چین برای جلوگیری از انحصارطلبی سیستم‌هایی مانند سیستم‌های بانکی، سیستم بیمه‌ای، سیستم‌های انتخاباتی یا نظرسنجی و هرگونه سیستم که توسط فردی یا نهادی قابل کنترل یا تغییر باشد، ساخته شده است. همچنین افزایش امنیت داده های موجود در بلاک چین از اهمیت بسیار بالایی برخوردار است. از مزایای دیگر بلاکچین کم کردن مکانیزم‌های اضافه و یکسان‌سازی شرایط است.

در نگه‌داری اطلاعات مالکیت مادی یا معنوی، توزیع امن اطلاعات، اطلاعات تراکنش‌های مختلف، حفظ حریم شخصی داده‌ها، IOT (اینترنت اشیاء) و ... از بلاک‌چین استفاده می شود.

بلاک‌چین در واقع بستری برای توزیع اطلاعات بر روی گره‌های مختلف با مکانیزم‌هایی برای اثبات و حفظ امنیت اطلاعات است.

Hash تابعی درهم‌ساز است که با دریافت داده، مقداری را تولید میکند. هش ها لزوما مقدار یکتا ندارند اما احتمال یکی بودن هش دو بلاک نزدیک به صفر است.

جلسات باز نرم افزار تبریز

Proof of Work

رایج ترین الگوریتم استفاده شده است که ارز دیجیتال بیت کوئین از آن بهره میگیرد. در PoW برای اضافه کردن یک بلوک یک کار با هزینه محاسباتی بالا در نظر گرفته می‌شود. بلوک‌ها در این مدل شامل تراکنش‌ها و hash بلوک قبلی و nonce هستند. هدف در این مکانیزم برای انجام کار با هزینه محاسباتی بالا یافتن nonce به طوری هست که hash کل این بلوک ۲۰ الی ۴۰ صفر در ابتدایش داشته باشد(هر چقدر تعداد صفرهای مورد انتظار در ابتدای Hash زیاد باشد سختی این پردازش بیشتر می‌شود). بعد از یافتن چنین hash هر گره می تواند بلوک را منتشر کند و اگر hash بلوک قبلی درست باشد و مقادیر صفر در hash این بلوک هم با توجه به روش درست باشد. رای‌گیری برای درستی این بلوک انجام ‌می‌شود. اگر بیش از ۵۰ درصد نتیجه رای‌گیری مثبت باشد. بلوک به زنجیره اضافه ‌می‌شود.

این مکانیزم اشکالاتی را به همراه دارد:

1- محاسبات و پردازش های بسیار سنگین PoW باعث مصرف مقدار زیادی انرژی می‌شود(تا سال ۲۰۲۰ میزان برق مصرفی بیت‌کوین معادل مصرف برق کشور دانمارک می‌شود) که آلودگی محیط زیست را به دنبال دارد.

2- هزینه ای بابت استخراج به Miner ها پرداخت میشود. اما به دلیل افزایش سختی عملیات استخراج این عمل صرفه اقتصادی چندانی برای سخت‌افزارهای رایج نخواهد داشت و فقط عده ای محدود که سخت افزار بهینه‌ دارند به عملیات Mining ادامه خواهند داد. در نتیجه نوعی انحصار ایجاد خواهد شد.

Proof of Stake

الگوریتم PoS توسط اتریوم با مکانیزم CASPER " (همان روح مهربان) در حال پیاده‌سازی است. در Validation با الگوریتم PoS، ارزش رای هر node بر اساس مقدار سرمایه آن است. اما نکته‌ حائز اهمیت در هر دو الگوریتم، جلوگیری از انجام 51% عملیات های داخل شبکه توسط یک فرد/دیوایس (Node) است.

اگر فردی سرمایه زیادی را در این الگوریتم داشته باشد پس میتواند امتیاز رای بالاتری هم داشته باشد که خود عیبی برای مجموعه حساب می شود. برای رفع این باگ روشی در نظر گرفته شده است که در صورت تشخیص داده غیر معتبر (invalid Data) - رای اشتباه - آن Node پنالتی شده و ممکن است کل یا قسمتی از سرمایه اش را از دست بدهد. همین راهکار ساده باعث میشود افرادی که سرمایه بیشتری در سیستم دارند، سعی در تقلب کردن نداشته باشند و صرفا افرادی که سرمایه کمتری دارند ریسک تقلب کردن را بپذیرند، اما چون ارزش رای آن ها کم است، پس نمیتوانند تاثیر زیادی در Validation بگذارند. عملیات های انجام شده در PoW و PoS به صورت Real Time انجام نمی گیرند.

در این روش عملیات Mining معنایی ندارد و سرمایه فقط با خرید اتریوم افزایش میابد. تا تاریخ ارائه مطالب اتریوم PoS را عملیاتی نکرده است و همچنان بر بستر PoW فعالیت می‌کند.

این الگوریتم هم مزایا و معایبی دارد. حذف تورم و  حذف مصرف انرژی بالا مزیت آن محسوب می‌شود. اما امکان ثروت اندوزی در داخل سیستم و داشتن حق رای بالا در Validation وجود دارد که عیبی برای این سیستم محسوب می شود.

Proof of Importance

الگوریتم که با جبران نقص های proof قبلی، سعی در بهبود عملکرد دارد. در این الگوریتم علاوه ارزش دهی بر اساس میزان سرمایه، تعداد تراکنش و تاریخ تراکنش ها نیز در بار رای تاثیر گذار است. در این مدل در کنار سرمایه میزان تراکنش‌ها و توزیع سرمایه نیز در اعتبار افراد در مکانیزم‌ رای‌دهی اثر دارد.  ارز دیجیتال Nem بر اساس این الگوریتم طراحی شده است.

Proof of Capacity

این الگوریتم بر اساس اصلاح ایرادات PoW طراحی شده است. همانطور که پیشتر ذکر شد، برای استخراج از PoW نیاز به پردازش های سنگین و زیاد توسط CPU و GPU است که در ادامه استفاده زیاد انرژی و آسیب به محیط زیست را به همراه دارد. در الگوریتم PoC برای استخراج از حافظه ها ( رم و هارد) استفاده می‌شود. در این روش از استخراج نسبت به فضای در اختیار قرار داده شده از رم و هارد، کارمزد استخراج دریافت خواهید کرد. اما الگوریتم یاد شده هم مانند PoW دارای تورم بسیار اندکی است.

اگر تا این لحظه علاقمند به موضوع بلاک چین شده اید، و قصد دارید استارتاپ خودتان را بر بستر بلاک چین راه اندازی کنید. آقای دکتر دهقان پلتفرم هایی را به این منظور معرفی کردند.

Solidity: رایج ترین پلتفرمی که به این منظور استفاده میشود، سالیدیتی است. سالیدیتی که محصول دیگری از ethereum محسوب میشود تا مقدار بسیار زیادی کار گسترش برنامه شما را راحت کرده است. به این منظور فقط کافیست منطق برنامه خود را در داخل این پلتفرم تعریف کنید. برای اجرای مکانیک ها، UI برنامه و ... باید از زبان هایی مانند Meteor و ... استفاده کنید. برای مطالعه ابزارهای توسعه، این نوشته مطالب مفیدی دارد.

یک IDE آنلاین برای توسعه‌ smart contract در بستر solidity را می‌توانید از این لینک پیدا کنید. مستندات توسعه در بستر solidity نیز از این  صفحه می‌توانید مطالعه کنید.

در پایاین ارائه مطالب توسط دکتر دفرید دهقان، بعد از استراحت کوتاهی و نمایش سخنرانی انجام گرفته در TED درباره بلاک چین، آقای یزدان مهر به صورت آنلاین به ما پیوستند و مطالبی مفید در حوزه Hyperledger برای افراد حاضر ارائه کردند. ایشان کدی را در این راستا ارا‌ئه کردند که از این پیوند می‌توانید به آن دسترسی پیدا کنید.

جلسات باز نرم افزار تبریز

در نهایت آغاز مجدد جلسات باز نرم افزار در تبریز را میتوان قدمی مثبت در جهت افزایش سطح دانش و مهارت علاقمندان و فعالان در این عرصه تلقی کرد. امیدواریم برگزاری این جلسات به صورت پیوسته ادامه داشته باشد.

The open software sessions are a platform for interaction and knowledge sharing among software developers in our city, created with the aim of synergy and familiarizing developers with the latest concepts in the software field. These sessions, which had not been held for a long time in Tabriz, resumed in the last days of the year. The first open software session in Tabriz was held in 2009 and continued for over 150 sessions.

On March 8, 2018, the first session of the new season of open software sessions was held with the presence of several enthusiasts. In this session, which was held on the topic of "Blockchain," Dr. Farid Dehghan (data analyst, microservices developer) and Mr. Nima Yazdanmehr presented valuable content. Dr. Dehghan's presentation focused on the concepts and mechanisms of blockchains, types of proofs, and their implementation tools. During an online connection with Mr. Yazdanmehr, he provided insights about Hyperledger.

Next, we will take a brief look at the topics presented in the first session, and we must add that the open software sessions will continue in the new year as well. The next session will be held in the third week of Farvardin, and complete information will be announced later through Tabriz.io.

Blockchain was created to prevent monopolistic systems such as banking systems, insurance systems, electoral systems, or polling systems, and any system that can be controlled or changed by an individual or entity. Additionally, increasing the security of data stored in the blockchain is of utmost importance. Another advantage of blockchain is reducing redundant mechanisms and standardizing conditions.

In maintaining information about material or intellectual property, securely distributing information, transaction data, preserving data privacy, IoT (Internet of Things), etc., blockchain is utilized.

Blockchain is essentially a platform for distributing information across various nodes with mechanisms for proving and maintaining data security.

Hash is a hashing function that produces a value upon receiving data. Hashes do not necessarily have a unique value, but the probability of two blocks having the same hash is close to zero.

Open Software Sessions in Tabriz

Proof of Work

This is the most commonly used algorithm from which the cryptocurrency Bitcoin benefits. In PoW, adding a block involves a task with high computational costs. Blocks in this model include transactions, the hash of the previous block, and a nonce. The goal of this mechanism is to find a nonce such that the hash of the entire block has 20 to 40 leading zeros (the more leading zeros expected in the hash, the harder this process becomes). After finding such a hash, any node can publish the block, and if the hash of the previous block is correct and the number of zeros in the hash of this block is also correct, voting is conducted to verify the correctness of this block. If more than 50 percent of the voting results are positive, the block is added to the chain.

This mechanism has some drawbacks:

1- The heavy computations and processes of PoW consume a large amount of energy (by 2020, the electricity consumption of Bitcoin will be equivalent to that of Denmark), leading to environmental pollution.

2- A fee is paid to miners for extraction. However, due to the increasing difficulty of mining operations, this process will not be economically viable for common hardware, and only a limited number of individuals with optimized hardware will continue mining. As a result, a kind of monopoly will be created.

Proof of Stake

The PoS algorithm is being implemented by Ethereum with the mechanism CASPER (the kind spirit). In validation with the PoS algorithm, the voting power of each node is based on the amount of its investment. However, an important point in both algorithms is to prevent any individual/device (node) from performing 51% of the operations within the network.

If an individual has a large amount of investment in this algorithm, they can also have a higher voting power, which is a flaw for the system. To address this bug, a method has been devised where if invalid data is detected - an incorrect vote - that node is penalized and may lose all or part of its investment. This simple solution ensures that individuals with more investment in the system do not attempt to cheat, while only those with less investment may take the risk of cheating, but since their voting power is low, they cannot have a significant impact on validation. Operations performed in PoW and PoS are not conducted in real-time.

In this method, mining has no meaning, and investment only increases by purchasing Ethereum. As of the date of this presentation, Ethereum has not operationalized PoS and continues to operate on the PoW platform.

This algorithm also has its advantages and disadvantages. Eliminating inflation and reducing high energy consumption are considered its advantages. However, the possibility of wealth accumulation within the system and having high voting rights in validation is a flaw for this system.

Proof of Importance

This algorithm aims to improve performance by compensating for the shortcomings of previous proofs. In this algorithm, in addition to valuing based on the amount of investment, the number of transactions and the history of transactions also influence the voting weight. In this model, alongside investment, the number of transactions and the distribution of investment also affect individuals' credibility in the voting mechanism. The cryptocurrency Nem is designed based on this algorithm.

Proof of Capacity

This algorithm is designed to correct the flaws of PoW. As previously mentioned, mining from PoW requires heavy and extensive processing by CPUs and GPUs, which leads to high energy consumption and environmental damage. In the PoC algorithm, memory (RAM and hard drive) is used for mining. In this method, you will receive a mining fee based on the space provided by RAM and hard drive. However, this mentioned algorithm also has very little inflation like PoW.

If you have become interested in the topic of blockchain by now and intend to launch your startup on the blockchain platform, Dr. Dehghan introduced platforms for this purpose.

Solidity: The most commonly used platform for this purpose is Solidity. Solidity, which is another product of Ethereum, has made it very easy to expand your program. For this purpose, you only need to define the logic of your program within this platform. To implement mechanics, UI of the program, etc., you should use languages like Meteor, etc. For studying development tools, this article has useful information.

You can find an online IDE for developing smart contracts on the Solidity platform from this link. Development documentation on the Solidity platform can also be studied from this page.

At the end of the presentation by Dr. Farid Dehghan, after a short break and showing a TED talk about blockchain, Mr. Yazdanmehr joined us online and provided useful information in the field of Hyperledger for the attendees. He presented a code in this regard, which you can access from this link.

Open Software Sessions in Tabriz

Ultimately, the resumption of open software sessions in Tabriz can be considered a positive step towards increasing the knowledge and skills of enthusiasts and professionals in this field. We hope that these sessions will continue to be held regularly.

برچسب‌ها: Tags: بلاک چینبلاکچینتبریزجلسات بازجلسات باز نرم افزارجلسات باز نرم افزاری تبریزرویداد های تبریز

دیدگاه‌ها Comments 4

عپ
علیرضا پورعابدین
خیلی خوبه که هنوز جلسات باز نرم‌افزاری توی تبریز برگزار می‌شه.
امیدوارم بتونم یه روز بیام و توی این جلسات شرکت کنم
It's great that software open meetings are still being held in Tabriz.
I hope I can come one day and participate in these meetings.
و
وحید
این جلسات کی برگزار میشه برنامه مشخصی داره ؟ سایت یا کانال اطلاع رسانی داره ؟ When are these meetings held? Is there a specific schedule? Is there a website or a notification channel?
اع
احسان عبدی‌پور
زمان دقیق جلسات از طریق کانال تلگرام Tabriz.io اطلاع رسانی می‌شود. The exact time of the meetings is announced through the Telegram channel Tabriz.io.
هع
هادی عباس پور
میشه لطفا اطلاع رسانی کنین که جلسات بعدی چه زمانی برگزار میشن.ممنون Could you please inform us when the next meetings will be held? Thank you.