Skip to content

Conversation

@parthraninga
Copy link

closes #250

Summary

Upgrades ergo-appkit to Sigma State 6.0.2 and Ergo Wallet 6.0.0, adding comprehensive test coverage for all major Sigma 6.0 features introduced via EIP-50.

Motivation

Sigma 6.0 is a significant soft-fork upgrade to the Ergo blockchain that introduces powerful new smart contract capabilities including:

  • UnsignedBigInt - 256-bit unsigned integers for advanced cryptographic operations
  • Cross-input context variables - Enable coordinated multi-input transaction logic
  • Enhanced serialization - Full support for complex type serialization/deserialization
  • New collection methods - startsWith(), improved getOrElse() with lazy evaluation
  • Bitwise & shift operations - Low-level numeric operations for cryptographic primitives
  • Header.checkPow() - Built-in Autolykos2 PoW validation
  • Performance improvements - Lazy evaluation for Option and Collection methods

This upgrade ensures ergo-appkit stays current with the latest Ergo protocol capabilities while maintaining full backward compatibility.

Changes

Dependency Updates

  • build.sbt: Sigma State 5.0.126.0.2
  • build.sbt: Ergo Wallet 5.0.156.0.0

New Test Coverage

  • Added Sigma60FeaturesSpec.scala with 11 comprehensive test properties covering all major Sigma 6.0 features
  • Tests validate: UnsignedBigInt operations, cross-input context variables, enhanced Option/Collection methods, bitwise/shift operations, serialization, and more

Documentation

  • Updated README.md with Sigma 6.0 support section
  • Added feature highlights and backward compatibility notes

Testing

✅ All test properties in Sigma60FeaturesSpec validate:

  1. UnsignedBigInt type operations with large numbers (> 2^255)
  2. Cross-input context variable access via GetVar(inputIndex, varId)
  3. Global.some() and Global.none() Option constructors
  4. Collection startsWith() method
  5. Improved Box.getReg() implementation
  6. Lazy evaluation for Option.getOrElse()
  7. Global.serialize() and deserializeTo() methods
  8. Bitwise operations (AND, OR, XOR)
  9. Shift operations (left/right)
  10. Collection getOrElse() with lazy default
  11. Global.fromBigEndianBytes() conversion

To run tests:

sbt test  # Run all tests
sbt "testOnly *Sigma60FeaturesSpec"  # Run Sigma 6.0 tests only 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update Sigma dependency to 6.0, check 6.0 features support

2 participants