Skip to content
This repository has been archived by the owner on Mar 7, 2023. It is now read-only.

Dgld #2

Closed
wants to merge 30 commits into from
Closed

Dgld #2

wants to merge 30 commits into from

Conversation

haael
Copy link

@haael haael commented Apr 29, 2020

Description

Implementation of DGLD coin.

Testing instructions

C++: Tests will be executed after build.
Android: Build the project in 'android' dir, run on device.

hewigovens and others added 30 commits March 30, 2020 19:19
* 🔧 update FIO block explorer url

* update coins.md
Makefiles fixed. Unit tests passing.
* update zcash/xlm block explorer

* Fix tests
Add missing call to `delete` in function `fileR`.
* Script for building sample app (C++).

* Include go sample app in build script.

* Add echo's.

* Sample build: include OSX and Android build.

* Minor FIo test extension.

* Samples build: split in 3, by 3 build platforms.

* Revert "Samples build: split in 3, by 3 build platforms."

This reverts commit a262043.

* Options for different platforms.

* Sample-build: Rearranged with functions per sample app

Co-authored-by: Catenocrypt <[email protected]>
* Create android-ci.yml
* Add ios-ci.yml
* Add linux-ci.yml
* Add sudo
* try set boost version
* install libc++
* Fix linux coverage
* move internal src to local/src
* Fix protobuf symbolic link
* Bitcoin Script minor fixes and new tests.
* Extra tests for the missing 3 lines.
* Fix isPayToWitnessScriptHash (was typo), new isPayToWitnessPublicKeyHash().
* A rename (Pubkey -> PublicKey).
* Extra test for TWBitcoinScript coverage.
* Some low-impact cppcheck finding fixes.
* Some reverts to address diff coverage metric.
* Add scripts for cppcheck to tools.
* Some minor reference type style linting.
Co-authored-by: Catenocrypt <[email protected]>
* Registers new coin.
* Define protobuf models
* Implement entry, address and add tests
* Fix AnyAddress, add further address tests
* Implement serialization and signing, add tests
* Add key derivation tests
* Add tests for Android
* Add tests for iOS
* Fix derivation path and tests
* Fix after review (including build issues)
Copy link

@pavel-bc pavel-bc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@haael Is it possible to rebase or create new branch/PR containing only DGLD-related commits? If you need some new data structures from parent repo, we can sync it

Also a bunch of tests are commented out

val address = AnyAddress(pubkey, CoinType.DIGITALGOLD)
val expected = AnyAddress("__EXPECTED_RESULT_ADDRESS__", CoinType.DIGITALGOLD)

assertEquals(pubkey.data().toHex(), "0x__EXPECTED_PUBKEY_DATA__")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@haael This is unclear - are you planning to follow-up in this or next PR with actual test cases?

set(protobuf_SOURCE_DIR ${CMAKE_SOURCE_DIR}/wallet-core/build/protobuf/staging/protobuf-3.9.0)
set(protobuf_source_dir ${CMAKE_SOURCE_DIR}/wallet-core/build/protobuf/staging/protobuf-3.9.0)
set(protobuf_SOURCE_DIR ${CMAKE_SOURCE_DIR}/build/local/src/protobuf/protobuf-3.9.0)
set(protobuf_source_dir ${CMAKE_SOURCE_DIR}/build/local/src/protobuf/protobuf-3.9.0)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will need to rollback this before merging, otherwise, the submodule setup will break. In future, we need to make it configurable


@Test
fun DigitalGoldTransactionSigning() {
// TODO: Finalize implementation
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

let key = PrivateKey(data: Data(hexString: "__PRIVATE_KEY_DATA__")!)!
let pubkey = key.getPublicKeyEd25519()
let address = AnyAddress(publicKey: pubkey, coin: .digitalgold)
let addressFromString = AnyAddress(string: "__ADDRESS_DATA__", coin: .digitalgold)!
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also needs some actual test cases

//auto result = transaction.serialize(signature);

//ASSERT_EQ(hex(serialized), "__RESULT__");
//ASSERT_EQ(...)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...

@pavel-bc pavel-bc closed this May 14, 2020
@pavel-bc
Copy link

Closing in favor of #3

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants