🍰
Grasshopper ES por BetweenRealities
  • Using and Generating Documentation
    • GitHub
    • Discord
      • Speckle Webhooks
    • Speckle Client
  • Potencial technological implementations
  • 🧞Compute
    • Introducción a Grasshopper
      • Customizar Entorno
        • VSCode
      • Rhinoceros 3d
      • Hops
      • Galapagos
    • Modelos Informados
      • Comportamiento Estructural
        • Automatizar cálculo Python
      • OOP
      • Rhino Inside Revit
        • Revit
          • Modelado 3d en Revit
          • Certificación profesional Revit
      • Energía
    • Procesos Urbanos
      • Automatizar Qgis
      • Librerías Python
      • Librerías Grasshopper
      • Stable Diffusion
    • Programación
      • RhinoPython
        • Anatomía del script
        • Python básico
        • Tuples, listas y diccionarios
        • Operadores y funciones
        • Ejecución condicional
        • Geometría
        • Clases
      • Multithread
  • 🪅Database
    • Lenguaje Python
      • Types and operations
      • Statements and syntax
      • Function and generators
      • Modules and packages
      • Classes and OPP
      • Exception and tools
      • Advance topics
    • Análisis de la Información
      • Comparison with SQL
      • Comparison with R / R libraries
      • Pandas
    • Abrir Acceso
      • Rest API Abierta
    • Blockchain Descentralización
  • 🕸️COLLECT
    • Captura de Datos
      • Raspberry Pi
        • Encendido y apagado automático
      • Arduino
      • UAS
      • Fotogrametría
        • Crashes
    • Técnicas Machine Learning
      • Clasificación
      • Computer Vision
    • Computación en la Nube
      • Contenedores
      • Azure
      • Ubuntu Server Deploy
      • PostgreSQL Server
      • Rhino Compute Deploy
  • 🍭INTERACT
    • Introducción a Unreal Engine
      • Ejecutar Python
      • Datasmith
      • Materiales
        • Crear PBR
        • Materiales Introducción
      • Iluminación
        • Iluminación Introducción
        • Raytraced Iluminación Cinemática
      • Assets Management
    • Interacción Inmersiva
      • Blueprints
        • Blueprints estandar
        • Blueprints Introducción
        • Diseño Nivel
      • Packaging
      • Performance
    • Interfaces Bidimensionales
Con tecnología de GitBook
En esta página
  • Blockchain and databases
  • Añadir información a la blockchain ETH con Python

¿Te fue útil?

  1. Database

Blockchain Descentralización

Blockchain and databases

A blockchain is a distributed database that is used to store and manage records or transactions. It is called a "blockchain" because it consists of a series of blocks that are linked together using cryptography.

A traditional database is typically managed by a single entity, such as a company or organization. In contrast, a blockchain is managed by a network of multiple parties, who jointly maintain and update the database.

One key difference between a blockchain and a traditional database is that a blockchain is decentralized and distributed, while a traditional database is centralized and controlled by a single entity. This means that a blockchain is not subject to the same risks of failure or single point of failure as a traditional database.

Another key difference is that a blockchain is immutable and transparent, while a traditional database can be modified or updated by the entity that controls it. This means that a blockchain provides a tamper-evident and auditable record of transactions, while a traditional database may not have the same level of security and integrity.

Overall, a blockchain is a type of database that is decentralized, transparent, and secure, and it has unique properties and advantages that make it useful for certain applications, such as financial transactions and supply chain management.

Añadir información a la blockchain ETH con Python

Para añadir datos a la blockchain utilizando python, necesitarás tener acceso a una red blockchain y utilizar una biblioteca de python que te permita interactuar con ella. Por ejemplo, si estás utilizando la red Ethereum, puedes utilizar la biblioteca web3.py para conectarte a la red y enviar transacciones que añadan datos a la blockchain.

Aquí tienes un ejemplo de código en python que puedes utilizar para conectarte a la red Ethereum y enviar una transacción que añada datos a la blockchain:

from web3 import Web3

# Conectarse a la red Ethereum utilizando un nodo en localhost
web3 = Web3(Web3.HTTPProvider("http://localhost:8545"))

# Definir una cuenta que se utilizará para enviar la transacción
account = web3.eth.accounts[0]

# Crear la transacción
tx = {
    'to': '0xA6c50B7D7F79f41eA8b6a1A9F922d3B3B8b8c53D',
    'value': 100,
    'gas': 2000000,
    'data': 'Aquí puedes añadir tus datos'
}

# Firmar la transacción con la cuenta
signed_tx = web3.eth.account.signTransaction(tx, account.privateKey)

# Enviar la transacción a la red
tx_hash = web3.eth.sendRawTransaction(signed_tx.rawTransaction)

# Verificar el estado de la transacción
tx_receipt = web3.eth.waitForTransactionReceipt(tx_hash)

Con este código, podrás conectarte a la red Ethereum y enviar una transacción que añada datos a la blockchain. Sin embargo, tienes que tener en cuenta que el código anterior es solo un ejemplo y puede variar según la red blockchain que estés utilizando y las características de la transacción que desees enviar.

AnteriorRest API AbiertaSiguienteCaptura de Datos

Última actualización hace 2 años

¿Te fue útil?

🪅