top of page

Search Results

5340 éléments trouvés pour «  »

  • Programming Assignment: Blockchain

    In this assignment you will implement a node that’s part of a block-chain-based distributed consensus protocol. Specifically, your code will receive incoming transactions and blocks and maintain an updated block chain. Files provided: Files to be used from Assignment 1: TxHandler.java: Create a public function getUTXOPool() in the TxHandler.java file you have created for assignment 1 and copy the file to your code for assignment 3. When grading your code, we will run it with our reference TxHandler.java. File to be modified: BlockChain.java The BlockChain class is responsible for maintaining a block chain. Since the entire block chain could be huge in size, you should only keep around the most recent blocks. The exact number to store is up to your design, as long as you’re able to implement all the API functions. Since there can be (multiple) forks, blocks form a tree rather than a list. Your design should take this into account. You have to maintain a UTXO pool corresponding to every block on top of which a new block might be created. Assumptions and hints: A new genesis block won’t be mined. If you receive a block which claims to be a genesis block (parent is a null hash) in the addBlock(Block b) function, you can return false. If there are multiple blocks at the same height, return the oldest block in getMaxHeightBlock() function. Assume for simplicity that a coinbase transaction of a block is available to be spent in the next block mined on top of it. (This is contrary to the actual Bitcoin protocol when there is a “maturity” period of 100 confirmations before it can be spent). Maintain only one global Transaction Pool for the block chain and keep adding transactions to it on receiving transactions and remove transactions from it if a new block is received or created. It’s okay if some transactions get dropped during a block chain reorganization, i.e., when a side branch becomes the new longest branch. Specifically, transactions present in the original main branch (and thus removed from the transaction pool) but absent in the side branch might get lost. The coinbase value is kept constant at 25 bitcoins whereas in reality it halves roughly every 4 years and is currently 12.5 BTC. When checking for validity of a newly received block, just checking if the transactions form a valid set is enough. The set need not be a maximum possible set of transactions. Also, you needn’t do any proof-of-work checks. Assignment files can be found found Below

  • Week 7: Community, Politics and Regulation

    We'll look at all the ways that the world of Bitcoin and cryptocurrency technology touches the world of people. We'll discuss the community, politics within Bitcoin and the way that Bitcoin interacts with politics, and law enforcement and regulation issues.

  • Reading: Course syllabus

    Version Control In this course, you will learn about how modern software developers collaborate across the world without messing up each other's code. You will look at the different version control systems and how to create an effective software development workflow. You will be introduced to some of the most commonly used Linux commands that you can use to work with files on your hard drive and create powerful workflows that will automate your work, saving you time and effort. Finally, you will see how Git can be used in software development projects to manage team files, you will create a repository that can manage code revisions. After completing this course, you will be able to: Implement Version Control systems. Navigate and configure using the command line. Manage code revisions. Create and use a GitHub repository. The modules and resources that you will work through and explore in this course will help you to prepare for the Exam: Below is an outline of the modules that will be covered in this course: Module 1: Software Collaboration In this module, you will learn about using version control or subversion to bring order to the chaos of massive software projects that have the potential for mistakes and bugs. You will look at the different version control systems and how to create an effective software development workflow. After completing this module, you will be able to: Describe how modern software teams collaborate and work on the same codebase. List different version control systems and methodologies. Illustrate a standard software development workflow. Module 2: Command Line In this module, you will learn how to use the command line to execute commands in Linux. You will be introduced to some of the most commonly used commands that traverse, create, rename, and delete files on your hard drive. You will learn how easy it is to use piping and redirection to create powerful workflows that will automate your work, saving you time and effort. After completing this module, you will be able to: Describe how the command line is and how it is used. Practice traversing your hard drive via the command line. Create, rename and delete files and folders on your hard drive using Unix commands. Use pipes and redirection. Module 3: Git This module will help you to develop a strong conceptual understanding of the Git technology and how it is used in software development projects to manage team files. You will install Git, create a local repository, create a commit, create a remote repository and push commits to a remote repository. After completing this module, you will be able to: Outline the Git principles. Use a GitHub repository. Describe the steps in a standard GitHub workflow. Create branches and merge different branches and sources. Describe how code goes from local development to version control and then to live production. Module 4: Graded Assessment In the final module, you'll learn about the graded assessment. After you complete the individual units in this module, you'll synthesize the skills you gained from the course to manage a project on GitHub. You'll also have to opportunity to reflect on the course content and the learning path that lies ahead. After completing this module, you will be able to: Recap on all of the topics covered throughout the course. Apply all the skills you have learned in a graded project. Practical Exercises We encourage you to complete the practical exercises in this course. By completing these exercises you will have a more practical understanding of how to explore Version Control.

  • Reading: Systems of version control and tools

    As you know by now, version control is a system that records changes to a file or set of files over time so that you can access specific versions later. In software development, Version Control Systems (VCS) allows developers to manage changes to their code and track who made each change. But how did this software come about? Version Control has a long history going back to the 1980s. In fact, version control systems were created before the Internet! One of the first significant Version Control Systems was the Concurrent Versions System (CVS). It was first developed in 1986 by Walter F. Tichy at Purdue University and released publicly in 1990. CVS stores information about every file in a folder structure, including the name of the file, its location in the folder structure, who last modified it, and when it was last modified. The CVS also stores information about folders, including their names and who created them. It was popular for many years; however, it has some significant flaws in its design. CVS does not include integrity checks which means your data can become corrupted. When you update or submit changes to the system, if an error occurs, the system accepts the partial or corrupted files. Additionally, the system was designed mainly for text files, not binary files such as images or videos. The main successor to CVS was Subversion (SVN). CollabNet developed Subversion in 2000 and solved many of the issues present in CVS. To ensure data integrity, it included integrity checks in its design. It also supported the versioning of binary files better than CVS. Thanks to these improvements, SVN became popular in the open-source community with free hosting being offered for open-source projects by Google and SourceForge. However, Subversion used a centralized VCS model. This means that all operations have to be done using a centralized server. If the server were down or slow, this would impede development. In 2005, two new projects were started to develop distributed version control systems; Mercurial and Git. Both projects were created in response to an event involving the Linux kernel development. Previously, the Linux kernel was using a proprietary VCS known as BitKeeper. BitKeeper was one of the first distributed version control systems initially released in 2000. BitKeeper had originally provided a free license to Linus Torvalds to support Linux’s development. However, in 2005, the license was revoked. This controversy led to the creation of the Mercurial and Git projects. Mercurial was developed by Olivia Mackal. It is developed as a high-performance distributed VCS. Many platforms offering Subversion hosting began to offer Mercurial hosting too. It became popular as Subversion users found it easy to transition to a Mercurial repository, thanks to the hosting providers and its small learning curve. Git was developed by Linus Torvalds to host the Linux kernel’s source code. Like Mercurial, it is a distributed VCS. Its first public release came in 2007. Git became popular in the open-source community due to its distributed VCS design and Github offering free Git hosting for open-source projects. Git has since become the selected version control system for many open-source and proprietary software projects.

  • Survey: Module Quiz: Software collaboration

    Duration: 15 minutes Total points: 5 Read Edcent Honor Code Click Complete to take the quiz.

  • Reading: Using Bash on Mac Terminal

    Learning Objectives Learners will understand how to open the command line - terminal on mac Learners will become familiar with the most common commands. Mac Terminal The Terminal on Mac can be open in one of three ways, Finder, Launch Pad and Spotlight. Finder Scroll to the bottom on your desktop and click on the Finder icon Click on Applications on the left hand side Locate the folder called Utilities and expand it The Terminal app should be visible, click it to open Launch Pad Press the F4 command Launch Pad view will appear In the search bar, click it and type the word Term - short for terminal The Terminal icon will appear on screen Click to open Spotlight Press the Command Key and the Space Bar The Spotlight modal will appear Type in the word Terminal or Term for short The Terminal icon will appear Click to open Bash commands Bash provides a list of commands that helps you navigate through files, view contents of files and also edit features to change or update the contents of a file. Below is a list of the most common commands: Flags Every bash command has flags which will allow you to change the output of the command itself. For example, the ls command is used to print out the list of contents inside a directory. If we wanted to show the list in a different view, we simply need to add a flag such as -l. When the flag of -l is passed it will show the output in a different way: Man Pages When first starting to learn commands from bash it can feel a bit dauting. Luckily every command comes with its own manual or man pages for short. The man page will list all the flags and options that a particular command has to offer. Again, lets use the ls command to demonstrate this. Type the following: The man pages are a great way to recall the different flags that are available and a great tool in your arsenal to becoming more fluent in bash. Editing To edit files in bash you have quiet a few options. The most common though is usually VI or Vim. VI stands for visual editor and it allows you to make edits and changes to a file and save them. Its very similar to what you may have used in applications like word. VIM is a better version of VI with some improvements - hense its name visual editor improved. Learning the different commands in Vim will feel a bit different coming from GUI applications but once you practice it will feel like second nature. Vim uses modes to determine the commands you can work with: Normal mode: Default mode Insert mode: Allows the contents of the files to be edited. Command line mode: Normal commands begin with :

  • Self review: Make and change directories and files

    Duration: 10 minutes Total points: 4 Read Edcent Honor Code Click Complete to take the quiz.

  • Survey: Self review: Make and change directories and files

    Duration: 10 minutes Total points: 4 Read Edcent Honor Code Click Complete to take the quiz.

bottom of page