From 92a0437c2ab0804a8bc487a1a329aefbcdd20f84 Mon Sep 17 00:00:00 2001 From: romi Date: Thu, 21 May 2020 17:37:04 +0300 Subject: [PATCH 1/5] Initial implementation for CRU data. --- et | 1498 +++++++++++++++++ .../application/RadixApplicationAPI.java | 53 + .../data/AtomToCRUDataUpdateMapper.java | 58 + .../translate/data/CRUDataUpdate.java | 71 + .../translate/data/CreateDataAction.java | 58 + .../CreateDataToParticleGroupsMapper.java | 55 + .../translate/data/UpdateDataAction.java | 58 + .../UpdateDataToParticleGroupsMapper.java | 66 + .../client/atommodel/cru/CRUDataParticle.java | 84 + 9 files changed, 2001 insertions(+) create mode 100644 et create mode 100644 radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/AtomToCRUDataUpdateMapper.java create mode 100644 radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/CRUDataUpdate.java create mode 100644 radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/CreateDataAction.java create mode 100644 radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/CreateDataToParticleGroupsMapper.java create mode 100644 radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/UpdateDataAction.java create mode 100644 radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/UpdateDataToParticleGroupsMapper.java create mode 100644 radixdlt-java/src/main/java/com/radixdlt/client/atommodel/cru/CRUDataParticle.java diff --git a/et b/et new file mode 100644 index 000000000..9c8ca5ae3 --- /dev/null +++ b/et @@ -0,0 +1,1498 @@ +* 63bd383e (HEAD -> hackathon/cru-data, tag: 1.0-beta.8, origin/release/1.0-beta.8, origin/rc/1.0-beta.9, release/1.0-beta.8) Merge branch 'feature/RPNV1-160-testnet-universe' into rc/1.0-beta.8 +|\ +| * 4d3e08fc Update README and dependencies +* | 37daa496 Merge pull request #255 from radixdlt/feature/RPNV1-160-testnet-universe +|\| +| * e2a2a659 (origin/feature/RPNV1-160-testnet-universe) Added testnet.json universe +|/ +* 26ebeb04 (tag: 1.0-beta.7, origin/release/1.0-beta.7, origin/rc/1.0-beta.8, origin/HEAD, release/1.0-beta.7) Update library dependency version +* e780a346 Update version on README +* 31c778c6 Merge pull request #254 from radixdlt/feature/rpnv1-99-test-logging +|\ +| * fa201982 Update common dependency for merge +| * e19736e7 Clean up build file and serialization +| * 0a5f3e9e Use log4j 2 for logging +* | 9e2d8f0d Merge pull request #252 from radixdlt/integration/rpnv1-107-radix-cli +|\ \ +| * | 72a95633 Added missing exit statements and updating names of commands +| * | a1844b2b Fixes after resolving conflicts +| * | 8c7487d2 Merge remote-tracking branch 'remotes/origin/fix/gradle_maven_remove_sonar_snapshots' into integration/rpnv1-107-radix-cli +| |\ \ +| * | | 5535c0ce Review comments - Naming of keystore - Other cosmetic changes +| * | | 3c2842ca Added Copyright text +| * | | 3fdc9395 Refactoring to use environment variables for identity +| * | | 0c4d2af4 Changed sonar travis token +| * | | 89d7cf44 Changes to use endpoint from env variable +| * | | 64d0b5e1 GetAtomStore and CreateAndMintToken commands completed +| * | | b908b930 GetMessage completed +| * | | 7cdfd2b4 Sendmessage command done +| * | | e5bc701c Getdetails command with public key, address, native token ref +| * | | ea309ca1 Finished get public key command +| * | | b475d399 Initial commit with 1 Boiler plate for all the commands from cli developed in hackathon 2.Gradle setup for the packaging and dependencies +* | | | fde158fd Merge pull request #253 from radixdlt/bugfix/serialization +|\ \ \ \ +| * | | | 6e2cdc2b Remove unused imports +| * | | | 33a2a59a Removed ECKeyPair from Serialization. +| | |_|/ +| |/| | +* | | | 61d80474 Merge pull request #251 from radixdlt/fix/gradle_maven_remove_sonar_snapshots +|\ \ \ \ +| | |_|/ +| |/| | +| * | | 27022733 Remove sonartype snapshot as maven repo in build.gralde +|/ / / +* | / 9ed748f6 Merge pull request #248 from radixdlt/improvement/rpn1-61-migrate-code-to-java-common +|\| | +| |/ +|/| +| * 83db258d Merge branch 'improvement/rpn1-61-migrate-code-to-java-common' of github.com:radixdlt/radixdlt-java into improvement/rpn1-61-migrate-code-to-java-common +| |\ +| | * d38be42c Update travis SonarCloud token +| * | 2a276f82 Fixing bug where Atom, Particle, RadixUniverseConfig did not sha256 hash its dson bytes, a bug recently introduced in this featuer branch. bumping Java Common dependency to rc/1.0-beta.2 Adding unit tests for hashing +| |/ +| * bb513618 Change to be usng jitpack with gradle for java common dependnecy. +| * 816a0d27 Chaning incoherent naming of EUID getter to just `euid()` everywhere. Using new ECKeyPair static constructor `generateNew` +| * 3c531590 minor fixes +| * 6254816b Merge pull request #249 from radixdlt/improvement/rpn1-61-migrate-code-to-java-common-merging-in-rc6 +| |\ +| | * 1f4c8ec4 Manual fixes after merging in release beta 6 into this branch (since rpn1-61 was accendently based of beta 4 instead of beta 6.) +| | * 315b60f3 Merge branch 'release/1.0-beta.6' into improvement/rpn1-61-migrate-code-to-java-common-merging-in-rc6 +| |/| +| |/ +|/| +* | fc05fce8 (origin/release/1.0-beta.6) Update gradle wrapper to 4.10.2 for consistency +* | 93f96d5b Merge pull request #246 from radixdlt/hotfix/rpnv1-51-single-node +|\ \ +| * | f5e4f031 Use single node configuration by default +|/ / +* | e57c3ecd Merge pull request #245 from radixdlt/bugfix/rpnv1-47-slow-tests +|\ \ +| * | eb505f73 Use /dev/urandom for running tests so they don't stall on Linux +|/ / +* | 705c57cf (origin/release/1.0-beta.5) Prepend license test to each source file. +* | 8d755540 Resolve some sonar-flagged bugs to bring our bug count to zero +* | 690cf63a Merge pull request #244 from radixdlt/feature/atom-refactoring +|\ \ +| * | 4502ba9f NS-122 Atom refactoring phase 3 (Renamed AtomContent to Atom, regenerated Universe) +| * | 18064f11 NS-122 Atom refactoring phase 2 (moved application to Atom Interface, removed EngineAtom, EngineAtomContent) +| * | 60e9e48a NS-122 Atom refactoring phase 1 +|/ / +* | 76fca6ec Merge pull request #243 from radixdlt/feature/securityprovider-updates +|\ \ +| * | c4713716 BouncyCastle initialization refactoring(review comments) +| * | 396948c9 BouncyCastle initialization refactoring +|/ / +* | 8d0c6e13 Merge pull request #241 from radixdlt/feature/contributing-docs +|\ \ +| * | 911902a4 Update CONTRIBUTING.md +| * | 2696e6bf Update CONTRIBUTING.md +| * | d3a14054 Update CONTRIBUTING.md +| * | 7e69b9fb Update CONTRIBUTING.md +| * | f7372434 Update README.md +| * | a39f849b Create CODE_OF_CONDUCT.md +| * | 56d712cd Create CONTRIBUTING.md +* | | cc2735ce Don't fail if atom is signed by same id multiple times +* | | da36fbd2 Remove UnsignedAtom and allow for multiple atom signatures +* | | 8d8269ae Refactor unsigned atom +* | | 951688c0 Utilize Immutable collections for Atom properties +* | | d2e8884a Refactor Atom to only have one constructor +|/ / +| * 03f90bc9 Migrating Serialization, Utils, Crypto, and Identifiers to new repo radixdlt-java-common, merged with code from radix-engine-library. Updated code accordingly. +|/ +* 7555d2e1 (origin/release/1.0-beta.4) Update CHANGELOG +* 24ee94ab Merge pull request #231 from radixdlt/feature/address-check +|\ +| * d055c1cb Add universe magic check to all addresses +* | 2e234491 Merge pull request #230 from radixdlt/integration/tempo2-2 +|\ \ +| |/ +|/| +| * 54289701 Change Make localhost nodes trusted by default +| * d27a2bd2 Update universe +|/ +* ebac7615 (origin/release/1.0.0-beta.3) Update CHANGELOG.md +* f14a3486 Merge pull request #229 from radixdlt/feature/https-support-for-bootstrap +|\ +| * f1fde773 Use Ssl All trusting client for trusted nodes (for now) +* | 22c36796 Merge pull request #228 from radixdlt/feature/independent-immutable-atom +|\ \ +| |/ +|/| +| * cb87f398 Fix checkstyle +| * d1413fe8 Update universe +| * 5160fa2b Remove Atom serializer from hash, update universe +|/ +* 0fe7833e Update CHANGELOG.md +* dfa71bf6 Add to change log +* fdd28404 Merge pull request #226 from radixdlt/changelog-patch-1 +|\ +| * 82172d5d Change to using openjdk8 given change in licensing for oraclejdk8 +| * af2473be Update README.md +| * dcc0378f Update CHANGELOG.md +| * 8536077b Update README.md +| * 284bdf8b Create CHANGELOG.md +* | d17914bb Merge pull request #227 from radixdlt/feature/no-fixed-unallocated +|\ \ +| * | 40013608 Change separate address/symbol into consolidated RRI +| * | cfa17f6b Fix iconUrl for FixedSupplyTokens +| * | c5eef062 Fixed line length issue for CreateTokenToParticleGroupsMapperTest +| * | 323407d9 Include review feedback +| * | b834e4f3 Separates fixed and variable supply tokens +| * | 1bea261b (tag: 1.0.0-beta.1, origin/release/1.0.0-beta.1) Update version for release +|/ / +* | 7c752a9b Update localnet universe +* | df506909 Merge pull request #223 from radixdlt/feature/rlau-1365-specify-icon-url +|\ \ +| * | 6adcb576 Corrects review feedback +| * | 67c0009b Adds API calls with ability to specify iconUrl +* | | b105cc80 Merge pull request #222 from radixdlt/feature/rlau-1477-icon-url +|\| | +| * | 0a290a75 Adds ability to retrieve icon URL from TokenState +| |/ +* | 8a9d40ec Merge pull request #221 from radixdlt/release/1.0.0-beta +|\| +| * 20617534 (tag: 1.0.0-beta) Merge pull request #219 from radixdlt/hotfix/decode_transaction_attachment +| |\ +| | * 4158e577 Fix decoding of attachment in a transaction +* | | 8419a750 Merge branch 'release/1.0.0-beta' into rc/1.0.0-beta.1 +|\| | +| * | f0300c1d BootstrapByTrustedNode takes multiple RadixNode arguments +| * | 44080e25 Adds jenkins network config +| |/ +| * 867b99dd Adds BETANET_STATIC bootstrap and updates betanet universe +| * 0774b953 Update README to use commit hash +| * dbfd5064 Use BootstrapByTrustedNode for LOCALHOST_SINGLENODE and BETANET configs. +| * 32fc4c30 Merge branch 'feature/bootstrap-by-url' into release/1.0.0-beta +| |\ +* | \ 6314daef Merge pull request #216 from radixdlt/feature/bootstrap-by-url +|\ \ \ +| |/ / +|/| / +| |/ +| * e64474d8 Cleanup based on feedback +| * 17e3ef3a Add standard env variables for bootstrap and BootstrapByTrustedNode +| * b7a3b8ec Refactor to make WebSockets resource manager a parameter +|/ +* 3b993a7c (tag: 1.0.0-beta-core-1.0.0-beta) Add ellipsis to end of truncated string. +* 801ad022 Fix race condition in json rpc notification observations +* b606c156 Added accessors for previously inaccessible fields. +* 23f8cba6 Limit WebSocket debug output to something that most consoles can handle. +* 9ad6b864 Add option to submit atom to specific node. +* e7e7e0bc Only set websocket on open +* 8be517a8 Add execute method to be able to select origin node +* 44f156ca Use async callback rather than Subjects to handle Websocket logic +* fbd429a9 Update README +* 021b811a Merge branch 'feature/cleanup-send-msg' into rc/1.0.0-beta +|\ +| * 3672dcf3 Reorder parameters to sendMessage and add javadocs +* | 1f5768aa Update README +* | d4d529bc Merge branch 'feature/cleanup-identity-methods' into rc/1.0.0-beta +|\| +| * 38fca07a Remove unused import +| * e3c9df02 Cleanup identity methods and add javadocs +* | db44b7ba Merge branch 'feature/more-descriptive-method-names' into rc/1.0.0-beta +|\| +| * 5e4f80aa Use more descriptive api method names +* | 24c23c8f Merge branch 'feature/cleanup-api' into rc/1.0.0-beta +|\| +| * d24578ce Cleanup action classes +* | 4e06b226 Merge branch 'feature/cleanup-api' into rc/1.0.0-beta +|\ \ +| * | 4e6f6ac3 Cleanup action classes +| |/ +* | 76e18316 Merge branch 'feature/staging-areas' into rc/1.0.0-beta +|\| +| * b5f81cf9 Remove deprecated universe +| * de07376d Expose method to just get nodes from NetworkState +| * da5269e0 Create a working area for atoms to be built through +| * f1d15788 Moving staging of action into Transaction logic +| * 96032f25 Implement stage action one at a time +| * 84e40a9b Remove auto-sync on atom atom creation +* | 0f2b3352 Merge branch 'feature/cleanup-mappers' into rc/1.0.0-beta +|\| +| * 97d3bf76 Update examples +| * 099ee6dc Remove unused Ledger class +| * 317bc0f1 Don't auto-sync on request for state events +| * 6f4f9816 Don't auto-sync on request for action events +| * 254b5bf9 Consolidate stateless and stateful actions +| * 3d3b3060 Map statefulActionMappers to one action type +| * 7b6a0809 Map statelessActionMapper to one Action type +* | 34f0485f Merge branch 'feature/update-sunstone-universe' into rc/1.0.0-beta +|\ \ +| * | 267350ee Update sunstone universe +| |/ +* | fb710d54 Merge branch 'bugfix/bad-node-finder-exception' into rc/1.0.0-beta +|\ \ +| * | 8fe84006 Catch errors when node discovery fails +| |/ +* | 64ab7ff5 Merge pull request #213 from radixdlt/feature/refactor-for-env-testing +|\ \ +| * | 4bc16607 Use more descriptive toString for RadixNode +| * | a8cfe12d Add method to retrieve atom from Result +| * | 9e6a1a28 Add method to choose origin node +| * | f3347b0a Add method to get HTTP endpoint for a node +| * | bf4646d6 Update RadixNode method names to something more descriptive +| * | 9918cb30 Expose method to discover more nodes +| * | 20bb0716 Add 30 second timeouts to atom submission and json rpc calls +| |/ +* | 9859d1d9 Merge pull request #214 from radixdlt/bugfix/ssl-node-finder +|\ \ +| |/ +|/| +| * b652da54 Use SSL certs for node finder endpoints +|/ +* 201fc8d2 Merge branch 'develop' of github.com:radixdlt/radixdlt-java into develop +|\ +| * 4f5b8576 Merge pull request #206 from radixdlt/betanet-staging +| |\ +| | * fd4a7e87 https://betanet-staging.radixdlt.com +| | * eebdfa34 upped sunstone universe +| | * 41625c7e betanet-staging universe +| |/ +* | 219ecf13 Update README +* | 5656f4bc Update README +|/ +* 3eac734a Merge pull request #205 from radixdlt/feature/better-errors +|\ +| * 3b38a754 Better errors from Atom Submission +|/ +* 5933647e Merge pull request #204 from radixdlt/feature/message-action-id +|\ +| * 4e981927 Add unique actionId for DecryptedMessage actions +|/ +* db7d3e9c Merge pull request #203 from radixdlt/feature/cleanup-api +|\ +| * 48eccb9e Cleanup API +| * 8d079bd9 Cleanup of some RadixApplicationAPI interfaces +| * 88f5b8ea Remove old deprecated methods from Atom +| * d4b589fe Simplify token transfer attachments +| * 649867e8 Update high level APIs along with documentation +|/ +* ac1aa55a Merge pull request #202 from radixdlt/feature/remove-mint-and-transfer +|\ +| * 5f7a096c Cleanup atom submission api +| * c75b08c6 Remove MintAndTransfer action +|/ +* 8d82f7fe Merge pull request #200 from radixdlt/feature/cleanup-atom-sync +|\ +| * 9c262bd2 Update local universe +| * 7c3cf8d2 Cleanup based on feedback +| * b4d3e8bd Fix toString of SubmitAtomStatus +| * 66219a3c Fix junit tests +| * ca38bb73 Implement completeOnStoreOnly flag indicating sync procedure +| * 073be40e Cleanup atom submission logic +| * 476a07e6 Utilize a SubmitAtomCompletion action for sync completion +| * 37a3028f Remove NodeAtomSubmissionState/Update +* | e35300f9 Regenerate universe. +|/ +* 544f2601 Merge pull request #199 from radixdlt/feature/refactor-api +|\ +| * a8580ecb Add jdocs +| * 8c046955 Fix checkstyle +| * a5ecd19c Remove deprecated Universe.submitAtom json rpc call +| * 77a45562 Utilize new api in atom submission +| * 3e660d86 Fix atom getShards issue +| * f1d29648 Create methods for observing atom status events +| * 8961d962 Update Atom statuses +| * e00252b0 Create method to retrieve the status of an atom from a node +| * 5f3387a2 Complete subscription on error +|/ +* 737ca71e (tag: v23-beta) Merge pull request #196 from radixdlt/feature/translucent-destinations +|\ +| * bcfbe949 Update universe +| * 5bc4330e Utilize ImmutableSet in destinations in Particle +| * a7560d78 Expose method for signing an atom synchronously +| * e06c19cf Add destinations to particle +|/ +* dc990a5b (tag: v22-beta, tag: v22) Updated after feedback from review. +* baf01e72 Remove TokenDefinitionParticle icon field, replacing with an icon_url field. +* 5b8465c7 Added unit test to ensure short CBOR int/len encodings correct. +* a1748ba7 Upgrade Jackson dependencies and regenerate betanet universe. +* e9efe893 (tag: v21-beta) Merge branch 'feature/rlau-433-aid' into develop +|\ +| * e8d3824c Update universe to remove object from TPs +* | 277fe806 Merge pull request #193 from radixdlt/feature/rlau-433-aid +|\| +| * bde94cf9 Change AID to use unsigned sorting +| * 5520d203 Change AID.toByteArray to raw AID.getBytes +| * fbdf8ed7 Remove unnecessary AID serializers, fix/improve AID +| * 557bfccc Remove empty atom test +| * 69467f04 Fix tests referencing EUIDs instead of AIDs +| * 2c65cb82 Fix style issues +| * 0803f284 Fix style issues +| * 9daf5ddd Replace Atom HID usages with AID +| * 887a7405 Fix AID docs +| * 5f2bcb3b Fix AID shard selection underflow, add AIDTest +| * 6cbd15de Update AID with new shard selector and docs +| * 63f52659 Add AIDs for Atoms +|/ +* dc1cb49d Merge pull request #192 from radixdlt/feature/staging-groups +|\ +| * 308f51ce Implement cleanup based on feedback +| * 2bd9f2ec Add documentation +| * 2b52d55d Simplify TokenBalanceState +| * 469fded4 Remove granularity from TokenBalanceState +| * 1c63de02 Remove AtomicAction and utilize Transactions +| * 36cca21c Include uuid for staged groups for management +| * 2136e3de Create staged area for particle groups +| * e8c01399 Perform synchronization all at once before atom creation +| * 3a342694 Remove asynchronous side-effects +|/ +* cc4bc949 Update universe configs +* 87a8d0a3 Rebase Betanet config on top develop +* 95da0366 Add ability to retrieve stored atoms from AtomStore +* 749ed4f6 Merge pull request #191 from radixdlt/bugfix/fix-multiple-actions +|\ +| * 15a234f2 Add method for syncing atom and modify executeSequentially +| * d16a231f Remove executeSequentially api +|/ +* 06b1e92a Fix Json deserialization of System +* eb6ca619 Merge pull request #188 from radixdlt/fix/renameECSignatureMethod +|\ +| * bc548361 Rename static ECSignature method to decodeFromDER +* | a42c574e Merge pull request #190 from radixdlt/feature/refactor-puller +|\ \ +| * | 5178ada7 Implement fixes based on feedback +| * | 9d04f218 Remove consumables logic from application layer +| * | 98568f7e Refactor action mappers to use particle state +| * | 12ba9fa1 Consolidate how fungible overspends are handled +| * | 329ea077 Add initial nodes to be used for initial network +|/ / +* | 0f6cc243 Merge pull request #187 from radixdlt/feature/raw-atom-submit +|\ \ +| * | 34508a60 Expose API to submit raw atom +| * | affff43d Refactor out AtomSubmitter hack +|/ / +* | 1dbbb63b Merge pull request #189 from radixdlt/fix/androidjava8methodscomp +|\ \ +| |/ +|/| +| * a3890b44 Fix small comment formatting +| * 3114da04 Replace method.getParameterCount with method.getParameterTypes().length +| * 711ff5f7 Add compareUnsigned method to our utils primitives package a make use of it in Int128 class +| * a602423b Use bouncycastle util Base64 instead of Java8 +|/ +* 66bbf6ea Merge pull request #186 from radixdlt/feature/handle-deletes +|\ +| * 674954df Fix some minor issues +| * 1492a5f2 Refactored out reducer hack in RadixNetworkController +| * 6e9aa6d2 Move conflict handling into AtomStore +| * df52e96f Add a per particle spin index +| * 935dc693 Fix checkstyle +| * 84d7921d Add missing unit test +| * 2dc432bb Remove deprecated classes +| * 41537afa Cleanup ParticleTransition and TransitionedParticle +| * 91b2e023 Add more tests and cleanup +| * 2a2e7395 Refactor AtomStore and InMemoryAtomStore +| * 6e0f3f78 Fix checkstyle +| * c41a073d Replace TokenDefinitionReference with RRI +| * 98ef771b Remove Observables logic from stateless action mappers +| * 9483260e Remove observables in action mapper logic +|/ +* fd2cd3fd Merge pull request #182 from radixdlt/feature/ecsignature-from-bytes +|\ +| * 3607d496 Add static method to instantiate an ECSignature built taking ASN1 bytes as an argument +| * ad330acb Add ECSignature constructor which takes bytes as an argument +* | 0183077c Adding .java-version file which jenv will read and set the Java version when ever you navigate the Radix Java directory. +* | 2e3ab744 (tag: v20-beta) Merge pull request #184 from radixdlt/feature/rri-cleanup +|\ \ +| * | 34f2b756 Add minor cosmetic fixes +| * | 0a56d10d Remove TokenDefinitionReference and replace with RRI +| * | 9411edab Refactor RRI +|/ / +* | 322e71f4 (tag: v19-beta) Merge pull request #183 from radixdlt/feature/remove-stateful +|\ \ +| * | f20bdbfb Add use of RRIParticle +|/ / +* | 6fd85111 (tag: v18-beta) Merge pull request #181 from radixdlt/feature/rlau-581-human-readable-serializers +|\ \ +| |/ +|/| +| * 994a558b Exclude DsonTest for now +| * 07875a28 Add check for hash duplicates in ClassScanningSerializerIds +| * 89de70ba Add check for hash duplicates in ClassScanningSerializerIds +| * f816a4e3 Rename internal.* -> network.* +| * c787781b Update DsonTest +| * b77343a7 Rename ECSignature serializer id 'crypto.ec_signature' to 'crypto.ecdsa_signature' for clarity +| * 32273c92 Restore original line endings +| * ee613466 Change serializer id to be string-based +|/ +* d9561ed2 Merge pull request #180 from radixdlt/bugfix/android-bouncycastle-fix +|\ +| * f46ac324 Make sure to remove bouncy castle provider if Android +|/ +* fa361048 (tag: v17-beta) Merge pull request #179 from radixdlt/feature/rlau-1142-add-message-nonce +|\ +| * c700a1dc Rename rng in MessageParticleBuilder to please checkstyle +| * 6cdf6ac3 Replace time-based nonce with fully random nonce in MessageParticle +| * 3c8c67cb Update betanet.json after rebase +| * 7fcc0c08 Add 'nonce' to MessageParticle, update betanet.json +|/ +* 1a91fa8f (tag: v16-beta) Merge pull request #174 from radixdlt/feature/rlau-953-atom-dependency +|\ +| * faf6bf8c Implement fixes based on feedback +| * e1398e88 Remove Mint and Burn Particles +| * 1e62e17b Remove Classes as keys to token permissions +| * 67e8e10e Remove Minted/Burned Particle, use only TransferredParticle +| * 273c1ac9 Remove unnecessary fields in UnallocatedTokensParticle +| * ad46cc66 Universe update +| * 6b57ca86 Unallocated particles required with TokenDefinition +| * ed5c12f8 Update universe and add more util methods in API +| * 8f55c004 Fix issue with missing deletes on interdependent atoms +| * 12445b3a Fix equality of TokenState +| * f1b5d5c2 Implement use of UNALLOCATED token particles +| * d1b054f5 Add UnallocatedTokensParticle +| * 0325cfbe Use FungibleParticleTransitioner in TransferTokensMapper +| * a728fd4e Remove unnecessary observable logic in TransferTokensMapper +| * 3a85b7d4 Implement FungibleParticleTransitioner and use in BurnTokens +|/ +* 1e8e5492 Update sunstone universe +* f3912c5f Merge pull request #177 from radixdlt/feature/RTPIntegration +|\ +| * 79ef82aa Fix for DiscoverSingleNodeEpic in case of universe mismatch, additional debug logging and updated universe. +* | 696c6071 Merge pull request #167 from radixdlt/deterministic_signatures_rfc6979 +|\ \ +| * | dd3dcb0e Changing ECDSA signatures to be deterministic according to RFC6979 in order to more easily write tests and compare implementations between Radix libraries. +|/ / +* | 04bb23ef Fix for DiscoverSingleNodeEpic in case of universe mismatch, additional debug logging and updated universe. +* | 575c2925 Merge pull request #175 from radixdlt/bugfix/rlau-1083-inter-dependency-consensus +|\ \ +| |/ +|/| +| * 4eb63a7f Fix bug when processing DELETE events +| * 89e664ef Cleanup RadixApplicationBuilder +|/ +* bc07e52a (tag: v15-beta) Merge pull request #173 from radixdlt/feature/rlau-1070-remove-feeparticle +|\ +| * ddde7dfd Remove 'POW' definition from Universe +| * b3528191 Remove unnecessary imports +| * b38732c1 Remove FeeParticle +| * f0f8794c Add metadata pow fee nonce mapping instead of FeeParticle POW +|/ +* b5fafbd8 (tag: abt) Adding boolean flag for signing method to ensure Low value S in signatures according to BIP62 +* 984a108c Merge pull request #172 from radixdlt/bugfix/rlau-1071-token-symbol-conflicts +|\ +| * 863f9514 Fix tests + checkstyle +| * 36c1851e Implement handling of missing DELETEs +| * 2df82b64 Handle particle DELETEs in the TokenDefinition reducer +| * c002a1af Add equality checks to application state +|/ +* 54548296 Merge pull request #171 from radixdlt/feature/atom-dependency-test +|\ +| * f43b1745 Update javadoc to executeSequentially +| * 04f1d3f0 Implement better executeSequentially +| * 6655823d Better toString for debugging +| * 2df3b7a5 Change interface executeSequentially +|/ +* a3791361 (tag: v14-beta) Merge pull request #170 from radixdlt/feature/rlau-1032-convert-permissions +|\ +| * dfd2b9da Fix TokenDefinitionsReducer incorrectly mapping permissions to mutability +| * 494b97eb Fix weird indent issues +| * e3b7b525 Remove unused imports +| * ff0c6e62 Remove debug dump json code +| * ec77ba06 Fix CreateTokenActionMapper putting create token and mint in same particle group +| * c9233a54 Change TokenPermissions to reduced permission set, update universe +| * dbce2eb8 Remove 'transfer' permission from TokenDefinition +|/ +* 04cc9e27 Merge pull request #169 from radixdlt/feature/remove-static-universe +|\ +| * 25c410c8 Remove getOwner from Ownable interface +| * 6fa8702d Remove use of static universe instance +| * 829c903b Remove dependency on Universe in mappers +|/ +* e067cd58 Fix checkstyle +* 39daed0f (tag: v13-beta) Set tabWidth correctly. +* 7d8d17dd Additional comments, plus conversion of StringBuffer to StringBuilder. +* c282b37d Fixed several issues with conversion from BigInteger -> byte[] -> BigInteger. +* 38253ec0 Merge pull request #165 from radixdlt/feature/application-shard-state +|\ +| * f2d3435e Turn ShardAppStateId into first class object +| * dcaf948e Add descriptive toString to TokenBalance +|/ +* fae08401 Fix MintAndTransferTokensActionMapper after BigDecimal change, change radixApi.mintAndTransfer to use BigDecimal +* 2e25c4e6 Merge pull request #163 from radixdlt/feature/rlau-645-refactor-state-provider +|\ +| * 0929e6dd Fix unit conversion issues introduced through rebase +| * 22b38ac0 Update RadixWalletExample after api change +| * cc6f868d Remove extraneous imports +| * 716a289c Add mintAndTransferTokens method to api, rename 'send' to 'transfer' for tokens +| * d2b855b6 Add MintAndTransferTokensAction for atomic transaction testing (untested) +|/ +* e7a6c602 More fix for logging. Apologies. +* 831569ef Fix for checkstyle issue (oops). +* 93535911 Update guava dependency, and improve debug logging in RadixJsonRpcClient.java. +* 19bef59d Merge pull request #162 from radixdlt/feature/use-big-decimal +|\ +| * 04883244 Changes based on feedback +| * a4989d5a Move Token Unit Conversion methods to separate class +| * 4e4bd046 Use BigDecimal instead of UInt256 int RadixApplicationAPI +|/ +* 59455a72 Merge pull request #161 from radixdlt/bugfix/rlau-1053-uint256-from-big-integer +|\ +| * d4ca6c6b Fix for UInt256 conversion from BigIntegers >= than 2^255 +|/ +* 59ec3a73 (tag: v12-beta) Update sunstone.json +* bc6fefc4 Merge pull request #160 from radixdlt/feature/rlau-578-rename-token-type-to-token-definition +|\ +| * d3d83972 Move forgotten tests from 'tokenclasses' to 'tokens +| * bdda7ac6 Remove unnecessary imports for checkstyle +| * 49e17b6a Move 'tokenclasses' to 'tokens +| * 3bcc2b02 Fix checkstyle issues +| * 28605352 Update betanet.json +| * 50a7a0b6 Rename TokenType to TokenDefinition +|/ +* 74e546ea Merge pull request #158 from radixdlt/bugfix/resync +|\ +| * 8fe8dd17 Add RESYNC into event stream +* | dfbc4bc6 Fix indentation (again) +* | 00437bb0 Fix indentation + immutable list +* | 9d625d8f Expose means of ActionExecutionException validation +|/ +* 38eecaad Fix bug with consumables +* 5f6ce5ca Merge pull request #157 from radixdlt/feature/reducers-first +|\ +| * 9f180cb9 Fixes based on comments +| * 1fd75b9d Add JUnit tests +| * a8d627c0 Remove replaying-share lib +| * d360b422 Remove deprecated RadixAtomValidator class +| * 27b9c564 Remove debouncer and only emit actions after state is reduced +|/ +* 1d32fe29 Merge pull request #156 from radixdlt/feature/soft-state +|\ +| * 86ad2f9e Minor fixes based on comments +| * 0c2df1c9 Add better documentation +| * bf86b974 Implement atom soft state +| * 4af53c02 Move fetching logic into AtomPuller +|/ +* 00993e43 Merge pull request #149 from radixdlt/feature/delete-atom-events +|\ +| * b4821a50 Fix checkstyle +| * 18449e8b Fix deletion logic within AtomStore +| * 95f7e231 Update Betanet Seed Config for better Consensus testing +| * ceadecd1 Save universe in network state +| * f4f21ade Change name from Result to Response +| * 5b8c76f5 Fix checkstyle issues +| * 4cdcde11 Rename Particle keyDestinations to shardables +| * 5977ff47 Add Unit test for particle store and atom deletes +| * 4e0d5199 Cleanup checkstyle +| * 711d98a2 Use RadixAddress instead of Keys to describe "destinations" of particle +| * 57f43510 Add some documentation to new Particle transition classes +| * d947f5a1 Fix TokenBalanceReducer logic +| * b5f1cf71 Create STORE/DELETE AtomEvents +|/ +* efadcd55 Merge pull request #154 from radixdlt/feature/rlau-999-remove-fungibletype +|\ +| * 98cfaf0c Fix checkstyle issues +| * ebeedc49 Fix wrong value in TokenClassParticle tokens instances to verbs map +| * 9850c404 Refactor TokensKind to use Particle types directly, remove TokensKind +| * 677755b5 Refactor FungibleType to TokensKind for Token permissions +| * 91506601 Remove Fungible.getType +|/ +* 0aec3e12 Fix checkstyle issues +* 571260ae (tag: v10-beta) Merge pull request #153 from radixdlt/feature/rlau-981-split-owned-tokens +|\ +| * 916e46a8 Remove debug code +| * 50e5271e Update universe with new key +| * a88edb22 Fix Atom.tokenSummary consumable/consuming logic +| * a34d3949 Remove Hashable interface +| * 2c20405d Make Minted, Transferred, BurnedTokens final +| * 8565b624 Add documentation for new token types and Hashable +| * e1517b16 Fix Burn/Transfer mappers addConsumerQuantities +| * f8a94b1e Update betanet.json +| * 86b4c29c Fix usages of OwnedTokensParticle +| * 1846d0a7 Remove OwnedTokensParticle, update betanet.json, fix Serialize not including new split token types +| * 88f903b8 Refactor usages of OwnedTokensParticle, introduce Hashable for .hash() and .hid() +| * 7a883405 Remove usages of OwnedTokensParticle (incomplete) +| * f99227b8 Rename TokenClassReference to TokenTypeReference +| * ef6b376d Add Minted, Transferred, BurnedTokens particles +|/ +* 6755bb4f Merge pull request #152 from radixdlt/feature/universe-check +|\ +| * ff24081c Update sunstone universe +| * 030b4ec9 Fix adding nodes logic +| * 15d5b99b Add universe check test +| * 52d24c76 Add universe check for seeds +|/ +* 831185e6 Additional test coverage. +* 7892c429 Improve unit test coverage. +* 8ffc0d56 Remove no-longer-used Timestamps class. +* 082d1248 Improve unit test coverage. +* 9b1565a3 Adding sonar properties. +* 70b5af7f Fix for checkstyle issue. +* 367be7fc Merge pull request #151 from radixdlt/bugfix/burn-account-tokens +|\ +| * 99b01a1d Add explicit burn address +|/ +* 20370a3d Merge pull request #150 from radixdlt/bugfix/burnt-tokens +|\ +| * 113db799 Change style of enum equality check +| * 10abbbb1 Fix checkstyle issue +| * c75e1bf0 Fix issue with burned tokens being consumed +|/ +* 72b65181 Broke up like formatting to placate checkstyle. +* 87493f5b Removed pre-seeding local store with atoms from JSON universe file — all atoms should come from node to ensure they have correct nonces etc. +* ebd589ef Merge pull request #148 from radixdlt/feature/rlau-655-remove-explicit-quarks +|\ +| * d9682447 Remove stray Quark usages +| * ebfbaf30 Remove Quarks from Particle, update universe +|/ +* 38cbe04d Merge pull request #147 from radixdlt/feature/rlau-651-refactor-fungible-to-interface +|\ +| * 38fc4dd9 Add non-zero check to OwnedTokensParticle +| * 2b540136 Refactor FungibleQuark to interface +|/ +* 48b9f851 Removed System.out.println debugging stuff. +* e1342293 Fix some tech debt identified by sonarqube. +* cdb9905c Fix unused imports causing checkstyle failure. +* f757c1be Merge pull request #146 from radixdlt/feature/rlau649-refactor-ownable-to-interface +|\ +| * 657e8285 Remove explicit "owner" field in TokenClassParticle +| * 280fc631 Add owner to TokenClass, update universe / betanet strings +| * 29c9f143 Refactor OwnableQuark into a Particle interface, remove explicit OwnableQuark +|/ +* ebb1742f Update betanet +* 6c82c295 Fix some checkstyle issues. +* b54d0508 Merge branch 'feature/rlau576-remove-timestamp-to-metadata' into develop +|\ +| * 7ee720a5 Fix Atom timestamp validation glitch +| * 1a68d4cd Fix invalid constructor for Atom, change getTimestamp error handling +| * f7628407 Update TODO to link issue number +| * d08c40f0 Move timestamp to Atom metadata, remove TimestampParticle +|/ +* 10d6da70 Change use of doAnswer(...).when(...) to when(...).then(...). +* b16ca738 Add test logging plugin. +* a993f017 Use buildscript plugins rather than plugins DSL as required by internal Jenkins. +* e0e52b2e Update for pending alphanet merge. +* 276f4aa6 Merge pull request #144 from radixdlt/feature/RLAU-572-add-metadata +|\ +| * 0d31d500 Fix unit tests, styling +| * c76a05c4 Fix private constructor +| * 7bd1cdea Update for immutability, POW calculation fix +| * bae88811 Add metaData to atoms and particle groups +|/ +* cb87ea5c Merge pull request #143 from radixdlt/feature/refactor-accountable +|\ +| * 7d55a5c1 Update universe +| * 05138082 Remove AccountableQuark +| * 63d2325c Remove use of AccountableQuark +|/ +* 8477af26 Merge pull request #139 from radixdlt/renaming_methods +|\ +| * d418c069 Renaming method in Atom having obsolete names such as "consumables" (instead of the actual "OwnedTokensParticle") and renamed "getDataParticle" to "getMessageParticles" +|/ +* bd501231 Merge pull request #142 from radixdlt/feature/remove-chrono-quark +|\ +| * 24952ea9 Utilize static field for keywords +| * 21c54a3e Remove fragile AtomSerializationTest +| * c6796998 Remove ChronoQuark +| * f08a59d8 Remove TimestampParticle dependency on ChronoQuark +|/ +* 7c3b51c7 Merge pull request #141 from radixdlt/feature/remove-data-quark +|\ +| * 32f26b24 Remove Data Quark +| * 2977355a Remove useage of DataQuark from MessageParticle +|/ +* ad9e091d Fix tests and checkstyle issues +* 8dcd7434 (tag: cbt) Merge pull request #136 from radixdlt/feature/constraint-machine-os +|\ +| * 96aea205 Update betanet universe +| * 9f8099d6 Remove IdentifiableQuark +| * c7f7d5ad Remove use of IdentifiableQuark +* | c250fb68 Fix / update AtomSerializationTest +* | 8b721a7e Merge pull request #138 from radixdlt/adding_tests +|\ \ +| * | 7f6e911d Adding trivial magic byte test, to be used as a reference for other Radix libraries +| * | f1153032 Removing the dependency `okio.ByteString` in favor of `primitives.Bytes` for encoding and decoding of hex strings. +| * | 1fa4d257 Adding documentation and simplifying HashTest using StandardCharsets +| * | 11eb3ebf Adding sanity check of sha256 hash, mostly for cross library verification. +| * | 2a56eb61 Added comparison of Dson hex string in empty atom test +| * | 9d26fdd5 Fix code duplication in Atom, where `getHash` method weren't using `toDson` as it should. +| * | 2aba8a93 Adding expected expect hexstring for hash for empty model and serialised model. +| |/ +* | cf7fa263 Correct issues raised by sonar: missing @Override, unused import, extra semicolon. +* | 94a65ac7 Test signing capabilites of seeded key pairs +|/ +* acbc5307 Feature/particle groups (#135) +* 5a9148e5 Changed NodeRunnerData to be serializable to conform to requirements for alphanet merge. +* 963acfd3 Merge pull request #132 from radixdlt/feature/refactor-network +|\ +| * 0360ac63 Add fixes/cleanup based on feedback +| * df94e02e Make FindANodeEpic more responsive to hard-to-connect to nodes +| * 20cd2486 Add json error data to error update +| * 56456fbe Cleanup based on review +| * 33a6e995 Some fixes +| * b29ecfed Add comments to new network classes +| * dbfdc911 Refactor Websocket connections +| * b997862c Refactor JSON RPC actions +| * 844daee9 Cleanup FindANode epic +| * c5c3d3a0 Refactor SubmitAtom flow actions +| * d24dff1b Refactor FetchAtoms flow actions +| * bb6cd3cc Refactor websocket epics +| * 2d9d4131 Cleanup of JSON RPC epics +| * 567b6bb1 Cleanup checkstyle +| * bbc86af8 Cleanup FindANode test +| * 281ae456 Cleanup reducer logic +| * 5888896c Implement shard checking +| * 05b79297 Use RadixNodeState in reducer state +| * f836f9e1 Cleanup node discovery +| * d44cb53d Implement auto websocket closing +| * 2d704931 Refactor GetNodeData +| * 13f1da03 Refactor GetLivePeers +| * 7609f983 Remove direct websocket calls +| * 4502760a Move some json rpc calls into a node update action +| * eb2b7082 Refactor node status to be updated via a reducer +| * 598e8c8a Update name from RadixPeer to RadixNode +| * f69adbc2 Implement node specific epic +| * 60edcbce Implement Discovery Epic +| * 3a87ebcf Implement Epic for handling node selecting +| * 23268c61 Implement generic network epic used for Fetching atoms +| * 4e21326a Utilize epic style flow to manage connections with atom submissions +| * 74310727 Refactor atom updates +| * e616122a Preparation for refactor +| * 8531ca3a Refactor Network Layer +|/ +* f2fe22ff Added Javadoc to UnknownTokenException as part of review feedback. +* 9ce9e1b1 Bugs and new functionality for mint/burn multi-issuance tokens. +* fd286b0c Merge pull request #129 from radixdlt/feature/resource-identifier +|\ +| * 9e24e44b Transform Radix Resource Identifier into a 1st class serialized object +| * 08ec2786 Unify ParticleIndex into a string resource identifier +* | 3fea5a1e Decrease verbosity of RadixClientSupplier logging +|/ +* 07f3c22b Make burn API arguments consistent with mint at least for now. +* 80e9bea6 Revert some excessive reformatting. +* 9b43d530 Missed autogen code removed. +* 2d4aa3e9 Fixed some line-length and copy-pasta errors. +* ad1c6018 Updated universe with granularity. +* 6e2abaf9 First draft granularity +* ef0fab63 Change universe of example to BETANET +* fadf7d99 Decrease verbosity of RadixClientSupplier logging +* e8a696a4 Merge pull request #122 from radixdlt/feature/configurable-radix-network +|\ +| * 02bc22bf Fix errors propagating through client supplier, fix network state not being cached, fix checkstyle issues +| * cb503127 FIx duplicate getNetworkState() after rebase +| * 14c473af Cleanup after rebase into develop +| * c5d4a02f Add automatic peer connect and disconnect to ClientSupplier +| * e31960ad Update sunstone universe +| * d1dc2a79 Remove Subject use in RadixJsonRpcClientTest +| * 37a1fb6c Change Subjects to Singles, add fixes based on feedback +| * 10f415ae Update tests, fix changes from reviews +| * 40b5888d Make RadixPeerState compliant with checkstyle (private memberss) +| * 551d13ee Fix relevant checkstyle violations +| * 5220ae20 Fix crash when Api.getVersion fails +| * 2be4f7b5 Change Bootstrap peerDiscovery to Supplier +| * 1f4f32b0 Add RadixPeerState, refactor filters and ClientSupplier accordingly +| * 5216d580 Update tests, rename filters and selectors to be more meaningful +| * a2a0b3f1 Fix networkState not connecting to peers in RadixNetwork +| * c83df6d6 Add filters, selectors and RadixNetworkState to RadixNetwork +| * cb3db7b2 Add RadixPeerState, refactor filters and ClientSupplier accordingly +| * 916d2b1f Update tests, rename filters and selectors to be more meaningful +| * 6e473679 Fix networkState not connecting to peers in RadixNetwork +| * 811ec3ee Add filters, selectors and RadixNetworkState to RadixNetwork +|/ +* 934b1a5b Update betanet universe +* b8c5a63d Update sunstone universe +* fc56eaa7 Merge pull request #126 from radixdlt/feature/unsubscribe +|\ +| * 891da10c Implement auto-disconnect when all Observables are disposed +|/ +* 5f90bf8e Merge pull request #127 from radixdlt/feature/wrapped-shards +|\ +| * 9cc4232f Cleanup ShardsTest +| * 606babe9 Fix wrapped shard range logic +* | 9205f1dd Fix calculation of planck time for PowFeeMapper. +|/ +* d6566855 Merge pull request #124 from radixdlt/feature/unique-particle +|\ +| * 28e16018 Cleanup documentation and class names +| * a9245d0c Implement initial mapper from atom/particle errors to application errors +| * 586fdf08 Change name of UniqueIdAction to correspond to names of other actions +| * d2159060 Add fixes based on feedback +| * bc8b87ab Add action side effects to allow for nesting and other advance useage +| * b2507274 Cleanup names +| * 90c49c60 Implement Unique Particle +| * 783699f5 Refactor RadixApplicationAPI to use aggregation of AtomMappers +| * 7178c54e Refactor RadixApplicationAPI to use aggregation of reducers + mappers +| * 870a8aa8 Refactor ApplicationStore and it's useage to be more generic +| * 03e3f126 Remove deprecated UniqueProperty classes +| * 4e451c03 Unify how addresses are determined in Particles +| * f900eaf6 Unify ParticleIndex +|/ +* 76c6f2af Add means of deterministic key pair generation +* a5622ee6 Fix TokenPermissions issue +* ca91ccb4 Merge pull request #121 from radixdlt/feature/refactor-for-encryption-testing +|\ +| * 8638ae93 Fix small issues +| * 08bd6d05 Cleanup some javadocs + NP checks +| * 4a7d757b Expose method for creating api with custom mappers +|/ +* ace3fc9f Fix javadocs +* 9a5fe140 Expose method to tell whether RadixUniverse is instantiated or not +* 2565bb98 Added redundant null checks from review feedback. +* 36f39929 Additional review feedback. +* 5598e912 Changes based on review feedback. +* 28643462 Implementation of 256-bit quantities for fungible tokens. +* 9ad96144 Use specific exception to signal problems with ledger action execution +* de2218f7 Update sunstone universe +* bbfd6579 Merge pull request #119 from radixdlt/feature/token-classes-refactor +|\ +| * 59ec3edf Update sunstone universe +| * 907f89de Add some fixes based on feedback +| * 48e46804 Add some javadocs +| * 5860427d Update to make more easily useful for acceptance tests +| * 7e70544c Refactor application actionToParticles mappers to be more modular +| * 53a8889d Remove unused class +| * c6e1a339 Move classes to appropriate application level module package +|/ +* e45cf762 Merge pull request #117 from radixdlt/feature/sensible-retry +|\ +| * d3f9b1f6 Remove unused import +| * ff889567 Update AtomFetcher and RadixNetwork tests with WebSocketException filter +| * 90857696 Fix checkstyle violations +| * 8d94348d Revert accidental change of "HelloWorld" example +| * f34a21df Add filter to RetryTimer, add WebSocketException for connection-fault-based retries +|/ +* 919fdba9 Merge pull request #116 from radixdlt/feature/action-store +|\ +| * 1b2be5e2 Add some jdocs to new classes +| * 7c562bd2 Refactor/simplification of Data Messaging module +| * e20f685c Refactor application level modules to utilize an ActionStore +* | 0b0a4a37 Fix unsubscribe RPC method name (Subscription.cancel -> Atoms.cancel) +|/ +* 7c2e459e Fix checkstyle issues +* b1178cd8 Update betanet.json after merge, fix MessageParticle passing null when metaData is empty +* d84d6907 Merge branch 'feature/add-source-to-message' into develop +|\ +| * 8f9e9d14 Revert accidental documentation change in DsonOutput (storage -> message) +| * d29cde2e Merge pull request #114 from radixdlt/feature/chronoquark-all-timestamps +| |\ +| | * 11a87a01 Improve ChronoQuark null checks +| | * 72f52a1f Update betanet.json +| | * ba0e5fbe Change Long to long in TimestampParticle.getTimestamp +| | * 6a3b033d Update betanet.json +| | * caf618f2 Make ChronoQuark hold all timestamps instead of just one +| |/ +| * 5b9cf7ae Refactor "source" to "from" in addresses, adjust names for SendMessage, simplify addresses in SendMessageAction +| * 9abf2b25 Remove unnecessary import +| * 1403df83 Fix source missing when sending token with message through API +| * 46537ff0 Add missing annotiations to source field in MessageParticle +| * ee677bc8 Refactor StorageParticle to MessageParticle, add source field +* | 32351b4e Fix checkstyle +* | 4b6937f6 Update sunstone universe +* | 50c1eea1 Expose method to create atom based on given action +* | 18a7b533 Merge branch 'feature/quark-refactor-tests' into develop +|\ \ +| |/ +|/| +| * 759be0d2 Add quark refactor tests +| * 8bca89a5 Implement Burn Token Action +| * d112a4da Refactor Mint permissions into Generic Token action permissions +| * d6b78d7f Add support for mutable tokens and minting tokens +* | 43e8ca4c Fix checkstyle issues +* | e8a11001 Merge pull request #112 from radixdlt/feature/particle-model-cleanup +|\ \ +| * | 88cd67d2 Refactor Nonfungible Quarks +* | | a809da20 Changed reference to java.awt.Container to java.util.Collection. Fix for RLAU-224. +* | | dddf54be Fix Client Selector bug which would fail if bad first node +* | | ce8906ba Merge branch 'master' into develop +|\ \ \ +| |/ / +|/| | +| * | 47714429 (tag: 0.11.6) Update README.md for new release +| * | ba1b45f8 Fix decryption bug +| * | 70df0465 Merge pull request #101 from radixdlt/feature/transfer-attachments +| |\ \ +| | * | 0420ba36 Utilize a different class for reading TokenTransfers from atoms +| |/ / +| * | 537299bf Merge pull request #100 from radixdlt/fix-too-many-connections +| |\ \ +| | * | 6930c40b Add delay in between node connection requests +| |/ / +| * | 336c846c Better error logging on RetryTimer +| * | 4978ee1b (tag: 0.11.5) 0.11.5 release +* | | e500869f (tag: witness-service) Merge pull request #110 from radixdlt/feature/mutable-supply-tokens +|\ \ \ +| * | | 409a93b5 Implement Burn Token Action +| * | | bd45b44a Refactor Mint permissions into Generic Token action permissions +| * | | ec38a33e Add support for mutable tokens and minting tokens +|/ / / +* | | 27a069ba Merge pull request #109 from radixdlt/feature/api-cleanup +|\ \ \ +| | |/ +| |/| +| * | 8dca59e0 API cleanup +|/ / +* | 7b31818c Use better values to represent spin +* | 9e824ed5 Merge branch 'betanet' into develop +|\ \ +| * \ ce3212dd Merge pull request #108 from radixdlt/feature/particle-cleanup +| |\ \ +| | * | 8f9c5c7d Refactor Cbor mapper +| | * | d1da161b Fixes based on Martin's Feedback +| | * | f5c0c4da Rename some particles and quarks +| | * | fd7d0ec9 Copy Structure of RadixCore atommodel +| | * | 0d52ab77 Use SerializerId "ADDRESS" for Address +| | * | 0aa6a70c Cleanup Address and Owner serialization +| * | | 92cfe0ed Merge pull request #107 from radixdlt/feature/particle-spin +| |\| | +| | * | 10db1cfe Update universe +| | * | de861acd Create SpunParticle which wraps a particle and its spin +| |/ / +| * | c1fa74a5 Merge pull request #102 from radixdlt/feature/structured-validation-errors +| |\ \ +| | * | 51a52bbd Fix structure of error notifications +| * | | e7d0be6d Merge pull request #106 from mpsandiford/feature/hash-serializer +| |\ \ \ +| | |/ / +| |/| | +| | * | c0b9243c Added check to ensure that classes annotated with SerializerId also include a "serializer" field somewhere in the hierarchy. +| | * | d5a8ca2e The DSON/JSON "serializer" field is now included when calculating the hash. +| |/ / +| * | 38b6d1b5 Merge pull request #105 from radixdlt/feature/particle-composition-with-serialization +| |\ \ +| | * \ 0a372bdc Merge branch 'betanet' into feature/particle-composition-with-serialization +| | |\ \ +| | |/ / +| |/| | +| * | | 5585473d Merge pull request #104 from mpsandiford/serializer2 +| |\ \ \ +| | * | | 4936e0c8 Change some entities to hex unicode to placate checkstyle. +| | | * | 870ef2bc Fix TestUtils style issues +| | | * | e2fbe669 Add missing serialized version to Particle and Quark, add TestUtils for quick hash data comparison +| | | * | 90d2c4a3 Fix style issues and javadoc issues for gradle build +| | | * | 5724766d Fix serialization issues and mismatches with core +| | | * | 83eff104 Apply quark refactor to serialization refactor (non-working commit) +| | |/ / +| | * | d3bee3f7 Tidied up Particle hierarchy. +| | * | 1cd10975 Debugging information removed. +| | * | 0a64c2f1 Formatting tweaks to shut checkstyle up. +| | * | aa706312 Tweaks to correct Peer/TCPPeer/UDPPeer hierarchy and missing no-arg constructors. +| | * | a86472c6 Changes to placate checkstyle. +| | * | 67f99fe7 Working version with RadixCore and client library. +| |/ / +| * | 44f99e3f Merge pull request #99 from radixdlt/feature/token-particle +| |\ \ +| | * | f63bb51b Add "Action" suffix to action classes +| | * | 5fcc6593 Refactor Minted particles to be a Consumable +| | * | c0544b1e Add javadocs to new classes +| | * | 219b1e3d Rename action classes to verbs +| | * | 2232886c Add more unit tests +| | * | d421bec0 Refactor to remove AtomBuilder +| | * | f356bdef Refactor Atom Construction +| | * | 72ca9711 Implement reducer + store framework +| | * | 803859bc Refactor reducers to be more reducer like +| | * | 816b36b4 Refactor AddressTokenReducer to use same interface as TokenReducer +| | * | 173b4ff4 Rename TokenReference to TokenRef +| | * | 558818f6 Expose api to get latest state of a given token +| | * | 4a851418 Use BigDecimal rather than Amount class in the API +| | * | 23f62f50 Utilize account+ISO for token uniqueness +| | * | a7102760 Utilize Token object as the Token Reference +| | * | da54f933 Remove RadixWallet +| | * | f9bc624e Utilize ISO of token rather than EUID to identify consumable +| | * | c48e1570 Replace TransactionAtoms with a more generic ValidAtomFilter +| | * | 9bb5f7a6 Remove subunits from tokens +| | * | c1e46c5c Refactor Particle Store to be more generic +| | * | fe5b7a40 Retrieve Tokens from universe rather than hardcode +| | * | 4f087e8f Use addresses rather than EUID destinations for determining shards +| | * | a47e4ef1 Add simple support for receiving 3rd party tokens +| | * | 3edca70c Allow only one owner per consumable +| | * | fc632cc0 Move particles into their own package +| | * | 33f51d51 Add API to create a token +| | * | 0c54f078 Refactor AtomBuilder +| | * | 9844df31 Refactor Asset to be a Token application object +| | * | bb79b5b6 Update betanet universe +| |/ / +| * | 0034c707 Merge branch 'master' into betanet +| |\| +| | * c9a77443 Merge pull request #94 from radixdlt/particle-store +| | |\ +| | | * 7a7ffb5d Fix compile errs after rebase +| | | * 08078b1c Add Unit Test to test caching +| | | * 815d60e5 Utilize reducers for managing dapp state +| | | * 37f2b667 Particle store to return all particles associated to an address +| | | * beedd517 Use RadixAddress rather than EUID in interfaces between modules +| | |/ +| | * 37cbcb53 Merge pull request #96 from radixdlt/fix-connection-errs +| | |\ +| | | * 57c4bc40 Use better err messages in RPC/WS clients +| | | * d600ff89 Fix node rotation on failure +| | |/ +| | * 4b43fc96 Fix toAddress when sending to self +| | * 8dda2181 Added JitPack badge to README.md +| | * 2259c8ac (tag: 0.11.4) Releasing 0.11.4 +| | * 3d671df2 Update sunstone universe +| * | 459e4e24 Merge pull request #97 from radixdlt/consumable-refactor +| |\ \ +| | * | 25a93487 Remove AbstractConsumable +| |/ / +| * | 4bec5b8b Merge pull request #95 from radixdlt/atom-model-refactor-poc +| |\ \ +| | * | 25006fef Update universe +| | * | 98fbaa1a Refactor Spin to be an enum rather than a number +| | * | 3985350c Hack to make planck timestamps work for now +| | * | f9253a04 Fix issue with atom collisions +| | * | 4d582efc Update universe +| | * | aa438ad8 Refactor Transfers +| | * | 4b90fa50 Fix TransferParticle +| | * | 86d48425 Fix POW Fee Validation +| | * | fd59a5ab Refactor Data Particles to be accepted by Core json schema validator +| | * | 01a62c44 Refactor Atom to use a single list of generic particles +| | * | 2588e206 Remove deprecated properties in Atom +| |/ / +| * | 2cb86977 Merge branch 'master' into betanet +| |\| +| * | 860c9dee Merge remote-tracking branch 'origin/master' into betanet +| |\ \ +| * \ \ c0e8fcff Merge pull request #90 from radixdlt/master-to-betanet +| |\ \ \ +| | * | | a2159363 Remove universe check for betanet +| | * | | ce78c839 Merge branch 'master' into master-to-betanet +| | |\ \ \ +| | * | | | e9c2d765 Add asset particle type +| | * | | | 5cb6c064 Fix javadocs +| |/ / / / +| * | | | 1163c4fe Merge pull request #84 from mpsandiford/serialize1 +| |\ \ \ \ +| | * | | | cddd62c6 Corrected DsonTest - note that RadixUniverseConfig isn't designed for DSON serialization. +| | * | | | 2d2738a1 Update betanet universe with updated JSON encoding +| | * | | | eb43e111 Fix for metadata serialization. Client and server now talking correctly. +| | * | | | 52a4bdda First draft of new serialization. +| | * | | | 629ed2d5 Bump sonarqube minor version. +| | * | | | f3afd2c7 Bump shadow plugin minor version. +| | * | | | 7f93fd15 Revised DSON interface in line with current serialize1 branch on RadixCore. +| |/ / / / +| * | | | 11cb4cb9 Merge pull request #83 from radixdlt/encryptor-refactor +| |\ \ \ \ +| | * | | | e077c0bf Some fixes based on Feedback from Martin +| | * | | | c58368cd Change json to application/json for contentType +| | * | | | 7536d47a Utilize contentType metadata for encryptor data particle +| | * | | | ee1c4410 Remove encryptor property in Atom and utilize DataParticle List +| | * | | | 32c98ef5 Reuse DataParticle for Encryptor Object +| |/ / / / +| * | | | f4689f7c Merge branch 'master' into betanet +| |\ \ \ \ +| * \ \ \ \ df397903 Merge remote-tracking branch 'origin/master' into betanet +| |\ \ \ \ \ +| * \ \ \ \ \ e9a05c51 Merge pull request #80 from radixdlt/chrono-refactor +| |\ \ \ \ \ \ +| | * | | | | | 61d11356 Refactor Atom timestamps to be ChronoParticle +| |/ / / / / / +| * | | | | | f648b52c Remove API Check for betanet +| * | | | | | 3c22c704 Merge branch 'master' into 'betanet' +| |\ \ \ \ \ \ +| * | | | | | | 0868082e Add more descriptive Exception messages +| * | | | | | | d6c1c436 Merge pull request #78 from radixdlt/transaction-refactor +| |\ \ \ \ \ \ \ +| | * | | | | | | 1c9aa2a9 Add TODO documentation to Atom +| | * | | | | | | 5d3b09ec Separate Consumers and Consumables +| | * | | | | | | 783b1d29 Replace Particle with AbstractConsumable for Token Transfer operations +| |/ / / / / / / +| * | | | | | | 2e3d411b Merge branch 'master' into betanet +| |\ \ \ \ \ \ \ +| * \ \ \ \ \ \ \ 068dab1a Merge pull request #77 from radixdlt/unique-nulljunk-refactor +| |\ \ \ \ \ \ \ \ +| | * \ \ \ \ \ \ \ fc5481bd Merge branch 'unique-property' into unique-nulljunk-refactor +| | |\ \ \ \ \ \ \ \ +| | * | | | | | | | | 5e328dbc Move uniqueParticle outside of particle list of atom +| | * | | | | | | | | 1d613a7a Refactor JunkParticle and IdParticle into UniqueParticle +| |/ / / / / / / / / +| * | | | | | | | | 07339d33 Merge branch 'master' into betanet +| |\ \ \ \ \ \ \ \ \ +| * \ \ \ \ \ \ \ \ \ f5f981d5 Merge pull request #73 from radixdlt/metadata +| |\ \ \ \ \ \ \ \ \ \ +| | * | | | | | | | | | 3cd8b0e1 Fix small issues +| | * | | | | | | | | | abe76632 Merge remote-tracking branch 'origin/betanet' into metadata +| | |\ \ \ \ \ \ \ \ \ \ +| | |/ / / / / / / / / / +| |/| | | | | | | | | | +| * | | | | | | | | | | 1e2e1927 Merge pull request #72 from radixdlt/data-particle +| |\ \ \ \ \ \ \ \ \ \ \ +| | * | | | | | | | | | | a019a43e Fix EncryptorParticle creation issue +| | * | | | | | | | | | | a0324db9 Use LinkedHashMap for predictable ordering for DSON +| * | | | | | | | | | | | 4e6cbce5 Merge branch 'master' into betanet +| |\ \ \ \ \ \ \ \ \ \ \ \ +| | | | * | | | | | | | | | cbf68822 Add a way to get all debug data for Atom Submission Update +| | | | * | | | | | | | | | 700f4662 Add Data Particle Unit Tests +| | | | * | | | | | | | | | 41b7a0eb Implement metaData in DataParticle +| | | |/ / / / / / / / / / +| | | * | | | | | | | | | bac58744 Add documentation +| | | * | | | | | | | | | 30a147de Merge remote-tracking branch 'origin/betanet' into data-particle +| | | |\ \ \ \ \ \ \ \ \ \ +| | |_|/ / / / / / / / / / +| |/| | | | | | | | | | | +| * | | | | | | | | | | | 85586324 Merge pull request #71 from radixdlt/atom-refactor +| |\ \ \ \ \ \ \ \ \ \ \ \ +| | | | * | | | | | | | | | 89493be0 Refactor Encryptor into an EncryptorParticle +| | | | * | | | | | | | | | a0065806 Refactor AtomSubmissionUpdate to have arbitrary debug data +| | | | * | | | | | | | | | 6aafe71f Implement DataParticle structure +| | | |/ / / / / / / / / / +| | |/| | | | | | | | | | +| | * | | | | | | | | | | 211ca2a7 Fix checkstyle +| | * | | | | | | | | | | 604a8c16 Merge branch 'betanet' into atom-refactor +| | |\ \ \ \ \ \ \ \ \ \ \ +| | |/ / / / / / / / / / / +| |/| | | | | | | | | | | +| * | | | | | | | | | | | f88f5fd0 Merge pull request #70 from mpsandiford/shardhigh +| |\ \ \ \ \ \ \ \ \ \ \ \ +| | * | | | | | | | | | | | 8805e6f1 Shard IDs are now the high-order word of EUIDs. +| |/ / / / / / / / / / / / +| | * | | | | | | | | | | 2b3d045e Fix NPE for atoms with no particles +| | * | | | | | | | | | | 141a7038 Refactor Asset to become a property of an Atom +| | * | | | | | | | | | | d57d24fe Cleanup unneeded code after Atom consolidation +| | * | | | | | | | | | | d508de9c Consolidate PayloadAtom into one Atom class +| | * | | | | | | | | | | 6fd851d0 Remove deprecated functionality from Payload Atoms +| | * | | | | | | | | | | 071add54 Consolidate Transaction Atom into Payload Atom +| | * | | | | | | | | | | a26b71c6 Merge branch 'betanet' into atom-refactor +| | |\ \ \ \ \ \ \ \ \ \ \ +| | |/ / / / / / / / / / / +| |/| | | | | | | | | | | +| * | | | | | | | | | | | 575a6b94 Merge pull request #69 from mpsandiford/sha256iso +| |\ \ \ \ \ \ \ \ \ \ \ \ +| | * | | | | | | | | | | | 63f44126 Updated betanet.json to match universe key in the default.config file on RadixCore sha256iso branch. +| | * | | | | | | | | | | | 1b1701f1 Assets now calculate their ID as the sha256 hash of the "ISO" code UTF-8 representation. Previously IDs were calculated using the Java "hashCode()" value. Note that universe files have not been regenerated. Old ones are incompatible with this change. +| |/ / / / / / / / / / / / +| | * | | | | | | | | | | d1cab8c2 Remove Null Atom +| | * | | | | | | | | | | 48067299 Consolidate Transaction Atom and Payload Atom into a single Atom +| |/ / / / / / / / / / / +| * | | | | | | | | | | 7a9ca6e9 Merge branch 'master' into betanet +| |\ \ \ \ \ \ \ \ \ \ \ +| * \ \ \ \ \ \ \ \ \ \ \ 5f6e562b Merge remote-tracking branch 'origin/master' into betanet +| |\ \ \ \ \ \ \ \ \ \ \ \ +| * | | | | | | | | | | | | 1f325d71 Use hex to represent EUIDs +| * | | | | | | | | | | | | 51a69ad4 Add a more descriptive exception for json rpc errors +| * | | | | | | | | | | | | f4d9c9e4 Add betanet configuration +| * | | | | | | | | | | | | 6fa571c9 Merge remote-tracking branch 'mpsandiford/euid128' into betanet +| |\ \ \ \ \ \ \ \ \ \ \ \ \ +| | * | | | | | | | | | | | | cceca517 Replaced 96-bit EUID assumption in test case with 128-bit assumption. +| | * | | | | | | | | | | | | d000fa4d Minor whitespace changes to placate checkstyle. +| | * | | | | | | | | | | | | 3ada7f49 Modifications to work with RadixCore euid128 change. +| |/ / / / / / / / / / / / / +* | | | | | | | | | | | | | eff2c7d5 Merge pull request #93 from radixdlt/head-support +|\ \ \ \ \ \ \ \ \ \ \ \ \ \ +| |_|_|_|_|_|_|_|_|_|_|_|_|/ +|/| | | | | | | | | | | | | +| * | | | | | | | | | | | | 233fca26 Use flatMap rather than flatMapIterable for Head support +| * | | | | | | | | | | | | bf6881ad Get rid of debouncer for consumable detection, utilize HEAD instead +| * | | | | | | | | | | | | 91c8c2bb Utilize AtomObservations in subscriptions rather than just Raw Atoms +| * | | | | | | | | | | | | 18420d2b Remove AtomQuery class +|/ / / / / / / / / / / / / +* | | | | | | | | | | | | ff4dbca2 (tag: 0.11.3) Update README for hotfix release +* | | | | | | | | | | | | e3928623 Fix retrieving atoms from other addresses +| |_|_|_|_|_|_|_|_|_|_|/ +|/| | | | | | | | | | | +* | | | | | | | | | | | 6eb053c9 (tag: 0.11.2) Update README for hotfix release +* | | | | | | | | | | | 3124e166 Merge pull request #91 from radixdlt/identities-hotfix +|\ \ \ \ \ \ \ \ \ \ \ \ +| |_|_|_|_|_|_|_|_|_|_|/ +|/| | | | | | | | | | | +| * | | | | | | | | | | f931cceb Make sure to flush new identities created +|/ / / / / / / / / / / +* | | | | | | | | | | 6a8fbd6c (tag: 0.11.1) Update README +* | | | | | | | | | | 347eddde Handle initial connection errors more gracefully +* | | | | | | | | | | 46291b5e (tag: 0.11.0) Merge pull request #88 from radixdlt/connections-refactor +|\ \ \ \ \ \ \ \ \ \ \ +| * | | | | | | | | | | 30d8cf22 Update README +| * | | | | | | | | | | e24ae1a2 Add ability for dapp to prefetch atoms +| * | | | | | | | | | | 30c90870 Cleanup/refactor of Ledger interface +| * | | | | | | | | | | e5b526a5 Refactor of RadixLedger into smaller modules +| * | | | | | | | | | | 63982e0b Implement an AtomStore interface, in memory implementation for now +| * | | | | | | | | | | c46eb403 Remove dependency of ConsumableDataSource in RadixApplicationAPI +| * | | | | | | | | | | c5bdb1f0 Remove RadixApplicationAPI dependency on RadixLedger +| * | | | | | | | | | | 669f2a30 Utilize a cache to store all atoms for a given shard +| * | | | | | | | | | | ce09dff3 Remove AtomClass from AtomQuery +|/ / / / / / / / / / / +* | | | | | | | | | | 46f1ba80 Merge pull request #87 from radixdlt/wallet-refactor +|\ \ \ \ \ \ \ \ \ \ \ +| * | | | | | | | | | | f1288aba Change ordering of parameters to sendWhenAvailable for consistency +| * | | | | | | | | | | d1da48b2 Change ordering to wallet send action parameters +| * | | | | | | | | | | 68326439 Use format specifiers rather than String concatenation for logging +| * | | | | | | | | | | c339cf4f Simplify API naming scheme of native wallet +|/ / / / / / / / / / / +* | | | | | | | | | | aec0c283 Merge pull request #86 from radixdlt/network-fix +|\ \ \ \ \ \ \ \ \ \ \ +| * | | | | | | | | | | f58162e7 Include gradle repositories in radixdlt-java subproject +| * | | | | | | | | | | 818a1d15 Retry on findPeers error +| * | | | | | | | | | | 3a0a1f82 Move universe check into RadixLedger from RadixNetwork +|/ / / / / / / / / / / +* | | | | | | | | | | 588e9c7b Merge pull request #85 from radixdlt/parse-universe +|\ \ \ \ \ \ \ \ \ \ \ +| * | | | | | | | | | | cb4ba006 Add Universe check with connecting node +| * | | | | | | | | | | 6e98e549 Remove UnknownAtom class +|/ / / / / / / / / / / +* | | | | | | | | | / fe1c9a6f Add method to create a universe config from base64 dson +| |_|_|_|_|_|_|_|_|/ +|/| | | | | | | | | +* | | | | | | | | | dd6f09f5 Refactor to simplify RadixApplicationAPI unit test +| |_|_|_|_|_|_|_|/ +|/| | | | | | | | +* | | | | | | | | fa650df0 Merge pull request #82 from radixdlt/refactor-identity +|\ \ \ \ \ \ \ \ \ +| * | | | | | | | | f88de2e8 Expose API to get all data at an address +| * | | | | | | | | 882e27e3 Refactor Identity classes +|/ / / / / / / / / +* | | | | | | | | 05d88764 Merge pull request #81 from radixdlt/highgarden +|\ \ \ \ \ \ \ \ \ +| * | | | | | | | | e0a64bfb highgarden universe changed (again) +|/ / / / / / / / / +* | | | | | | | | fc467d57 Remove API Check +* | | | | | | | | e3ac9e4c Merge pull request #62 from nadam/master +|\ \ \ \ \ \ \ \ \ +| |_|_|_|_|_|_|_|/ +|/| | | | | | | | +| * | | | | | | | 20b698fc Merge branch 'master' into master +| |\ \ \ \ \ \ \ \ +| |/ / / / / / / / +|/| | | | | | | | +* | | | | | | | | c7479bb0 Merge pull request #79 from radixdlt/api-version-check +|\ \ \ \ \ \ \ \ \ +| * | | | | | | | | 9e78b799 Implement API Version Check with Server +|/ / / / / / / / / +| * / / / / / / / 249c26a6 Support for alternative storage using Reader and Writer in the constructors. Improved exception declarations. +|/ / / / / / / / +* | | | | | | | 495d4f2a (tag: 0.10.2) Add method to create Amount from a BigDecimal +* | | | | | | | 9927b70a Update highgarden universe +* | | | | | | | 933a4a47 (tag: 0.10.1) Update README.md with new release version +* | | | | | | | 4e41ca07 (tag: 0.10.0) Add temporary hack to allow data with no applicationId to be submitted +| |_|_|_|_|_|/ +|/| | | | | | +* | | | | | | 0a304f0a Cleanup README.md +* | | | | | | e6822a5b Merge pull request #76 from radixdlt/unique-property +|\ \ \ \ \ \ \ +| | |_|_|_|_|/ +| |/| | | | | +| * | | | | | b9965d08 Remove unused import +| * | | | | | d3eb30b8 Fix name UNKNOWN_ERROR +| * | | | | | 1ec3bbf3 Implement toCompletable in TransferResult Class +| * | | | | | 2a29a50b Fix NPE +| * | | | | | ac9b7d84 Add uniqueable transactions to wallet api +| * | | | | | 0d8eef35 Create Unique Property application layer object +|/ / / / / / +* | | | | / 6a71f52b Fix README +| |_|_|_|/ +|/| | | | +* | | | | 27589126 Merge pull request #75 from juztamau5/java-10 +|\ \ \ \ \ +| * | | | | 53c0d9f3 Gradle: Update Mockito to version 2.17.0 +| | |_|_|/ +| |/| | | +* | | | | e46df95b (tag: v0.10.0) Merge pull request #74 from radixdlt/documentation +|\ \ \ \ \ +| |/ / / / +|/| | | | +| * | | | f5a65b6a Update release version +| * | | | e08b3c98 Remove unused import +| * | | | 93144f99 Update README documentation +| * | | | e82a1f61 Add API method to retrieve Public Key of user +| * | | | 4d10017b Rename XRD asset to TEST for testnets +| * | | | 01754409 Refactor AssetAmount and use in the Application API +| * | | | 2f7032d5 Add Unit Tests for the Application Level Data object +| * | | | 10e8dffb Change method names of Application API +|/ / / / +* | | / 2f4cc4f0 Add Documentation and another method in Radix Wallet +| |_|/ +|/| | +* | | 55eba167 Merge pull request #68 from radixdlt/application-layer +|\ \ \ +| |_|/ +|/| | +| * | e13deef1 Include Payload attachments to Token Transfers +| * | 7848737a Refactor RadixIdentity to use Application Layer Objects for decryption +| * | eaca720e Move Identity module to be a higher level Application Layer construct +| * | 8c2e73dd Refactor Data Application Layer Objects encryption structure +| * | f00bd8f7 Include timestamp in TokenTransfer action object +| * | 976feee3 Fix name of TokenTransferTranslator +| * | ccb7ea2d Handle translating Emissions +| * | 6a0297fb Use Observable rather than Completable for Transfer results +| * | 2f6027e9 Refactor wallet to utilize Token Transfer Application Layer Spec +| * | 2c9cead4 Fix issue where unsubscribed API calls were not being executed +| * | 86863c68 Create a Consumable Data source abstraction +| * | 2c2c552d Increase Coverage of RadixApplicationAPI Junit Test +| * | 5691f282 Move wallet and messaging into separate dapps package +| * | eae6f5e8 Merge branch 'master' into application-layer +| |\ \ +| |/ / +|/| | +* | | b6a5dd80 Merge pull request #66 from radixdlt/data-application-layer +|\ \ \ +| |_|/ +|/| | +| | * 4792e06a Add JUnit test for RadixApplicationAPI +| | * 8e0c1ece Refactor application package +| |/ +| * ee492e0a Create subscribe application layer action which retrieves all data +| * e8da5154 Include a default universe RadixApplicationAPI constructor +| * f919c13b Remove unused classes and methods from refactor +| * 03b5e116 Refactor RadixMessaging to use application layer +| * a5d0f33b Implement storeData method in Application Layer +| * 02b36440 Remove complex examples +|/ +* b64eecc8 Merge pull request #64 from radixdlt/websocket-refactor +|\ +| * e4dc4fef Test for failures in PeersFromSeed +| * dd1d834d Refactor PeersFromSeed to be more easily unit tested +| * f801b872 Add WebSocketClient Unit tests for websocket failures +| * 6a7531dd Use Request class to specify endpoint for WebSocketClient +| * d85b25be Remove WebSocketClient inheritance of WebSocketListener +|/ +* 6fb0481d Fix unused import +* a508687e Fix file separator issue for resource loading on Windows +* 863e23b8 Merge pull request #61 from radixdlt/jwt-service +|\ +| * 118dae27 Add WalletTransaction getAmount Test +| * 8f9eb2db Add Helper function for retrieving all senders of a Transaction Atom +| * 222340d0 Add ability to use unique ID particle for messaging +|/ +* 61aa03aa Merge pull request #60 from radixdlt/faucet-refactor +|\ +| * 1fe76af4 Move faucet address calculation to be a local variable +| * 5864605e Simplify Faucet flow logic +| * 137f7088 Fix imports to satisfy sonarqube +| * c3534e1a Refactor Faucet to make use of a simple RateLimiter +| * 159ba546 Utilize groupedObservable for managing sessions between addresses +| * 807fa12d Add Simple CreateReply test for Messages +| * 8fc2cfc9 Create RadixMessage helper method createReply +* | 38817736 Merge pull request #58 from nadam/master +|\ \ +| |/ +|/| +| * 10c4aa16 Moved isPowerOfTen() to the class where it's used +| * 48291651 Minor +| * abd14a97 Decimal format for assets that have a fixed number of decimals +| * 1fae51b0 Decimal format of assets that are powers of 10 +* | dcced3c7 (tag: 0.9.3) Merge pull request #57 from radixdlt/fix-errorcrashandroid +|\ \ +| * | 8b14f14a Keep on retrying with backoff if connection to node-finder fails +| * | 0270ee74 Handle errors when failing to find Peers which will prevent Android apps from crashing. +| |/ +* | 0884ec95 Merge pull request #59 from radixdlt/fix-bcandroid +|\ \ +| |/ +|/| +| * 1341cd0c Remove deprecated wallet test +| * 7ddaaa4c Ensure Bouncy Castle when used on Android uses the correct provider on class initialisation. +|/ +* 9b5b6036 Merge pull request #53 from radixdlt/sonarcloud-fixes +|\ +| * ace056b4 Add junit test for HttpClient creation +| * 83b9a4bb Fix HttpClients +|/ +* 8d58b6c6 Merge pull request #51 from radixdlt/universe-json-support +|\ +| * 518a5df2 Remove unused imports +| * 561f7f72 Add getConfig method to RadixUniverse +| * ef80eda6 Add JSON support for retrieving universe information +|/ +* c0474440 Merge pull request #52 from radixdlt/refactor-universeconfig +|\ +| * 0cc2fd4a Add the hashCode method that got deleted. +| * c8d711d9 Refactor Universe config to use files located in resources folder. +* | 91cab485 Merge pull request #50 from radixdlt/lurker-api +|\ \ +| |/ +|/| +| * 151d62c3 Fix atom submission bug +| * d14a7b9e Use better names for jsonRpc calls +| * 65a2d18a Add JUnit test for cancelling subscriptions +| * 6fc0164f Utilize generic subscription method for JSON-RPC subscriptions +| * b315fe1d Use generic json-rpc method call for subscription calls +| * 336ce9f7 Refactor of callJsonRpcMethod to be more generic +|/ +* 099727e2 Merge pull request #48 from radixdlt/fix-sonarcloud-bugs +|\ +| * 0fbecf6e Resource closing and other minor fixes +|/ +* c7a1b614 Merge pull request #44 from radixdlt/fix-equals +|\ +| * 756d5a4b Better checks for equals() +|/ +* 919fd77e Merge pull request #26 from radixdlt/getatom-api +|\ +| * 4307d4c0 Expose API for retrieving an atom by HID +|/ +* c5c44877 Merge pull request #30 from radixdlt/refactor-radix-client +|\ +| * c30685a3 Add Javadocs to RadixJsonRpcClient +| * 15bee259 Remove deprecated code from RadixJsonRpcClient +| * 3ff29dbc Refactor submitAtom to utilize observables logic +| * c3ccb5d6 Add basic submitAtom JUnit Test +| * 361d2638 Refactor getAtoms to utilize observables logic +| * 41630469 Add basic getAtoms JUnit Test +| * 8f255809 Fix checkstyle for new classes +| * c86019e9 Merge remote-tracking branch 'origin/master' into refactor-radix-client +| |\ +| |/ +|/| +* | 2cff8919 Merge pull request #29 from radixdlt/android-bc-compatibility +|\ \ +| * | 0585f6fe No default constructor for AndroidUtil utility class +| * | 4aa53015 Merge remote-tracking branch 'origin/master' into android-bc-compatibility +| |\ \ +| |/ / +|/| | +* | | 891d688f Merge pull request #28 from radixdlt/checkstyle +|\ \ \ +| * | | 0d215264 Fixes for checkstyle +| * | | 2a9f6670 Enabled checkstyle +| * | | 4a57e83c travis: multiple build stages +|/ / / +| * / b0d9db97 Android ships with an old version of BouncyCastle hence to ensure we use the version shipped with the library the BC provider has to first be removed. +|/ / +* | 51280702 fixed badge links +* | 0a847e49 Merge pull request #24 from radixdlt/travis-ci +|\ \ +| * | 99b6f275 enabled jacoco and sonarqube +| * | cefedf74 renamed .travis-ci.yml -> .travis.yml +|/ / +| * 85c1346f Remove some logging +| * 362e2ebd Reuse same observable logic in getLivePeers +| * dcfacf59 Add error test in JsonRpcClient +| * 97c64759 Add getSelf unit test for JsonRpcClient +| * ed637834 Change RadixClient to more descriptive name RadixJsonRpcClient +| * ce8d028f Decoupled Network specific logic from RadixClient.java +| * ab2e0122 Merge remote-tracking branch 'origin/travis-ci' +|/| +| * ec09ae78 enabled jacoco and sonarqube +| * 876ccada update .travis.yml +| * fd64af5c renamed .travis-ci.yml -> .travis.yml +* | 88d157d8 Merge pull request #21 from radixdlt/dynamic_versions +|\ \ +| |/ +|/| +| * a2512b07 changed to dynamic version based on git describe +* | a7919102 Merge pull request #23 from radixdlt/refactor-tests +|\ \ +| * | d6d55deb Don't remove BouncyCastleProvider before inserting it +| * | 120de6cb Refactor TransactionAtomsTest +| * | 7d69a8b3 Use a supplier for OkHttpClient +| * | a87b78f9 Refactor ECKeyPairGenerator +| * | e1ff959c Remove use of getUnconsumedConsumables +| * | a3d4187c Remove dependency on bouncycastle in RadixAtomValidatorTest +| * | d3d41019 Remove dependency on bouncycastle in RadixMessagingTest +* | | 5b278cec Integrated Travis CI +| |/ +|/| +* | 86cc2331 Merge pull request #20 from radixdlt/fix-faucet +|\ \ +| |/ +|/| +| * e858e50e Fix InsufficientFundsException message +|/ +* bba3f892 Merge pull request #19 from radixdlt/jitpack +|\ +| * 5eed33d2 changed from bintray -> jitpack +* | c6f488f1 Merge pull request #18 from nadam/master +|\| +| * be871353 Renamed "change" to "amount" and added some JavaDoc +|/ +* d591dea8 (tag: 0.9.2) Merge pull request #7 from radixdlt/refactor-address +|\ +| * 2fcc0e8b Refactor RadixAddress and particle owner checks +|/ +* 91e93014 (tag: 0.9.1) update install notes - its now mirrored in jcenter +* bd80218c fixed exception about missing bintrayUser property +* 280e7baf Fixed empty jar in 0.9.0 +* c7d4c732 (tag: 0.9.0) fixed install instructions in README.md +* 349c668d publish all artifacts needed by jcenter/mavenCentral +* c75f336d release version 0.9.0 +* 1c59692d Set theme jekyll-theme-hacker +* 82246fde Initial release for alpha diff --git a/radixdlt-java/src/main/java/com/radixdlt/client/application/RadixApplicationAPI.java b/radixdlt-java/src/main/java/com/radixdlt/client/application/RadixApplicationAPI.java index d595dd265..092b267c2 100644 --- a/radixdlt-java/src/main/java/com/radixdlt/client/application/RadixApplicationAPI.java +++ b/radixdlt-java/src/main/java/com/radixdlt/client/application/RadixApplicationAPI.java @@ -42,9 +42,15 @@ import com.radixdlt.client.application.translate.StatefulActionToParticleGroupsMapper; import com.radixdlt.client.application.translate.StatelessActionToParticleGroupsMapper; import com.radixdlt.client.application.translate.data.AtomToDecryptedMessageMapper; +import com.radixdlt.client.application.translate.data.AtomToCRUDataUpdateMapper; +import com.radixdlt.client.application.translate.data.CRUDataUpdate; +import com.radixdlt.client.application.translate.data.CreateDataAction; +import com.radixdlt.client.application.translate.data.CreateDataToParticleGroupsMapper; import com.radixdlt.client.application.translate.data.DecryptedMessage; import com.radixdlt.client.application.translate.data.SendMessageAction; import com.radixdlt.client.application.translate.data.SendMessageToParticleGroupsMapper; +import com.radixdlt.client.application.translate.data.UpdateDataAction; +import com.radixdlt.client.application.translate.data.UpdateDataToParticleGroupsMapper; import com.radixdlt.client.application.translate.tokens.AtomToTokenTransfersMapper; import com.radixdlt.client.application.translate.tokens.BurnTokensAction; import com.radixdlt.client.application.translate.tokens.BurnTokensActionMapper; @@ -146,13 +152,16 @@ public static RadixApplicationAPIBuilder defaultBuilder() { SendMessageAction.class, new SendMessageToParticleGroupsMapper(ECKeyPair::generateNew) ) + .addStatelessParticlesMapper(CreateDataAction.class, new CreateDataToParticleGroupsMapper()) .addStatelessParticlesMapper(CreateTokenAction.class, new CreateTokenToParticleGroupsMapper()) .addStatelessParticlesMapper(PutUniqueIdAction.class, new PutUniqueIdToParticleGroupsMapper()) + .addStatefulParticlesMapper(UpdateDataAction.class, new UpdateDataToParticleGroupsMapper()) .addStatefulParticlesMapper(MintTokensAction.class, new MintTokensActionMapper()) .addStatefulParticlesMapper(BurnTokensAction.class, new BurnTokensActionMapper()) .addStatefulParticlesMapper(TransferTokensAction.class, new TransferTokensToParticleGroupsMapper()) .addReducer(new TokenDefinitionsReducer()) .addReducer(new TokenBalanceReducer()) + .addAtomMapper(new AtomToCRUDataUpdateMapper()) .addAtomMapper(new AtomToDecryptedMessageMapper()) .addAtomMapper(new AtomToTokenTransfersMapper()) .addAtomErrorMapper(new AlreadyUsedUniqueIdReasonMapper()); @@ -435,6 +444,50 @@ public Result sendMessage(RadixAddress toAddress, byte[] data, boolean encrypt) return execute(sendMessageAction); } + /** + * Returns a never ending stream of messages stored at a given address. pull() + * must be called to continually retrieve the latest messages. + * + * @param address the address to retrieve the messages from + * @return a cold observable of the messages at the given address + */ + public Observable observeData(RadixAddress address) { + Objects.requireNonNull(address); + return observeActions(CRUDataUpdate.class, address); + } + + /** + * Sends a message to one's self + * + * @param data the message to send + * @param encrypt if true, encrypts the message with a encrypted private key + * @return result of the send message execution + */ + public Result createData(RRI rri, byte[] data) { + RadixAddress address = getAddress(); + if (!rri.getAddress().equals(address)) { + throw new IllegalArgumentException(); + } + CreateDataAction createDataAction = CreateDataAction.create(rri, data); + return execute(createDataAction); + } + + /** + * Sends a message to one's self + * + * @param data the message to send + * @param encrypt if true, encrypts the message with a encrypted private key + * @return result of the send message execution + */ + public Result updateData(RRI rri, byte[] data) { + RadixAddress address = getAddress(); + if (!rri.getAddress().equals(address)) { + throw new IllegalArgumentException(); + } + UpdateDataAction updateAction = UpdateDataAction.create(rri, data); + return execute(updateAction); + } + /** * Returns a never ending stream of token transfers stored at the current address. * pull() must be called to continually retrieve the latest transfers. diff --git a/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/AtomToCRUDataUpdateMapper.java b/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/AtomToCRUDataUpdateMapper.java new file mode 100644 index 000000000..0e9ca62e4 --- /dev/null +++ b/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/AtomToCRUDataUpdateMapper.java @@ -0,0 +1,58 @@ +/* + * (C) Copyright 2020 Radix DLT Ltd + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the “Software”), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +package com.radixdlt.client.application.translate.data; + +import java.util.List; +import java.util.stream.Collectors; + +import com.radixdlt.client.application.identity.RadixIdentity; +import com.radixdlt.client.application.translate.AtomToExecutedActionsMapper; +import com.radixdlt.client.atommodel.cru.CRUDataParticle; +import com.radixdlt.client.core.atoms.Atom; +import com.radixdlt.client.core.atoms.particles.SpunParticle; + +import io.reactivex.Observable; + +/** + * Maps an atom to some number of CRUDataUpdate + */ +public class AtomToCRUDataUpdateMapper implements AtomToExecutedActionsMapper { + + @Override + public Class actionClass() { + return CRUDataUpdate.class; + } + + @Override + public Observable map(Atom atom, RadixIdentity identity) { + long timestamp = atom.getTimestamp(); + List dataUpdates = atom.spunParticles() + .map(SpunParticle::getParticle) + .filter(p -> p instanceof CRUDataParticle) + .map(CRUDataParticle.class::cast) + .map(p -> new CRUDataUpdate(p.rri(), p.data(), timestamp, p.euid())) + .collect(Collectors.toList()); + return Observable.fromIterable(dataUpdates); + } + +} diff --git a/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/CRUDataUpdate.java b/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/CRUDataUpdate.java new file mode 100644 index 000000000..4387b03b8 --- /dev/null +++ b/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/CRUDataUpdate.java @@ -0,0 +1,71 @@ +/* + * (C) Copyright 2020 Radix DLT Ltd + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the “Software”), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +package com.radixdlt.client.application.translate.data; + + +import com.radixdlt.identifiers.EUID; +import com.radixdlt.identifiers.RRI; +import com.radixdlt.utils.Bytes; + +/** + * An application layer object representing some data found on the ledger. + */ +public class CRUDataUpdate { + + private final RRI rri; + private final byte[] data; + private final long timestamp; + private final EUID actionId; + + public CRUDataUpdate(RRI rri, byte[] data, long timestamp, EUID actionId) { + this.rri = rri; + this.data = data; + this.timestamp = timestamp; + this.actionId = actionId; + } + + /** + * The unique id for the this message action + * @return euid for the action + */ + public EUID getActionId() { + return actionId; + } + + public byte[] getData() { + return data; + } + + public long getTimestamp() { + return timestamp; + } + + public RRI rri() { + return rri; + } + + @Override + public String toString() { + return timestamp + " " + rri + " -> " + " " + Bytes.toHexString(data); + } +} diff --git a/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/CreateDataAction.java b/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/CreateDataAction.java new file mode 100644 index 000000000..2d1a9958e --- /dev/null +++ b/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/CreateDataAction.java @@ -0,0 +1,58 @@ +/* + * (C) Copyright 2020 Radix DLT Ltd + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the “Software”), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +package com.radixdlt.client.application.translate.data; + +import java.util.Objects; + +import com.radixdlt.client.application.translate.Action; +import com.radixdlt.identifiers.RRI; + +/** + * An Action object which sends a data transaction from one account to another. + */ +public final class CreateDataAction implements Action { + private final RRI rri; + private final byte[] data; + + private CreateDataAction(RRI rri, byte[] data) { + this.rri = rri; + this.data = Objects.requireNonNull(data); + } + + public static CreateDataAction create(RRI rri, byte[] data) { + return new CreateDataAction(rri, data); + } + + public byte[] getData() { + return data; + } + + public RRI getRRI() { + return rri; + } + + @Override + public String toString() { + return "Updating data FOR resource" + rri; + } +} diff --git a/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/CreateDataToParticleGroupsMapper.java b/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/CreateDataToParticleGroupsMapper.java new file mode 100644 index 000000000..98818f82f --- /dev/null +++ b/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/CreateDataToParticleGroupsMapper.java @@ -0,0 +1,55 @@ +/* + * (C) Copyright 2020 Radix DLT Ltd + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the “Software”), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +package com.radixdlt.client.application.translate.data; + +import java.util.Collections; +import java.util.List; + +import com.radixdlt.client.application.translate.StatelessActionToParticleGroupsMapper; +import com.radixdlt.client.atommodel.cru.CRUDataParticle; +import com.radixdlt.client.atommodel.rri.RRIParticle; +import com.radixdlt.client.core.atoms.ParticleGroup; +import com.radixdlt.client.core.atoms.particles.SpunParticle; + +/** + * Maps a send message action to the particles necessary to be included in an + * atom. + */ +public class CreateDataToParticleGroupsMapper implements StatelessActionToParticleGroupsMapper { + + private static final int INITIAL_VERSION = 0; + + /** + * + * @param action the action to mapToParticles to particles + * @return observable of spunparticles to be included in an atom for a given + * action + */ + @Override + public List mapToParticleGroups(CreateDataAction action) { + RRIParticle rriParticle = new RRIParticle(action.getRRI()); + CRUDataParticle cruParticule = new CRUDataParticle(action.getRRI(), INITIAL_VERSION, action.getData()); + ParticleGroup particleGroup = ParticleGroup.of(SpunParticle.down(rriParticle), SpunParticle.up(cruParticule)); + return Collections.singletonList(particleGroup); + } +} diff --git a/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/UpdateDataAction.java b/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/UpdateDataAction.java new file mode 100644 index 000000000..5ffd47ec0 --- /dev/null +++ b/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/UpdateDataAction.java @@ -0,0 +1,58 @@ +/* + * (C) Copyright 2020 Radix DLT Ltd + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the “Software”), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +package com.radixdlt.client.application.translate.data; + +import java.util.Objects; + +import com.radixdlt.client.application.translate.Action; +import com.radixdlt.identifiers.RRI; + +/** + * An Action object which sends a data transaction from one account to another. + */ +public final class UpdateDataAction implements Action { + private final RRI rri; + private final byte[] data; + + private UpdateDataAction(RRI rri, byte[] data) { + this.rri = rri; + this.data = Objects.requireNonNull(data); + } + + public static UpdateDataAction create(RRI rri, byte[] data) { + return new UpdateDataAction(rri, data); + } + + public byte[] getData() { + return data; + } + + public RRI getRRI() { + return rri; + } + + @Override + public String toString() { + return "Updating data FOR resource" + rri; + } +} diff --git a/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/UpdateDataToParticleGroupsMapper.java b/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/UpdateDataToParticleGroupsMapper.java new file mode 100644 index 000000000..4d6837bbd --- /dev/null +++ b/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/UpdateDataToParticleGroupsMapper.java @@ -0,0 +1,66 @@ +/* + * (C) Copyright 2020 Radix DLT Ltd + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the “Software”), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ +package com.radixdlt.client.application.translate.data; + +import java.util.Collections; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import com.google.common.collect.ImmutableSet; +import com.radixdlt.client.application.translate.ShardedParticleStateId; +import com.radixdlt.client.application.translate.StageActionException; +import com.radixdlt.client.application.translate.StatefulActionToParticleGroupsMapper; +import com.radixdlt.client.atommodel.cru.CRUDataParticle; +import com.radixdlt.client.core.atoms.ParticleGroup; +import com.radixdlt.client.core.atoms.particles.Particle; +import com.radixdlt.client.core.atoms.particles.SpunParticle; +import com.radixdlt.identifiers.RRI; +import com.radixdlt.identifiers.RadixAddress; + + + +public class UpdateDataToParticleGroupsMapper implements StatefulActionToParticleGroupsMapper { + + @Override + public Set requiredState(UpdateDataAction updateDataAction) { + RadixAddress addresss = updateDataAction.getRRI().getAddress(); + return ImmutableSet.of(ShardedParticleStateId.of(CRUDataParticle.class, addresss)); + } + + @Override + public List mapToParticleGroups(UpdateDataAction updateDataAction, Stream store) throws StageActionException { + RRI rri = updateDataAction.getRRI(); + List records = store.filter((p) -> p instanceof CRUDataParticle) + .map(CRUDataParticle.class::cast) + .filter(p -> p.rri().equals(rri)) + .collect(Collectors.toList()); + if (records.size() != 1) { + throw new IllegalStateException("Broken"); + } + CRUDataParticle prevData = records.get(0); + CRUDataParticle newData = new CRUDataParticle(rri, prevData.serialno() + 1, updateDataAction.getData()); + ParticleGroup particleGroup = ParticleGroup.of(SpunParticle.down(prevData), SpunParticle.up(newData)); + return Collections.singletonList(particleGroup); + } +} diff --git a/radixdlt-java/src/main/java/com/radixdlt/client/atommodel/cru/CRUDataParticle.java b/radixdlt-java/src/main/java/com/radixdlt/client/atommodel/cru/CRUDataParticle.java new file mode 100644 index 000000000..e5a287f8f --- /dev/null +++ b/radixdlt-java/src/main/java/com/radixdlt/client/atommodel/cru/CRUDataParticle.java @@ -0,0 +1,84 @@ +package com.radixdlt.client.atommodel.cru; + +import java.util.Objects; + +import javax.annotation.concurrent.Immutable; + +/* + * (C) Copyright 2020 Radix DLT Ltd + * + * Radix DLT Ltd licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the + * License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific + * language governing permissions and limitations under the License. + */ + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.radixdlt.client.core.atoms.particles.Particle; +import com.radixdlt.identifiers.RRI; +import com.radixdlt.serialization.DsonOutput; +import com.radixdlt.serialization.DsonOutput.Output; +import com.radixdlt.serialization.SerializerId2; +import com.radixdlt.utils.Bytes; + +/** + * Particle representing a fixed supply token definition + */ +@Immutable +@SerializerId2("radix.particles.cru") +public final class CRUDataParticle extends Particle { + + // Account and lookup key + @JsonProperty("rri") + @DsonOutput(Output.ALL) + private RRI rri; + + // Serial / version number for updates + // First creation must == 0, updates incrementing monotonically + @JsonProperty("serialno") + @DsonOutput(Output.ALL) + private long serialno; + + // The actual data + @JsonProperty("data") + @DsonOutput(Output.ALL) + private byte[] data; + + CRUDataParticle() { + super(); + } + + public CRUDataParticle(RRI rri, long serialno, byte[] data) { + super(rri.getAddress().euid()); + + this.rri = rri; + this.serialno = serialno; + this.data = Objects.requireNonNull(data); + } + + public RRI rri() { + return this.rri; + } + + public long serialno() { + return this.serialno; + } + + public byte[] data() { + return this.data.clone(); + } + + @Override + public String toString() { + String stringData = this.data == null ? "" : Bytes.toHexString(this.data); + return String.format("%s[(%s:%s), (%s)]", getClass().getSimpleName(), String.valueOf(this.rri), this.serialno, stringData); + } +} \ No newline at end of file From bf4ea136f97037014d4e01a24fe179e824f8dce6 Mon Sep 17 00:00:00 2001 From: romi Date: Thu, 21 May 2020 19:04:36 +0300 Subject: [PATCH 2/5] Javadocs fixed. --- .../application/RadixApplicationAPI.java | 26 +++---- .../UpdateDataToParticleGroupsMapper.java | 5 +- .../translate/data/CRUDataUpdateTest.java | 70 +++++++++++++++++++ 3 files changed, 86 insertions(+), 15 deletions(-) create mode 100644 radixdlt-java/src/test/java/com/radixdlt/client/application/translate/data/CRUDataUpdateTest.java diff --git a/radixdlt-java/src/main/java/com/radixdlt/client/application/RadixApplicationAPI.java b/radixdlt-java/src/main/java/com/radixdlt/client/application/RadixApplicationAPI.java index 092b267c2..22801d884 100644 --- a/radixdlt-java/src/main/java/com/radixdlt/client/application/RadixApplicationAPI.java +++ b/radixdlt-java/src/main/java/com/radixdlt/client/application/RadixApplicationAPI.java @@ -43,7 +43,7 @@ import com.radixdlt.client.application.translate.StatelessActionToParticleGroupsMapper; import com.radixdlt.client.application.translate.data.AtomToDecryptedMessageMapper; import com.radixdlt.client.application.translate.data.AtomToCRUDataUpdateMapper; -import com.radixdlt.client.application.translate.data.CRUDataUpdate; +import com.radixdlt.client.application.translate.data.CRUDataUpdateTest; import com.radixdlt.client.application.translate.data.CreateDataAction; import com.radixdlt.client.application.translate.data.CreateDataToParticleGroupsMapper; import com.radixdlt.client.application.translate.data.DecryptedMessage; @@ -445,23 +445,23 @@ public Result sendMessage(RadixAddress toAddress, byte[] data, boolean encrypt) } /** - * Returns a never ending stream of messages stored at a given address. pull() - * must be called to continually retrieve the latest messages. + * Returns a never ending stream of data stored at a given address. The pull() + * method must be called to continually retrieve the latest messages. * - * @param address the address to retrieve the messages from + * @param address the address to retrieve data from * @return a cold observable of the messages at the given address */ - public Observable observeData(RadixAddress address) { + public Observable observeData(RadixAddress address) { Objects.requireNonNull(address); - return observeActions(CRUDataUpdate.class, address); + return observeActions(CRUDataUpdateTest.class, address); } /** - * Sends a message to one's self + * Creates a data resource and store it * - * @param data the message to send - * @param encrypt if true, encrypts the message with a encrypted private key - * @return result of the send message execution + * @param rri the resource which will be associated with this data + * @param data to be store + * @return result of the create data action */ public Result createData(RRI rri, byte[] data) { RadixAddress address = getAddress(); @@ -473,10 +473,10 @@ public Result createData(RRI rri, byte[] data) { } /** - * Sends a message to one's self + * Update an existing data resource * - * @param data the message to send - * @param encrypt if true, encrypts the message with a encrypted private key + * @param rri the resource which is associated with this data + * @param data new version of data * @return result of the send message execution */ public Result updateData(RRI rri, byte[] data) { diff --git a/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/UpdateDataToParticleGroupsMapper.java b/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/UpdateDataToParticleGroupsMapper.java index 4d6837bbd..03b8ed097 100644 --- a/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/UpdateDataToParticleGroupsMapper.java +++ b/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/UpdateDataToParticleGroupsMapper.java @@ -48,15 +48,16 @@ public Set requiredState(UpdateDataAction updateDataActi return ImmutableSet.of(ShardedParticleStateId.of(CRUDataParticle.class, addresss)); } + @SuppressWarnings("serial") @Override public List mapToParticleGroups(UpdateDataAction updateDataAction, Stream store) throws StageActionException { RRI rri = updateDataAction.getRRI(); - List records = store.filter((p) -> p instanceof CRUDataParticle) + List records = store.filter( p -> p instanceof CRUDataParticle) .map(CRUDataParticle.class::cast) .filter(p -> p.rri().equals(rri)) .collect(Collectors.toList()); if (records.size() != 1) { - throw new IllegalStateException("Broken"); + throw new StageActionException("Broken storage") {}; } CRUDataParticle prevData = records.get(0); CRUDataParticle newData = new CRUDataParticle(rri, prevData.serialno() + 1, updateDataAction.getData()); diff --git a/radixdlt-java/src/test/java/com/radixdlt/client/application/translate/data/CRUDataUpdateTest.java b/radixdlt-java/src/test/java/com/radixdlt/client/application/translate/data/CRUDataUpdateTest.java new file mode 100644 index 000000000..14d6fd9ad --- /dev/null +++ b/radixdlt-java/src/test/java/com/radixdlt/client/application/translate/data/CRUDataUpdateTest.java @@ -0,0 +1,70 @@ +package com.radixdlt.client.application.translate.data; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Set; +import java.util.stream.Stream; +import java.util.stream.StreamSupport; + +import org.junit.Test; + +import com.google.common.collect.ImmutableList; +import com.radixdlt.client.application.translate.ShardedParticleStateId; +import com.radixdlt.client.atommodel.cru.CRUDataParticle; +import com.radixdlt.client.atommodel.rri.RRIParticle; +import com.radixdlt.client.core.atoms.ParticleGroup; +import com.radixdlt.client.core.atoms.particles.Particle; +import com.radixdlt.client.core.atoms.particles.SpunParticle; +import com.radixdlt.identifiers.RRI; +import com.radixdlt.identifiers.RadixAddress; + +public class CRUDataUpdateTest { + @Test + public void testCreateMapper() { + RadixAddress address = RadixAddress.from("JEbhKQzBn4qJzWJFBbaPioA2GTeaQhuUjYWkanTE6N8VvvPpvM8"); + RRI rri = RRI.of(address, "TestData"); + byte[] data = new byte[128]; + Arrays.fill(data, (byte)0xFE); + CreateDataAction createDataAction = CreateDataAction.create(rri, data); + CreateDataToParticleGroupsMapper mapper = new CreateDataToParticleGroupsMapper(); + List particleGroups = mapper.mapToParticleGroups(createDataAction); + assertThat(particleGroups).hasSize(1); + ImmutableList spunParticles = particleGroups.get(0).getSpunParticles(); + assertThat(spunParticles.get(0).getParticle()).isInstanceOf(RRIParticle.class); + assertThat(spunParticles.get(1).getParticle()).isInstanceOf(CRUDataParticle.class); + } + + @Test + public void testUpdateMapper() { + RadixAddress address = RadixAddress.from("JEbhKQzBn4qJzWJFBbaPioA2GTeaQhuUjYWkanTE6N8VvvPpvM8"); + RRI rri = RRI.of(address, "TestData"); + byte[] data = new byte[128]; + Arrays.fill(data, (byte)0xFE); + UpdateDataAction updateDataAction = UpdateDataAction .create(rri, data); + UpdateDataToParticleGroupsMapper mapper = new UpdateDataToParticleGroupsMapper(); + Set state = mapper.requiredState(updateDataAction); + assertThat(state ).hasSize(1); + } + + @Test + public void testUpdateAction() { + RadixAddress address = RadixAddress.from("JEbhKQzBn4qJzWJFBbaPioA2GTeaQhuUjYWkanTE6N8VvvPpvM8"); + RRI rri = RRI.of(address, "TestData"); + byte[] data = new byte[128]; + Arrays.fill(data, (byte)0xFE); + UpdateDataAction updateDataAction = UpdateDataAction .create(rri, data); + List items = new ArrayList<>(); + CRUDataParticle oldData = new CRUDataParticle (rri,0, new byte[64]); + items.add(oldData); + Stream store = items.stream(); + UpdateDataToParticleGroupsMapper mapper = new UpdateDataToParticleGroupsMapper(); + List groups = mapper.mapToParticleGroups(updateDataAction, store); + assertThat(groups).hasSize(1); + ImmutableList spunParticles = groups.get(0).getSpunParticles(); + assertThat(spunParticles.get(0).getParticle()).isInstanceOf(CRUDataParticle.class); + assertThat(spunParticles.get(1).getParticle()).isInstanceOf(CRUDataParticle.class); + } +} From 7da2bb782a988f30f9df7d521735c0c84ddd4e53 Mon Sep 17 00:00:00 2001 From: romi Date: Thu, 21 May 2020 19:16:16 +0300 Subject: [PATCH 3/5] Code cleanup and a bug fix. --- .../application/RadixApplicationAPI.java | 6 ++-- .../UpdateDataToParticleGroupsMapper.java | 4 +-- .../translate/data/CRUDataUpdateTest.java | 33 +++++++++---------- 3 files changed, 21 insertions(+), 22 deletions(-) diff --git a/radixdlt-java/src/main/java/com/radixdlt/client/application/RadixApplicationAPI.java b/radixdlt-java/src/main/java/com/radixdlt/client/application/RadixApplicationAPI.java index 22801d884..9a48f4ea5 100644 --- a/radixdlt-java/src/main/java/com/radixdlt/client/application/RadixApplicationAPI.java +++ b/radixdlt-java/src/main/java/com/radixdlt/client/application/RadixApplicationAPI.java @@ -42,8 +42,8 @@ import com.radixdlt.client.application.translate.StatefulActionToParticleGroupsMapper; import com.radixdlt.client.application.translate.StatelessActionToParticleGroupsMapper; import com.radixdlt.client.application.translate.data.AtomToDecryptedMessageMapper; +import com.radixdlt.client.application.translate.data.CRUDataUpdate; import com.radixdlt.client.application.translate.data.AtomToCRUDataUpdateMapper; -import com.radixdlt.client.application.translate.data.CRUDataUpdateTest; import com.radixdlt.client.application.translate.data.CreateDataAction; import com.radixdlt.client.application.translate.data.CreateDataToParticleGroupsMapper; import com.radixdlt.client.application.translate.data.DecryptedMessage; @@ -451,9 +451,9 @@ public Result sendMessage(RadixAddress toAddress, byte[] data, boolean encrypt) * @param address the address to retrieve data from * @return a cold observable of the messages at the given address */ - public Observable observeData(RadixAddress address) { + public Observable observeData(RadixAddress address) { Objects.requireNonNull(address); - return observeActions(CRUDataUpdateTest.class, address); + return observeActions(CRUDataUpdate.class, address); } /** diff --git a/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/UpdateDataToParticleGroupsMapper.java b/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/UpdateDataToParticleGroupsMapper.java index 03b8ed097..c03c7747d 100644 --- a/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/UpdateDataToParticleGroupsMapper.java +++ b/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/UpdateDataToParticleGroupsMapper.java @@ -52,12 +52,12 @@ public Set requiredState(UpdateDataAction updateDataActi @Override public List mapToParticleGroups(UpdateDataAction updateDataAction, Stream store) throws StageActionException { RRI rri = updateDataAction.getRRI(); - List records = store.filter( p -> p instanceof CRUDataParticle) + List records = store.filter(p -> p instanceof CRUDataParticle) .map(CRUDataParticle.class::cast) .filter(p -> p.rri().equals(rri)) .collect(Collectors.toList()); if (records.size() != 1) { - throw new StageActionException("Broken storage") {}; + throw new StageActionException("Broken storage") { }; } CRUDataParticle prevData = records.get(0); CRUDataParticle newData = new CRUDataParticle(rri, prevData.serialno() + 1, updateDataAction.getData()); diff --git a/radixdlt-java/src/test/java/com/radixdlt/client/application/translate/data/CRUDataUpdateTest.java b/radixdlt-java/src/test/java/com/radixdlt/client/application/translate/data/CRUDataUpdateTest.java index 14d6fd9ad..df291a9d4 100644 --- a/radixdlt-java/src/test/java/com/radixdlt/client/application/translate/data/CRUDataUpdateTest.java +++ b/radixdlt-java/src/test/java/com/radixdlt/client/application/translate/data/CRUDataUpdateTest.java @@ -7,7 +7,6 @@ import java.util.List; import java.util.Set; import java.util.stream.Stream; -import java.util.stream.StreamSupport; import org.junit.Test; @@ -25,39 +24,39 @@ public class CRUDataUpdateTest { @Test public void testCreateMapper() { RadixAddress address = RadixAddress.from("JEbhKQzBn4qJzWJFBbaPioA2GTeaQhuUjYWkanTE6N8VvvPpvM8"); - RRI rri = RRI.of(address, "TestData"); + RRI rri = RRI.of(address, "TestData"); byte[] data = new byte[128]; - Arrays.fill(data, (byte)0xFE); + Arrays.fill(data, (byte) 0xFE); CreateDataAction createDataAction = CreateDataAction.create(rri, data); CreateDataToParticleGroupsMapper mapper = new CreateDataToParticleGroupsMapper(); - List particleGroups = mapper.mapToParticleGroups(createDataAction); + List particleGroups = mapper.mapToParticleGroups(createDataAction); assertThat(particleGroups).hasSize(1); ImmutableList spunParticles = particleGroups.get(0).getSpunParticles(); assertThat(spunParticles.get(0).getParticle()).isInstanceOf(RRIParticle.class); assertThat(spunParticles.get(1).getParticle()).isInstanceOf(CRUDataParticle.class); } - + @Test public void testUpdateMapper() { RadixAddress address = RadixAddress.from("JEbhKQzBn4qJzWJFBbaPioA2GTeaQhuUjYWkanTE6N8VvvPpvM8"); - RRI rri = RRI.of(address, "TestData"); + RRI rri = RRI.of(address, "TestData"); byte[] data = new byte[128]; - Arrays.fill(data, (byte)0xFE); - UpdateDataAction updateDataAction = UpdateDataAction .create(rri, data); + Arrays.fill(data, (byte) 0xFE); + UpdateDataAction updateDataAction = UpdateDataAction.create(rri, data); UpdateDataToParticleGroupsMapper mapper = new UpdateDataToParticleGroupsMapper(); - Set state = mapper.requiredState(updateDataAction); - assertThat(state ).hasSize(1); + Set state = mapper.requiredState(updateDataAction); + assertThat(state).hasSize(1); } - + @Test public void testUpdateAction() { RadixAddress address = RadixAddress.from("JEbhKQzBn4qJzWJFBbaPioA2GTeaQhuUjYWkanTE6N8VvvPpvM8"); - RRI rri = RRI.of(address, "TestData"); + RRI rri = RRI.of(address, "TestData"); byte[] data = new byte[128]; - Arrays.fill(data, (byte)0xFE); - UpdateDataAction updateDataAction = UpdateDataAction .create(rri, data); + Arrays.fill(data, (byte) 0xFE); + UpdateDataAction updateDataAction = UpdateDataAction.create(rri, data); List items = new ArrayList<>(); - CRUDataParticle oldData = new CRUDataParticle (rri,0, new byte[64]); + CRUDataParticle oldData = new CRUDataParticle(rri, 0, new byte[64]); items.add(oldData); Stream store = items.stream(); UpdateDataToParticleGroupsMapper mapper = new UpdateDataToParticleGroupsMapper(); @@ -65,6 +64,6 @@ public void testUpdateAction() { assertThat(groups).hasSize(1); ImmutableList spunParticles = groups.get(0).getSpunParticles(); assertThat(spunParticles.get(0).getParticle()).isInstanceOf(CRUDataParticle.class); - assertThat(spunParticles.get(1).getParticle()).isInstanceOf(CRUDataParticle.class); + assertThat(spunParticles.get(1).getParticle()).isInstanceOf(CRUDataParticle.class); } -} +} \ No newline at end of file From e32b7142907f9e95f83fa573833ed169eec1a21c Mon Sep 17 00:00:00 2001 From: Martin Sandiford Date: Thu, 21 May 2020 18:33:01 +0100 Subject: [PATCH 4/5] Updates for serialisation and Identifiable interface --- .../data/AtomToCRUDataUpdateMapper.java | 2 +- .../translate/data/CRUDataUpdate.java | 2 +- .../translate/data/UpdateDataAction.java | 2 +- .../data/UpdateDataToParticleGroupsMapper.java | 18 ++++++++++-------- .../client/atommodel/cru/CRUDataParticle.java | 10 ++++++---- .../client/serialization/Serialize.java | 3 ++- 6 files changed, 21 insertions(+), 16 deletions(-) diff --git a/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/AtomToCRUDataUpdateMapper.java b/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/AtomToCRUDataUpdateMapper.java index 0e9ca62e4..11f971df2 100644 --- a/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/AtomToCRUDataUpdateMapper.java +++ b/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/AtomToCRUDataUpdateMapper.java @@ -50,7 +50,7 @@ public Observable map(Atom atom, RadixIdentity identity) { .map(SpunParticle::getParticle) .filter(p -> p instanceof CRUDataParticle) .map(CRUDataParticle.class::cast) - .map(p -> new CRUDataUpdate(p.rri(), p.data(), timestamp, p.euid())) + .map(p -> new CRUDataUpdate(p.getRRI(), p.data(), timestamp, p.euid())) .collect(Collectors.toList()); return Observable.fromIterable(dataUpdates); } diff --git a/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/CRUDataUpdate.java b/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/CRUDataUpdate.java index 4387b03b8..d450bbb7a 100644 --- a/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/CRUDataUpdate.java +++ b/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/CRUDataUpdate.java @@ -66,6 +66,6 @@ public RRI rri() { @Override public String toString() { - return timestamp + " " + rri + " -> " + " " + Bytes.toHexString(data); + return timestamp + " " + rri + " " + Bytes.toHexString(data); } } diff --git a/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/UpdateDataAction.java b/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/UpdateDataAction.java index 5ffd47ec0..943d797e1 100644 --- a/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/UpdateDataAction.java +++ b/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/UpdateDataAction.java @@ -53,6 +53,6 @@ public RRI getRRI() { @Override public String toString() { - return "Updating data FOR resource" + rri; + return "Updating data FOR resource " + rri; } } diff --git a/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/UpdateDataToParticleGroupsMapper.java b/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/UpdateDataToParticleGroupsMapper.java index c03c7747d..10fc8e968 100644 --- a/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/UpdateDataToParticleGroupsMapper.java +++ b/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/UpdateDataToParticleGroupsMapper.java @@ -44,20 +44,22 @@ public class UpdateDataToParticleGroupsMapper implements StatefulActionToParticl @Override public Set requiredState(UpdateDataAction updateDataAction) { - RadixAddress addresss = updateDataAction.getRRI().getAddress(); - return ImmutableSet.of(ShardedParticleStateId.of(CRUDataParticle.class, addresss)); + RadixAddress address = updateDataAction.getRRI().getAddress(); + return ImmutableSet.of(ShardedParticleStateId.of(CRUDataParticle.class, address)); } - @SuppressWarnings("serial") @Override public List mapToParticleGroups(UpdateDataAction updateDataAction, Stream store) throws StageActionException { RRI rri = updateDataAction.getRRI(); - List records = store.filter(p -> p instanceof CRUDataParticle) - .map(CRUDataParticle.class::cast) - .filter(p -> p.rri().equals(rri)) - .collect(Collectors.toList()); + List particles = store.collect(Collectors.toList()); + List records = particles.stream() + .filter(p -> p instanceof CRUDataParticle) + .map(CRUDataParticle.class::cast) + .filter(p -> p.getRRI().equals(rri)) + .collect(Collectors.toList()); if (records.size() != 1) { - throw new StageActionException("Broken storage") { }; + String msg = String.format("Broken storage (%s) %s", records.size(), particles); + throw new StageActionException(msg) { }; } CRUDataParticle prevData = records.get(0); CRUDataParticle newData = new CRUDataParticle(rri, prevData.serialno() + 1, updateDataAction.getData()); diff --git a/radixdlt-java/src/main/java/com/radixdlt/client/atommodel/cru/CRUDataParticle.java b/radixdlt-java/src/main/java/com/radixdlt/client/atommodel/cru/CRUDataParticle.java index e5a287f8f..ebe3a3d2d 100644 --- a/radixdlt-java/src/main/java/com/radixdlt/client/atommodel/cru/CRUDataParticle.java +++ b/radixdlt-java/src/main/java/com/radixdlt/client/atommodel/cru/CRUDataParticle.java @@ -22,6 +22,7 @@ */ import com.fasterxml.jackson.annotation.JsonProperty; +import com.radixdlt.client.atommodel.Identifiable; import com.radixdlt.client.core.atoms.particles.Particle; import com.radixdlt.identifiers.RRI; import com.radixdlt.serialization.DsonOutput; @@ -34,7 +35,7 @@ */ @Immutable @SerializerId2("radix.particles.cru") -public final class CRUDataParticle extends Particle { +public final class CRUDataParticle extends Particle implements Identifiable { // Account and lookup key @JsonProperty("rri") @@ -64,9 +65,10 @@ public CRUDataParticle(RRI rri, long serialno, byte[] data) { this.data = Objects.requireNonNull(data); } - public RRI rri() { - return this.rri; - } + @Override + public RRI getRRI() { + return this.rri; + } public long serialno() { return this.serialno; diff --git a/radixdlt-java/src/main/java/com/radixdlt/client/serialization/Serialize.java b/radixdlt-java/src/main/java/com/radixdlt/client/serialization/Serialize.java index 22ebe9c06..d6196160e 100644 --- a/radixdlt-java/src/main/java/com/radixdlt/client/serialization/Serialize.java +++ b/radixdlt-java/src/main/java/com/radixdlt/client/serialization/Serialize.java @@ -31,7 +31,7 @@ import com.radixdlt.client.atommodel.tokens.FixedSupplyTokenDefinitionParticle; import com.radixdlt.client.atommodel.tokens.TransferrableTokensParticle; - +import com.radixdlt.client.atommodel.cru.CRUDataParticle; import com.radixdlt.client.atommodel.message.MessageParticle; import com.radixdlt.client.atommodel.tokens.MutableSupplyTokenDefinitionParticle; import com.radixdlt.client.atommodel.unique.UniqueParticle; @@ -66,6 +66,7 @@ private static Collection> getClasses() { return Arrays.asList( Atom.class, AtomEvent.class, + CRUDataParticle.class, ParticleGroup.class, Particle.class, RRIParticle.class, From 7b3a5531c1039721891864284c3e6257a2b452dc Mon Sep 17 00:00:00 2001 From: Martin Sandiford Date: Mon, 25 May 2020 12:03:15 +0100 Subject: [PATCH 5/5] Tidy up after hackathon --- et | 1498 ----------------- .../application/RadixApplicationAPI.java | 96 +- .../data/AtomToCRUDataUpdateMapper.java | 16 +- .../data/CRUDataMissingException.java | 61 + .../translate/data/CRUDataUpdate.java | 46 +- ...taAction.java => CreateCRUDataAction.java} | 54 +- .../CreateDataToParticleGroupsMapper.java | 33 +- ...taAction.java => UpdateCRUDataAction.java} | 18 +- ... UpdateCRUDataToParticleGroupsMapper.java} | 55 +- .../client/atommodel/cru/CRUDataParticle.java | 89 +- .../translate/data/CRUDataUpdateTest.java | 110 +- 11 files changed, 355 insertions(+), 1721 deletions(-) delete mode 100644 et create mode 100644 radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/CRUDataMissingException.java rename radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/{UpdateDataAction.java => CreateCRUDataAction.java} (64%) rename radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/{CreateDataAction.java => UpdateCRUDataAction.java} (74%) rename radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/{UpdateDataToParticleGroupsMapper.java => UpdateCRUDataToParticleGroupsMapper.java} (56%) diff --git a/et b/et deleted file mode 100644 index 9c8ca5ae3..000000000 --- a/et +++ /dev/null @@ -1,1498 +0,0 @@ -* 63bd383e (HEAD -> hackathon/cru-data, tag: 1.0-beta.8, origin/release/1.0-beta.8, origin/rc/1.0-beta.9, release/1.0-beta.8) Merge branch 'feature/RPNV1-160-testnet-universe' into rc/1.0-beta.8 -|\ -| * 4d3e08fc Update README and dependencies -* | 37daa496 Merge pull request #255 from radixdlt/feature/RPNV1-160-testnet-universe -|\| -| * e2a2a659 (origin/feature/RPNV1-160-testnet-universe) Added testnet.json universe -|/ -* 26ebeb04 (tag: 1.0-beta.7, origin/release/1.0-beta.7, origin/rc/1.0-beta.8, origin/HEAD, release/1.0-beta.7) Update library dependency version -* e780a346 Update version on README -* 31c778c6 Merge pull request #254 from radixdlt/feature/rpnv1-99-test-logging -|\ -| * fa201982 Update common dependency for merge -| * e19736e7 Clean up build file and serialization -| * 0a5f3e9e Use log4j 2 for logging -* | 9e2d8f0d Merge pull request #252 from radixdlt/integration/rpnv1-107-radix-cli -|\ \ -| * | 72a95633 Added missing exit statements and updating names of commands -| * | a1844b2b Fixes after resolving conflicts -| * | 8c7487d2 Merge remote-tracking branch 'remotes/origin/fix/gradle_maven_remove_sonar_snapshots' into integration/rpnv1-107-radix-cli -| |\ \ -| * | | 5535c0ce Review comments - Naming of keystore - Other cosmetic changes -| * | | 3c2842ca Added Copyright text -| * | | 3fdc9395 Refactoring to use environment variables for identity -| * | | 0c4d2af4 Changed sonar travis token -| * | | 89d7cf44 Changes to use endpoint from env variable -| * | | 64d0b5e1 GetAtomStore and CreateAndMintToken commands completed -| * | | b908b930 GetMessage completed -| * | | 7cdfd2b4 Sendmessage command done -| * | | e5bc701c Getdetails command with public key, address, native token ref -| * | | ea309ca1 Finished get public key command -| * | | b475d399 Initial commit with 1 Boiler plate for all the commands from cli developed in hackathon 2.Gradle setup for the packaging and dependencies -* | | | fde158fd Merge pull request #253 from radixdlt/bugfix/serialization -|\ \ \ \ -| * | | | 6e2cdc2b Remove unused imports -| * | | | 33a2a59a Removed ECKeyPair from Serialization. -| | |_|/ -| |/| | -* | | | 61d80474 Merge pull request #251 from radixdlt/fix/gradle_maven_remove_sonar_snapshots -|\ \ \ \ -| | |_|/ -| |/| | -| * | | 27022733 Remove sonartype snapshot as maven repo in build.gralde -|/ / / -* | / 9ed748f6 Merge pull request #248 from radixdlt/improvement/rpn1-61-migrate-code-to-java-common -|\| | -| |/ -|/| -| * 83db258d Merge branch 'improvement/rpn1-61-migrate-code-to-java-common' of github.com:radixdlt/radixdlt-java into improvement/rpn1-61-migrate-code-to-java-common -| |\ -| | * d38be42c Update travis SonarCloud token -| * | 2a276f82 Fixing bug where Atom, Particle, RadixUniverseConfig did not sha256 hash its dson bytes, a bug recently introduced in this featuer branch. bumping Java Common dependency to rc/1.0-beta.2 Adding unit tests for hashing -| |/ -| * bb513618 Change to be usng jitpack with gradle for java common dependnecy. -| * 816a0d27 Chaning incoherent naming of EUID getter to just `euid()` everywhere. Using new ECKeyPair static constructor `generateNew` -| * 3c531590 minor fixes -| * 6254816b Merge pull request #249 from radixdlt/improvement/rpn1-61-migrate-code-to-java-common-merging-in-rc6 -| |\ -| | * 1f4c8ec4 Manual fixes after merging in release beta 6 into this branch (since rpn1-61 was accendently based of beta 4 instead of beta 6.) -| | * 315b60f3 Merge branch 'release/1.0-beta.6' into improvement/rpn1-61-migrate-code-to-java-common-merging-in-rc6 -| |/| -| |/ -|/| -* | fc05fce8 (origin/release/1.0-beta.6) Update gradle wrapper to 4.10.2 for consistency -* | 93f96d5b Merge pull request #246 from radixdlt/hotfix/rpnv1-51-single-node -|\ \ -| * | f5e4f031 Use single node configuration by default -|/ / -* | e57c3ecd Merge pull request #245 from radixdlt/bugfix/rpnv1-47-slow-tests -|\ \ -| * | eb505f73 Use /dev/urandom for running tests so they don't stall on Linux -|/ / -* | 705c57cf (origin/release/1.0-beta.5) Prepend license test to each source file. -* | 8d755540 Resolve some sonar-flagged bugs to bring our bug count to zero -* | 690cf63a Merge pull request #244 from radixdlt/feature/atom-refactoring -|\ \ -| * | 4502ba9f NS-122 Atom refactoring phase 3 (Renamed AtomContent to Atom, regenerated Universe) -| * | 18064f11 NS-122 Atom refactoring phase 2 (moved application to Atom Interface, removed EngineAtom, EngineAtomContent) -| * | 60e9e48a NS-122 Atom refactoring phase 1 -|/ / -* | 76fca6ec Merge pull request #243 from radixdlt/feature/securityprovider-updates -|\ \ -| * | c4713716 BouncyCastle initialization refactoring(review comments) -| * | 396948c9 BouncyCastle initialization refactoring -|/ / -* | 8d0c6e13 Merge pull request #241 from radixdlt/feature/contributing-docs -|\ \ -| * | 911902a4 Update CONTRIBUTING.md -| * | 2696e6bf Update CONTRIBUTING.md -| * | d3a14054 Update CONTRIBUTING.md -| * | 7e69b9fb Update CONTRIBUTING.md -| * | f7372434 Update README.md -| * | a39f849b Create CODE_OF_CONDUCT.md -| * | 56d712cd Create CONTRIBUTING.md -* | | cc2735ce Don't fail if atom is signed by same id multiple times -* | | da36fbd2 Remove UnsignedAtom and allow for multiple atom signatures -* | | 8d8269ae Refactor unsigned atom -* | | 951688c0 Utilize Immutable collections for Atom properties -* | | d2e8884a Refactor Atom to only have one constructor -|/ / -| * 03f90bc9 Migrating Serialization, Utils, Crypto, and Identifiers to new repo radixdlt-java-common, merged with code from radix-engine-library. Updated code accordingly. -|/ -* 7555d2e1 (origin/release/1.0-beta.4) Update CHANGELOG -* 24ee94ab Merge pull request #231 from radixdlt/feature/address-check -|\ -| * d055c1cb Add universe magic check to all addresses -* | 2e234491 Merge pull request #230 from radixdlt/integration/tempo2-2 -|\ \ -| |/ -|/| -| * 54289701 Change Make localhost nodes trusted by default -| * d27a2bd2 Update universe -|/ -* ebac7615 (origin/release/1.0.0-beta.3) Update CHANGELOG.md -* f14a3486 Merge pull request #229 from radixdlt/feature/https-support-for-bootstrap -|\ -| * f1fde773 Use Ssl All trusting client for trusted nodes (for now) -* | 22c36796 Merge pull request #228 from radixdlt/feature/independent-immutable-atom -|\ \ -| |/ -|/| -| * cb87f398 Fix checkstyle -| * d1413fe8 Update universe -| * 5160fa2b Remove Atom serializer from hash, update universe -|/ -* 0fe7833e Update CHANGELOG.md -* dfa71bf6 Add to change log -* fdd28404 Merge pull request #226 from radixdlt/changelog-patch-1 -|\ -| * 82172d5d Change to using openjdk8 given change in licensing for oraclejdk8 -| * af2473be Update README.md -| * dcc0378f Update CHANGELOG.md -| * 8536077b Update README.md -| * 284bdf8b Create CHANGELOG.md -* | d17914bb Merge pull request #227 from radixdlt/feature/no-fixed-unallocated -|\ \ -| * | 40013608 Change separate address/symbol into consolidated RRI -| * | cfa17f6b Fix iconUrl for FixedSupplyTokens -| * | c5eef062 Fixed line length issue for CreateTokenToParticleGroupsMapperTest -| * | 323407d9 Include review feedback -| * | b834e4f3 Separates fixed and variable supply tokens -| * | 1bea261b (tag: 1.0.0-beta.1, origin/release/1.0.0-beta.1) Update version for release -|/ / -* | 7c752a9b Update localnet universe -* | df506909 Merge pull request #223 from radixdlt/feature/rlau-1365-specify-icon-url -|\ \ -| * | 6adcb576 Corrects review feedback -| * | 67c0009b Adds API calls with ability to specify iconUrl -* | | b105cc80 Merge pull request #222 from radixdlt/feature/rlau-1477-icon-url -|\| | -| * | 0a290a75 Adds ability to retrieve icon URL from TokenState -| |/ -* | 8a9d40ec Merge pull request #221 from radixdlt/release/1.0.0-beta -|\| -| * 20617534 (tag: 1.0.0-beta) Merge pull request #219 from radixdlt/hotfix/decode_transaction_attachment -| |\ -| | * 4158e577 Fix decoding of attachment in a transaction -* | | 8419a750 Merge branch 'release/1.0.0-beta' into rc/1.0.0-beta.1 -|\| | -| * | f0300c1d BootstrapByTrustedNode takes multiple RadixNode arguments -| * | 44080e25 Adds jenkins network config -| |/ -| * 867b99dd Adds BETANET_STATIC bootstrap and updates betanet universe -| * 0774b953 Update README to use commit hash -| * dbfd5064 Use BootstrapByTrustedNode for LOCALHOST_SINGLENODE and BETANET configs. -| * 32fc4c30 Merge branch 'feature/bootstrap-by-url' into release/1.0.0-beta -| |\ -* | \ 6314daef Merge pull request #216 from radixdlt/feature/bootstrap-by-url -|\ \ \ -| |/ / -|/| / -| |/ -| * e64474d8 Cleanup based on feedback -| * 17e3ef3a Add standard env variables for bootstrap and BootstrapByTrustedNode -| * b7a3b8ec Refactor to make WebSockets resource manager a parameter -|/ -* 3b993a7c (tag: 1.0.0-beta-core-1.0.0-beta) Add ellipsis to end of truncated string. -* 801ad022 Fix race condition in json rpc notification observations -* b606c156 Added accessors for previously inaccessible fields. -* 23f8cba6 Limit WebSocket debug output to something that most consoles can handle. -* 9ad6b864 Add option to submit atom to specific node. -* e7e7e0bc Only set websocket on open -* 8be517a8 Add execute method to be able to select origin node -* 44f156ca Use async callback rather than Subjects to handle Websocket logic -* fbd429a9 Update README -* 021b811a Merge branch 'feature/cleanup-send-msg' into rc/1.0.0-beta -|\ -| * 3672dcf3 Reorder parameters to sendMessage and add javadocs -* | 1f5768aa Update README -* | d4d529bc Merge branch 'feature/cleanup-identity-methods' into rc/1.0.0-beta -|\| -| * 38fca07a Remove unused import -| * e3c9df02 Cleanup identity methods and add javadocs -* | db44b7ba Merge branch 'feature/more-descriptive-method-names' into rc/1.0.0-beta -|\| -| * 5e4f80aa Use more descriptive api method names -* | 24c23c8f Merge branch 'feature/cleanup-api' into rc/1.0.0-beta -|\| -| * d24578ce Cleanup action classes -* | 4e06b226 Merge branch 'feature/cleanup-api' into rc/1.0.0-beta -|\ \ -| * | 4e6f6ac3 Cleanup action classes -| |/ -* | 76e18316 Merge branch 'feature/staging-areas' into rc/1.0.0-beta -|\| -| * b5f81cf9 Remove deprecated universe -| * de07376d Expose method to just get nodes from NetworkState -| * da5269e0 Create a working area for atoms to be built through -| * f1d15788 Moving staging of action into Transaction logic -| * 96032f25 Implement stage action one at a time -| * 84e40a9b Remove auto-sync on atom atom creation -* | 0f2b3352 Merge branch 'feature/cleanup-mappers' into rc/1.0.0-beta -|\| -| * 97d3bf76 Update examples -| * 099ee6dc Remove unused Ledger class -| * 317bc0f1 Don't auto-sync on request for state events -| * 6f4f9816 Don't auto-sync on request for action events -| * 254b5bf9 Consolidate stateless and stateful actions -| * 3d3b3060 Map statefulActionMappers to one action type -| * 7b6a0809 Map statelessActionMapper to one Action type -* | 34f0485f Merge branch 'feature/update-sunstone-universe' into rc/1.0.0-beta -|\ \ -| * | 267350ee Update sunstone universe -| |/ -* | fb710d54 Merge branch 'bugfix/bad-node-finder-exception' into rc/1.0.0-beta -|\ \ -| * | 8fe84006 Catch errors when node discovery fails -| |/ -* | 64ab7ff5 Merge pull request #213 from radixdlt/feature/refactor-for-env-testing -|\ \ -| * | 4bc16607 Use more descriptive toString for RadixNode -| * | a8cfe12d Add method to retrieve atom from Result -| * | 9e6a1a28 Add method to choose origin node -| * | f3347b0a Add method to get HTTP endpoint for a node -| * | bf4646d6 Update RadixNode method names to something more descriptive -| * | 9918cb30 Expose method to discover more nodes -| * | 20bb0716 Add 30 second timeouts to atom submission and json rpc calls -| |/ -* | 9859d1d9 Merge pull request #214 from radixdlt/bugfix/ssl-node-finder -|\ \ -| |/ -|/| -| * b652da54 Use SSL certs for node finder endpoints -|/ -* 201fc8d2 Merge branch 'develop' of github.com:radixdlt/radixdlt-java into develop -|\ -| * 4f5b8576 Merge pull request #206 from radixdlt/betanet-staging -| |\ -| | * fd4a7e87 https://betanet-staging.radixdlt.com -| | * eebdfa34 upped sunstone universe -| | * 41625c7e betanet-staging universe -| |/ -* | 219ecf13 Update README -* | 5656f4bc Update README -|/ -* 3eac734a Merge pull request #205 from radixdlt/feature/better-errors -|\ -| * 3b38a754 Better errors from Atom Submission -|/ -* 5933647e Merge pull request #204 from radixdlt/feature/message-action-id -|\ -| * 4e981927 Add unique actionId for DecryptedMessage actions -|/ -* db7d3e9c Merge pull request #203 from radixdlt/feature/cleanup-api -|\ -| * 48eccb9e Cleanup API -| * 8d079bd9 Cleanup of some RadixApplicationAPI interfaces -| * 88f5b8ea Remove old deprecated methods from Atom -| * d4b589fe Simplify token transfer attachments -| * 649867e8 Update high level APIs along with documentation -|/ -* ac1aa55a Merge pull request #202 from radixdlt/feature/remove-mint-and-transfer -|\ -| * 5f7a096c Cleanup atom submission api -| * c75b08c6 Remove MintAndTransfer action -|/ -* 8d82f7fe Merge pull request #200 from radixdlt/feature/cleanup-atom-sync -|\ -| * 9c262bd2 Update local universe -| * 7c3cf8d2 Cleanup based on feedback -| * b4d3e8bd Fix toString of SubmitAtomStatus -| * 66219a3c Fix junit tests -| * ca38bb73 Implement completeOnStoreOnly flag indicating sync procedure -| * 073be40e Cleanup atom submission logic -| * 476a07e6 Utilize a SubmitAtomCompletion action for sync completion -| * 37a3028f Remove NodeAtomSubmissionState/Update -* | e35300f9 Regenerate universe. -|/ -* 544f2601 Merge pull request #199 from radixdlt/feature/refactor-api -|\ -| * a8580ecb Add jdocs -| * 8c046955 Fix checkstyle -| * a5ecd19c Remove deprecated Universe.submitAtom json rpc call -| * 77a45562 Utilize new api in atom submission -| * 3e660d86 Fix atom getShards issue -| * f1d29648 Create methods for observing atom status events -| * 8961d962 Update Atom statuses -| * e00252b0 Create method to retrieve the status of an atom from a node -| * 5f3387a2 Complete subscription on error -|/ -* 737ca71e (tag: v23-beta) Merge pull request #196 from radixdlt/feature/translucent-destinations -|\ -| * bcfbe949 Update universe -| * 5bc4330e Utilize ImmutableSet in destinations in Particle -| * a7560d78 Expose method for signing an atom synchronously -| * e06c19cf Add destinations to particle -|/ -* dc990a5b (tag: v22-beta, tag: v22) Updated after feedback from review. -* baf01e72 Remove TokenDefinitionParticle icon field, replacing with an icon_url field. -* 5b8465c7 Added unit test to ensure short CBOR int/len encodings correct. -* a1748ba7 Upgrade Jackson dependencies and regenerate betanet universe. -* e9efe893 (tag: v21-beta) Merge branch 'feature/rlau-433-aid' into develop -|\ -| * e8d3824c Update universe to remove object from TPs -* | 277fe806 Merge pull request #193 from radixdlt/feature/rlau-433-aid -|\| -| * bde94cf9 Change AID to use unsigned sorting -| * 5520d203 Change AID.toByteArray to raw AID.getBytes -| * fbdf8ed7 Remove unnecessary AID serializers, fix/improve AID -| * 557bfccc Remove empty atom test -| * 69467f04 Fix tests referencing EUIDs instead of AIDs -| * 2c65cb82 Fix style issues -| * 0803f284 Fix style issues -| * 9daf5ddd Replace Atom HID usages with AID -| * 887a7405 Fix AID docs -| * 5f2bcb3b Fix AID shard selection underflow, add AIDTest -| * 6cbd15de Update AID with new shard selector and docs -| * 63f52659 Add AIDs for Atoms -|/ -* dc1cb49d Merge pull request #192 from radixdlt/feature/staging-groups -|\ -| * 308f51ce Implement cleanup based on feedback -| * 2bd9f2ec Add documentation -| * 2b52d55d Simplify TokenBalanceState -| * 469fded4 Remove granularity from TokenBalanceState -| * 1c63de02 Remove AtomicAction and utilize Transactions -| * 36cca21c Include uuid for staged groups for management -| * 2136e3de Create staged area for particle groups -| * e8c01399 Perform synchronization all at once before atom creation -| * 3a342694 Remove asynchronous side-effects -|/ -* cc4bc949 Update universe configs -* 87a8d0a3 Rebase Betanet config on top develop -* 95da0366 Add ability to retrieve stored atoms from AtomStore -* 749ed4f6 Merge pull request #191 from radixdlt/bugfix/fix-multiple-actions -|\ -| * 15a234f2 Add method for syncing atom and modify executeSequentially -| * d16a231f Remove executeSequentially api -|/ -* 06b1e92a Fix Json deserialization of System -* eb6ca619 Merge pull request #188 from radixdlt/fix/renameECSignatureMethod -|\ -| * bc548361 Rename static ECSignature method to decodeFromDER -* | a42c574e Merge pull request #190 from radixdlt/feature/refactor-puller -|\ \ -| * | 5178ada7 Implement fixes based on feedback -| * | 9d04f218 Remove consumables logic from application layer -| * | 98568f7e Refactor action mappers to use particle state -| * | 12ba9fa1 Consolidate how fungible overspends are handled -| * | 329ea077 Add initial nodes to be used for initial network -|/ / -* | 0f6cc243 Merge pull request #187 from radixdlt/feature/raw-atom-submit -|\ \ -| * | 34508a60 Expose API to submit raw atom -| * | affff43d Refactor out AtomSubmitter hack -|/ / -* | 1dbbb63b Merge pull request #189 from radixdlt/fix/androidjava8methodscomp -|\ \ -| |/ -|/| -| * a3890b44 Fix small comment formatting -| * 3114da04 Replace method.getParameterCount with method.getParameterTypes().length -| * 711ff5f7 Add compareUnsigned method to our utils primitives package a make use of it in Int128 class -| * a602423b Use bouncycastle util Base64 instead of Java8 -|/ -* 66bbf6ea Merge pull request #186 from radixdlt/feature/handle-deletes -|\ -| * 674954df Fix some minor issues -| * 1492a5f2 Refactored out reducer hack in RadixNetworkController -| * 6e9aa6d2 Move conflict handling into AtomStore -| * df52e96f Add a per particle spin index -| * 935dc693 Fix checkstyle -| * 84d7921d Add missing unit test -| * 2dc432bb Remove deprecated classes -| * 41537afa Cleanup ParticleTransition and TransitionedParticle -| * 91b2e023 Add more tests and cleanup -| * 2a2e7395 Refactor AtomStore and InMemoryAtomStore -| * 6e0f3f78 Fix checkstyle -| * c41a073d Replace TokenDefinitionReference with RRI -| * 98ef771b Remove Observables logic from stateless action mappers -| * 9483260e Remove observables in action mapper logic -|/ -* fd2cd3fd Merge pull request #182 from radixdlt/feature/ecsignature-from-bytes -|\ -| * 3607d496 Add static method to instantiate an ECSignature built taking ASN1 bytes as an argument -| * ad330acb Add ECSignature constructor which takes bytes as an argument -* | 0183077c Adding .java-version file which jenv will read and set the Java version when ever you navigate the Radix Java directory. -* | 2e3ab744 (tag: v20-beta) Merge pull request #184 from radixdlt/feature/rri-cleanup -|\ \ -| * | 34f2b756 Add minor cosmetic fixes -| * | 0a56d10d Remove TokenDefinitionReference and replace with RRI -| * | 9411edab Refactor RRI -|/ / -* | 322e71f4 (tag: v19-beta) Merge pull request #183 from radixdlt/feature/remove-stateful -|\ \ -| * | f20bdbfb Add use of RRIParticle -|/ / -* | 6fd85111 (tag: v18-beta) Merge pull request #181 from radixdlt/feature/rlau-581-human-readable-serializers -|\ \ -| |/ -|/| -| * 994a558b Exclude DsonTest for now -| * 07875a28 Add check for hash duplicates in ClassScanningSerializerIds -| * 89de70ba Add check for hash duplicates in ClassScanningSerializerIds -| * f816a4e3 Rename internal.* -> network.* -| * c787781b Update DsonTest -| * b77343a7 Rename ECSignature serializer id 'crypto.ec_signature' to 'crypto.ecdsa_signature' for clarity -| * 32273c92 Restore original line endings -| * ee613466 Change serializer id to be string-based -|/ -* d9561ed2 Merge pull request #180 from radixdlt/bugfix/android-bouncycastle-fix -|\ -| * f46ac324 Make sure to remove bouncy castle provider if Android -|/ -* fa361048 (tag: v17-beta) Merge pull request #179 from radixdlt/feature/rlau-1142-add-message-nonce -|\ -| * c700a1dc Rename rng in MessageParticleBuilder to please checkstyle -| * 6cdf6ac3 Replace time-based nonce with fully random nonce in MessageParticle -| * 3c8c67cb Update betanet.json after rebase -| * 7fcc0c08 Add 'nonce' to MessageParticle, update betanet.json -|/ -* 1a91fa8f (tag: v16-beta) Merge pull request #174 from radixdlt/feature/rlau-953-atom-dependency -|\ -| * faf6bf8c Implement fixes based on feedback -| * e1398e88 Remove Mint and Burn Particles -| * 1e62e17b Remove Classes as keys to token permissions -| * 67e8e10e Remove Minted/Burned Particle, use only TransferredParticle -| * 273c1ac9 Remove unnecessary fields in UnallocatedTokensParticle -| * ad46cc66 Universe update -| * 6b57ca86 Unallocated particles required with TokenDefinition -| * ed5c12f8 Update universe and add more util methods in API -| * 8f55c004 Fix issue with missing deletes on interdependent atoms -| * 12445b3a Fix equality of TokenState -| * f1b5d5c2 Implement use of UNALLOCATED token particles -| * d1b054f5 Add UnallocatedTokensParticle -| * 0325cfbe Use FungibleParticleTransitioner in TransferTokensMapper -| * a728fd4e Remove unnecessary observable logic in TransferTokensMapper -| * 3a85b7d4 Implement FungibleParticleTransitioner and use in BurnTokens -|/ -* 1e8e5492 Update sunstone universe -* f3912c5f Merge pull request #177 from radixdlt/feature/RTPIntegration -|\ -| * 79ef82aa Fix for DiscoverSingleNodeEpic in case of universe mismatch, additional debug logging and updated universe. -* | 696c6071 Merge pull request #167 from radixdlt/deterministic_signatures_rfc6979 -|\ \ -| * | dd3dcb0e Changing ECDSA signatures to be deterministic according to RFC6979 in order to more easily write tests and compare implementations between Radix libraries. -|/ / -* | 04bb23ef Fix for DiscoverSingleNodeEpic in case of universe mismatch, additional debug logging and updated universe. -* | 575c2925 Merge pull request #175 from radixdlt/bugfix/rlau-1083-inter-dependency-consensus -|\ \ -| |/ -|/| -| * 4eb63a7f Fix bug when processing DELETE events -| * 89e664ef Cleanup RadixApplicationBuilder -|/ -* bc07e52a (tag: v15-beta) Merge pull request #173 from radixdlt/feature/rlau-1070-remove-feeparticle -|\ -| * ddde7dfd Remove 'POW' definition from Universe -| * b3528191 Remove unnecessary imports -| * b38732c1 Remove FeeParticle -| * f0f8794c Add metadata pow fee nonce mapping instead of FeeParticle POW -|/ -* b5fafbd8 (tag: abt) Adding boolean flag for signing method to ensure Low value S in signatures according to BIP62 -* 984a108c Merge pull request #172 from radixdlt/bugfix/rlau-1071-token-symbol-conflicts -|\ -| * 863f9514 Fix tests + checkstyle -| * 36c1851e Implement handling of missing DELETEs -| * 2df82b64 Handle particle DELETEs in the TokenDefinition reducer -| * c002a1af Add equality checks to application state -|/ -* 54548296 Merge pull request #171 from radixdlt/feature/atom-dependency-test -|\ -| * f43b1745 Update javadoc to executeSequentially -| * 04f1d3f0 Implement better executeSequentially -| * 6655823d Better toString for debugging -| * 2df3b7a5 Change interface executeSequentially -|/ -* a3791361 (tag: v14-beta) Merge pull request #170 from radixdlt/feature/rlau-1032-convert-permissions -|\ -| * dfd2b9da Fix TokenDefinitionsReducer incorrectly mapping permissions to mutability -| * 494b97eb Fix weird indent issues -| * e3b7b525 Remove unused imports -| * ff0c6e62 Remove debug dump json code -| * ec77ba06 Fix CreateTokenActionMapper putting create token and mint in same particle group -| * c9233a54 Change TokenPermissions to reduced permission set, update universe -| * dbce2eb8 Remove 'transfer' permission from TokenDefinition -|/ -* 04cc9e27 Merge pull request #169 from radixdlt/feature/remove-static-universe -|\ -| * 25c410c8 Remove getOwner from Ownable interface -| * 6fa8702d Remove use of static universe instance -| * 829c903b Remove dependency on Universe in mappers -|/ -* e067cd58 Fix checkstyle -* 39daed0f (tag: v13-beta) Set tabWidth correctly. -* 7d8d17dd Additional comments, plus conversion of StringBuffer to StringBuilder. -* c282b37d Fixed several issues with conversion from BigInteger -> byte[] -> BigInteger. -* 38253ec0 Merge pull request #165 from radixdlt/feature/application-shard-state -|\ -| * f2d3435e Turn ShardAppStateId into first class object -| * dcaf948e Add descriptive toString to TokenBalance -|/ -* fae08401 Fix MintAndTransferTokensActionMapper after BigDecimal change, change radixApi.mintAndTransfer to use BigDecimal -* 2e25c4e6 Merge pull request #163 from radixdlt/feature/rlau-645-refactor-state-provider -|\ -| * 0929e6dd Fix unit conversion issues introduced through rebase -| * 22b38ac0 Update RadixWalletExample after api change -| * cc6f868d Remove extraneous imports -| * 716a289c Add mintAndTransferTokens method to api, rename 'send' to 'transfer' for tokens -| * d2b855b6 Add MintAndTransferTokensAction for atomic transaction testing (untested) -|/ -* e7a6c602 More fix for logging. Apologies. -* 831569ef Fix for checkstyle issue (oops). -* 93535911 Update guava dependency, and improve debug logging in RadixJsonRpcClient.java. -* 19bef59d Merge pull request #162 from radixdlt/feature/use-big-decimal -|\ -| * 04883244 Changes based on feedback -| * a4989d5a Move Token Unit Conversion methods to separate class -| * 4e4bd046 Use BigDecimal instead of UInt256 int RadixApplicationAPI -|/ -* 59455a72 Merge pull request #161 from radixdlt/bugfix/rlau-1053-uint256-from-big-integer -|\ -| * d4ca6c6b Fix for UInt256 conversion from BigIntegers >= than 2^255 -|/ -* 59ec3a73 (tag: v12-beta) Update sunstone.json -* bc6fefc4 Merge pull request #160 from radixdlt/feature/rlau-578-rename-token-type-to-token-definition -|\ -| * d3d83972 Move forgotten tests from 'tokenclasses' to 'tokens -| * bdda7ac6 Remove unnecessary imports for checkstyle -| * 49e17b6a Move 'tokenclasses' to 'tokens -| * 3bcc2b02 Fix checkstyle issues -| * 28605352 Update betanet.json -| * 50a7a0b6 Rename TokenType to TokenDefinition -|/ -* 74e546ea Merge pull request #158 from radixdlt/bugfix/resync -|\ -| * 8fe8dd17 Add RESYNC into event stream -* | dfbc4bc6 Fix indentation (again) -* | 00437bb0 Fix indentation + immutable list -* | 9d625d8f Expose means of ActionExecutionException validation -|/ -* 38eecaad Fix bug with consumables -* 5f6ce5ca Merge pull request #157 from radixdlt/feature/reducers-first -|\ -| * 9f180cb9 Fixes based on comments -| * 1fd75b9d Add JUnit tests -| * a8d627c0 Remove replaying-share lib -| * d360b422 Remove deprecated RadixAtomValidator class -| * 27b9c564 Remove debouncer and only emit actions after state is reduced -|/ -* 1d32fe29 Merge pull request #156 from radixdlt/feature/soft-state -|\ -| * 86ad2f9e Minor fixes based on comments -| * 0c2df1c9 Add better documentation -| * bf86b974 Implement atom soft state -| * 4af53c02 Move fetching logic into AtomPuller -|/ -* 00993e43 Merge pull request #149 from radixdlt/feature/delete-atom-events -|\ -| * b4821a50 Fix checkstyle -| * 18449e8b Fix deletion logic within AtomStore -| * 95f7e231 Update Betanet Seed Config for better Consensus testing -| * ceadecd1 Save universe in network state -| * f4f21ade Change name from Result to Response -| * 5b8c76f5 Fix checkstyle issues -| * 4cdcde11 Rename Particle keyDestinations to shardables -| * 5977ff47 Add Unit test for particle store and atom deletes -| * 4e0d5199 Cleanup checkstyle -| * 711d98a2 Use RadixAddress instead of Keys to describe "destinations" of particle -| * 57f43510 Add some documentation to new Particle transition classes -| * d947f5a1 Fix TokenBalanceReducer logic -| * b5f1cf71 Create STORE/DELETE AtomEvents -|/ -* efadcd55 Merge pull request #154 from radixdlt/feature/rlau-999-remove-fungibletype -|\ -| * 98cfaf0c Fix checkstyle issues -| * ebeedc49 Fix wrong value in TokenClassParticle tokens instances to verbs map -| * 9850c404 Refactor TokensKind to use Particle types directly, remove TokensKind -| * 677755b5 Refactor FungibleType to TokensKind for Token permissions -| * 91506601 Remove Fungible.getType -|/ -* 0aec3e12 Fix checkstyle issues -* 571260ae (tag: v10-beta) Merge pull request #153 from radixdlt/feature/rlau-981-split-owned-tokens -|\ -| * 916e46a8 Remove debug code -| * 50e5271e Update universe with new key -| * a88edb22 Fix Atom.tokenSummary consumable/consuming logic -| * a34d3949 Remove Hashable interface -| * 2c20405d Make Minted, Transferred, BurnedTokens final -| * 8565b624 Add documentation for new token types and Hashable -| * e1517b16 Fix Burn/Transfer mappers addConsumerQuantities -| * f8a94b1e Update betanet.json -| * 86b4c29c Fix usages of OwnedTokensParticle -| * 1846d0a7 Remove OwnedTokensParticle, update betanet.json, fix Serialize not including new split token types -| * 88f903b8 Refactor usages of OwnedTokensParticle, introduce Hashable for .hash() and .hid() -| * 7a883405 Remove usages of OwnedTokensParticle (incomplete) -| * f99227b8 Rename TokenClassReference to TokenTypeReference -| * ef6b376d Add Minted, Transferred, BurnedTokens particles -|/ -* 6755bb4f Merge pull request #152 from radixdlt/feature/universe-check -|\ -| * ff24081c Update sunstone universe -| * 030b4ec9 Fix adding nodes logic -| * 15d5b99b Add universe check test -| * 52d24c76 Add universe check for seeds -|/ -* 831185e6 Additional test coverage. -* 7892c429 Improve unit test coverage. -* 8ffc0d56 Remove no-longer-used Timestamps class. -* 082d1248 Improve unit test coverage. -* 9b1565a3 Adding sonar properties. -* 70b5af7f Fix for checkstyle issue. -* 367be7fc Merge pull request #151 from radixdlt/bugfix/burn-account-tokens -|\ -| * 99b01a1d Add explicit burn address -|/ -* 20370a3d Merge pull request #150 from radixdlt/bugfix/burnt-tokens -|\ -| * 113db799 Change style of enum equality check -| * 10abbbb1 Fix checkstyle issue -| * c75e1bf0 Fix issue with burned tokens being consumed -|/ -* 72b65181 Broke up like formatting to placate checkstyle. -* 87493f5b Removed pre-seeding local store with atoms from JSON universe file — all atoms should come from node to ensure they have correct nonces etc. -* ebd589ef Merge pull request #148 from radixdlt/feature/rlau-655-remove-explicit-quarks -|\ -| * d9682447 Remove stray Quark usages -| * ebfbaf30 Remove Quarks from Particle, update universe -|/ -* 38cbe04d Merge pull request #147 from radixdlt/feature/rlau-651-refactor-fungible-to-interface -|\ -| * 38fc4dd9 Add non-zero check to OwnedTokensParticle -| * 2b540136 Refactor FungibleQuark to interface -|/ -* 48b9f851 Removed System.out.println debugging stuff. -* e1342293 Fix some tech debt identified by sonarqube. -* cdb9905c Fix unused imports causing checkstyle failure. -* f757c1be Merge pull request #146 from radixdlt/feature/rlau649-refactor-ownable-to-interface -|\ -| * 657e8285 Remove explicit "owner" field in TokenClassParticle -| * 280fc631 Add owner to TokenClass, update universe / betanet strings -| * 29c9f143 Refactor OwnableQuark into a Particle interface, remove explicit OwnableQuark -|/ -* ebb1742f Update betanet -* 6c82c295 Fix some checkstyle issues. -* b54d0508 Merge branch 'feature/rlau576-remove-timestamp-to-metadata' into develop -|\ -| * 7ee720a5 Fix Atom timestamp validation glitch -| * 1a68d4cd Fix invalid constructor for Atom, change getTimestamp error handling -| * f7628407 Update TODO to link issue number -| * d08c40f0 Move timestamp to Atom metadata, remove TimestampParticle -|/ -* 10d6da70 Change use of doAnswer(...).when(...) to when(...).then(...). -* b16ca738 Add test logging plugin. -* a993f017 Use buildscript plugins rather than plugins DSL as required by internal Jenkins. -* e0e52b2e Update for pending alphanet merge. -* 276f4aa6 Merge pull request #144 from radixdlt/feature/RLAU-572-add-metadata -|\ -| * 0d31d500 Fix unit tests, styling -| * c76a05c4 Fix private constructor -| * 7bd1cdea Update for immutability, POW calculation fix -| * bae88811 Add metaData to atoms and particle groups -|/ -* cb87ea5c Merge pull request #143 from radixdlt/feature/refactor-accountable -|\ -| * 7d55a5c1 Update universe -| * 05138082 Remove AccountableQuark -| * 63d2325c Remove use of AccountableQuark -|/ -* 8477af26 Merge pull request #139 from radixdlt/renaming_methods -|\ -| * d418c069 Renaming method in Atom having obsolete names such as "consumables" (instead of the actual "OwnedTokensParticle") and renamed "getDataParticle" to "getMessageParticles" -|/ -* bd501231 Merge pull request #142 from radixdlt/feature/remove-chrono-quark -|\ -| * 24952ea9 Utilize static field for keywords -| * 21c54a3e Remove fragile AtomSerializationTest -| * c6796998 Remove ChronoQuark -| * f08a59d8 Remove TimestampParticle dependency on ChronoQuark -|/ -* 7c3b51c7 Merge pull request #141 from radixdlt/feature/remove-data-quark -|\ -| * 32f26b24 Remove Data Quark -| * 2977355a Remove useage of DataQuark from MessageParticle -|/ -* ad9e091d Fix tests and checkstyle issues -* 8dcd7434 (tag: cbt) Merge pull request #136 from radixdlt/feature/constraint-machine-os -|\ -| * 96aea205 Update betanet universe -| * 9f8099d6 Remove IdentifiableQuark -| * c7f7d5ad Remove use of IdentifiableQuark -* | c250fb68 Fix / update AtomSerializationTest -* | 8b721a7e Merge pull request #138 from radixdlt/adding_tests -|\ \ -| * | 7f6e911d Adding trivial magic byte test, to be used as a reference for other Radix libraries -| * | f1153032 Removing the dependency `okio.ByteString` in favor of `primitives.Bytes` for encoding and decoding of hex strings. -| * | 1fa4d257 Adding documentation and simplifying HashTest using StandardCharsets -| * | 11eb3ebf Adding sanity check of sha256 hash, mostly for cross library verification. -| * | 2a56eb61 Added comparison of Dson hex string in empty atom test -| * | 9d26fdd5 Fix code duplication in Atom, where `getHash` method weren't using `toDson` as it should. -| * | 2aba8a93 Adding expected expect hexstring for hash for empty model and serialised model. -| |/ -* | cf7fa263 Correct issues raised by sonar: missing @Override, unused import, extra semicolon. -* | 94a65ac7 Test signing capabilites of seeded key pairs -|/ -* acbc5307 Feature/particle groups (#135) -* 5a9148e5 Changed NodeRunnerData to be serializable to conform to requirements for alphanet merge. -* 963acfd3 Merge pull request #132 from radixdlt/feature/refactor-network -|\ -| * 0360ac63 Add fixes/cleanup based on feedback -| * df94e02e Make FindANodeEpic more responsive to hard-to-connect to nodes -| * 20cd2486 Add json error data to error update -| * 56456fbe Cleanup based on review -| * 33a6e995 Some fixes -| * b29ecfed Add comments to new network classes -| * dbfdc911 Refactor Websocket connections -| * b997862c Refactor JSON RPC actions -| * 844daee9 Cleanup FindANode epic -| * c5c3d3a0 Refactor SubmitAtom flow actions -| * d24dff1b Refactor FetchAtoms flow actions -| * bb6cd3cc Refactor websocket epics -| * 2d9d4131 Cleanup of JSON RPC epics -| * 567b6bb1 Cleanup checkstyle -| * bbc86af8 Cleanup FindANode test -| * 281ae456 Cleanup reducer logic -| * 5888896c Implement shard checking -| * 05b79297 Use RadixNodeState in reducer state -| * f836f9e1 Cleanup node discovery -| * d44cb53d Implement auto websocket closing -| * 2d704931 Refactor GetNodeData -| * 13f1da03 Refactor GetLivePeers -| * 7609f983 Remove direct websocket calls -| * 4502760a Move some json rpc calls into a node update action -| * eb2b7082 Refactor node status to be updated via a reducer -| * 598e8c8a Update name from RadixPeer to RadixNode -| * f69adbc2 Implement node specific epic -| * 60edcbce Implement Discovery Epic -| * 3a87ebcf Implement Epic for handling node selecting -| * 23268c61 Implement generic network epic used for Fetching atoms -| * 4e21326a Utilize epic style flow to manage connections with atom submissions -| * 74310727 Refactor atom updates -| * e616122a Preparation for refactor -| * 8531ca3a Refactor Network Layer -|/ -* f2fe22ff Added Javadoc to UnknownTokenException as part of review feedback. -* 9ce9e1b1 Bugs and new functionality for mint/burn multi-issuance tokens. -* fd286b0c Merge pull request #129 from radixdlt/feature/resource-identifier -|\ -| * 9e24e44b Transform Radix Resource Identifier into a 1st class serialized object -| * 08ec2786 Unify ParticleIndex into a string resource identifier -* | 3fea5a1e Decrease verbosity of RadixClientSupplier logging -|/ -* 07f3c22b Make burn API arguments consistent with mint at least for now. -* 80e9bea6 Revert some excessive reformatting. -* 9b43d530 Missed autogen code removed. -* 2d4aa3e9 Fixed some line-length and copy-pasta errors. -* ad1c6018 Updated universe with granularity. -* 6e2abaf9 First draft granularity -* ef0fab63 Change universe of example to BETANET -* fadf7d99 Decrease verbosity of RadixClientSupplier logging -* e8a696a4 Merge pull request #122 from radixdlt/feature/configurable-radix-network -|\ -| * 02bc22bf Fix errors propagating through client supplier, fix network state not being cached, fix checkstyle issues -| * cb503127 FIx duplicate getNetworkState() after rebase -| * 14c473af Cleanup after rebase into develop -| * c5d4a02f Add automatic peer connect and disconnect to ClientSupplier -| * e31960ad Update sunstone universe -| * d1dc2a79 Remove Subject use in RadixJsonRpcClientTest -| * 37a1fb6c Change Subjects to Singles, add fixes based on feedback -| * 10f415ae Update tests, fix changes from reviews -| * 40b5888d Make RadixPeerState compliant with checkstyle (private memberss) -| * 551d13ee Fix relevant checkstyle violations -| * 5220ae20 Fix crash when Api.getVersion fails -| * 2be4f7b5 Change Bootstrap peerDiscovery to Supplier -| * 1f4f32b0 Add RadixPeerState, refactor filters and ClientSupplier accordingly -| * 5216d580 Update tests, rename filters and selectors to be more meaningful -| * a2a0b3f1 Fix networkState not connecting to peers in RadixNetwork -| * c83df6d6 Add filters, selectors and RadixNetworkState to RadixNetwork -| * cb3db7b2 Add RadixPeerState, refactor filters and ClientSupplier accordingly -| * 916d2b1f Update tests, rename filters and selectors to be more meaningful -| * 6e473679 Fix networkState not connecting to peers in RadixNetwork -| * 811ec3ee Add filters, selectors and RadixNetworkState to RadixNetwork -|/ -* 934b1a5b Update betanet universe -* b8c5a63d Update sunstone universe -* fc56eaa7 Merge pull request #126 from radixdlt/feature/unsubscribe -|\ -| * 891da10c Implement auto-disconnect when all Observables are disposed -|/ -* 5f90bf8e Merge pull request #127 from radixdlt/feature/wrapped-shards -|\ -| * 9cc4232f Cleanup ShardsTest -| * 606babe9 Fix wrapped shard range logic -* | 9205f1dd Fix calculation of planck time for PowFeeMapper. -|/ -* d6566855 Merge pull request #124 from radixdlt/feature/unique-particle -|\ -| * 28e16018 Cleanup documentation and class names -| * a9245d0c Implement initial mapper from atom/particle errors to application errors -| * 586fdf08 Change name of UniqueIdAction to correspond to names of other actions -| * d2159060 Add fixes based on feedback -| * bc8b87ab Add action side effects to allow for nesting and other advance useage -| * b2507274 Cleanup names -| * 90c49c60 Implement Unique Particle -| * 783699f5 Refactor RadixApplicationAPI to use aggregation of AtomMappers -| * 7178c54e Refactor RadixApplicationAPI to use aggregation of reducers + mappers -| * 870a8aa8 Refactor ApplicationStore and it's useage to be more generic -| * 03e3f126 Remove deprecated UniqueProperty classes -| * 4e451c03 Unify how addresses are determined in Particles -| * f900eaf6 Unify ParticleIndex -|/ -* 76c6f2af Add means of deterministic key pair generation -* a5622ee6 Fix TokenPermissions issue -* ca91ccb4 Merge pull request #121 from radixdlt/feature/refactor-for-encryption-testing -|\ -| * 8638ae93 Fix small issues -| * 08bd6d05 Cleanup some javadocs + NP checks -| * 4a7d757b Expose method for creating api with custom mappers -|/ -* ace3fc9f Fix javadocs -* 9a5fe140 Expose method to tell whether RadixUniverse is instantiated or not -* 2565bb98 Added redundant null checks from review feedback. -* 36f39929 Additional review feedback. -* 5598e912 Changes based on review feedback. -* 28643462 Implementation of 256-bit quantities for fungible tokens. -* 9ad96144 Use specific exception to signal problems with ledger action execution -* de2218f7 Update sunstone universe -* bbfd6579 Merge pull request #119 from radixdlt/feature/token-classes-refactor -|\ -| * 59ec3edf Update sunstone universe -| * 907f89de Add some fixes based on feedback -| * 48e46804 Add some javadocs -| * 5860427d Update to make more easily useful for acceptance tests -| * 7e70544c Refactor application actionToParticles mappers to be more modular -| * 53a8889d Remove unused class -| * c6e1a339 Move classes to appropriate application level module package -|/ -* e45cf762 Merge pull request #117 from radixdlt/feature/sensible-retry -|\ -| * d3f9b1f6 Remove unused import -| * ff889567 Update AtomFetcher and RadixNetwork tests with WebSocketException filter -| * 90857696 Fix checkstyle violations -| * 8d94348d Revert accidental change of "HelloWorld" example -| * f34a21df Add filter to RetryTimer, add WebSocketException for connection-fault-based retries -|/ -* 919fdba9 Merge pull request #116 from radixdlt/feature/action-store -|\ -| * 1b2be5e2 Add some jdocs to new classes -| * 7c562bd2 Refactor/simplification of Data Messaging module -| * e20f685c Refactor application level modules to utilize an ActionStore -* | 0b0a4a37 Fix unsubscribe RPC method name (Subscription.cancel -> Atoms.cancel) -|/ -* 7c2e459e Fix checkstyle issues -* b1178cd8 Update betanet.json after merge, fix MessageParticle passing null when metaData is empty -* d84d6907 Merge branch 'feature/add-source-to-message' into develop -|\ -| * 8f9e9d14 Revert accidental documentation change in DsonOutput (storage -> message) -| * d29cde2e Merge pull request #114 from radixdlt/feature/chronoquark-all-timestamps -| |\ -| | * 11a87a01 Improve ChronoQuark null checks -| | * 72f52a1f Update betanet.json -| | * ba0e5fbe Change Long to long in TimestampParticle.getTimestamp -| | * 6a3b033d Update betanet.json -| | * caf618f2 Make ChronoQuark hold all timestamps instead of just one -| |/ -| * 5b9cf7ae Refactor "source" to "from" in addresses, adjust names for SendMessage, simplify addresses in SendMessageAction -| * 9abf2b25 Remove unnecessary import -| * 1403df83 Fix source missing when sending token with message through API -| * 46537ff0 Add missing annotiations to source field in MessageParticle -| * ee677bc8 Refactor StorageParticle to MessageParticle, add source field -* | 32351b4e Fix checkstyle -* | 4b6937f6 Update sunstone universe -* | 50c1eea1 Expose method to create atom based on given action -* | 18a7b533 Merge branch 'feature/quark-refactor-tests' into develop -|\ \ -| |/ -|/| -| * 759be0d2 Add quark refactor tests -| * 8bca89a5 Implement Burn Token Action -| * d112a4da Refactor Mint permissions into Generic Token action permissions -| * d6b78d7f Add support for mutable tokens and minting tokens -* | 43e8ca4c Fix checkstyle issues -* | e8a11001 Merge pull request #112 from radixdlt/feature/particle-model-cleanup -|\ \ -| * | 88cd67d2 Refactor Nonfungible Quarks -* | | a809da20 Changed reference to java.awt.Container to java.util.Collection. Fix for RLAU-224. -* | | dddf54be Fix Client Selector bug which would fail if bad first node -* | | ce8906ba Merge branch 'master' into develop -|\ \ \ -| |/ / -|/| | -| * | 47714429 (tag: 0.11.6) Update README.md for new release -| * | ba1b45f8 Fix decryption bug -| * | 70df0465 Merge pull request #101 from radixdlt/feature/transfer-attachments -| |\ \ -| | * | 0420ba36 Utilize a different class for reading TokenTransfers from atoms -| |/ / -| * | 537299bf Merge pull request #100 from radixdlt/fix-too-many-connections -| |\ \ -| | * | 6930c40b Add delay in between node connection requests -| |/ / -| * | 336c846c Better error logging on RetryTimer -| * | 4978ee1b (tag: 0.11.5) 0.11.5 release -* | | e500869f (tag: witness-service) Merge pull request #110 from radixdlt/feature/mutable-supply-tokens -|\ \ \ -| * | | 409a93b5 Implement Burn Token Action -| * | | bd45b44a Refactor Mint permissions into Generic Token action permissions -| * | | ec38a33e Add support for mutable tokens and minting tokens -|/ / / -* | | 27a069ba Merge pull request #109 from radixdlt/feature/api-cleanup -|\ \ \ -| | |/ -| |/| -| * | 8dca59e0 API cleanup -|/ / -* | 7b31818c Use better values to represent spin -* | 9e824ed5 Merge branch 'betanet' into develop -|\ \ -| * \ ce3212dd Merge pull request #108 from radixdlt/feature/particle-cleanup -| |\ \ -| | * | 8f9c5c7d Refactor Cbor mapper -| | * | d1da161b Fixes based on Martin's Feedback -| | * | f5c0c4da Rename some particles and quarks -| | * | fd7d0ec9 Copy Structure of RadixCore atommodel -| | * | 0d52ab77 Use SerializerId "ADDRESS" for Address -| | * | 0aa6a70c Cleanup Address and Owner serialization -| * | | 92cfe0ed Merge pull request #107 from radixdlt/feature/particle-spin -| |\| | -| | * | 10db1cfe Update universe -| | * | de861acd Create SpunParticle which wraps a particle and its spin -| |/ / -| * | c1fa74a5 Merge pull request #102 from radixdlt/feature/structured-validation-errors -| |\ \ -| | * | 51a52bbd Fix structure of error notifications -| * | | e7d0be6d Merge pull request #106 from mpsandiford/feature/hash-serializer -| |\ \ \ -| | |/ / -| |/| | -| | * | c0b9243c Added check to ensure that classes annotated with SerializerId also include a "serializer" field somewhere in the hierarchy. -| | * | d5a8ca2e The DSON/JSON "serializer" field is now included when calculating the hash. -| |/ / -| * | 38b6d1b5 Merge pull request #105 from radixdlt/feature/particle-composition-with-serialization -| |\ \ -| | * \ 0a372bdc Merge branch 'betanet' into feature/particle-composition-with-serialization -| | |\ \ -| | |/ / -| |/| | -| * | | 5585473d Merge pull request #104 from mpsandiford/serializer2 -| |\ \ \ -| | * | | 4936e0c8 Change some entities to hex unicode to placate checkstyle. -| | | * | 870ef2bc Fix TestUtils style issues -| | | * | e2fbe669 Add missing serialized version to Particle and Quark, add TestUtils for quick hash data comparison -| | | * | 90d2c4a3 Fix style issues and javadoc issues for gradle build -| | | * | 5724766d Fix serialization issues and mismatches with core -| | | * | 83eff104 Apply quark refactor to serialization refactor (non-working commit) -| | |/ / -| | * | d3bee3f7 Tidied up Particle hierarchy. -| | * | 1cd10975 Debugging information removed. -| | * | 0a64c2f1 Formatting tweaks to shut checkstyle up. -| | * | aa706312 Tweaks to correct Peer/TCPPeer/UDPPeer hierarchy and missing no-arg constructors. -| | * | a86472c6 Changes to placate checkstyle. -| | * | 67f99fe7 Working version with RadixCore and client library. -| |/ / -| * | 44f99e3f Merge pull request #99 from radixdlt/feature/token-particle -| |\ \ -| | * | f63bb51b Add "Action" suffix to action classes -| | * | 5fcc6593 Refactor Minted particles to be a Consumable -| | * | c0544b1e Add javadocs to new classes -| | * | 219b1e3d Rename action classes to verbs -| | * | 2232886c Add more unit tests -| | * | d421bec0 Refactor to remove AtomBuilder -| | * | f356bdef Refactor Atom Construction -| | * | 72ca9711 Implement reducer + store framework -| | * | 803859bc Refactor reducers to be more reducer like -| | * | 816b36b4 Refactor AddressTokenReducer to use same interface as TokenReducer -| | * | 173b4ff4 Rename TokenReference to TokenRef -| | * | 558818f6 Expose api to get latest state of a given token -| | * | 4a851418 Use BigDecimal rather than Amount class in the API -| | * | 23f62f50 Utilize account+ISO for token uniqueness -| | * | a7102760 Utilize Token object as the Token Reference -| | * | da54f933 Remove RadixWallet -| | * | f9bc624e Utilize ISO of token rather than EUID to identify consumable -| | * | c48e1570 Replace TransactionAtoms with a more generic ValidAtomFilter -| | * | 9bb5f7a6 Remove subunits from tokens -| | * | c1e46c5c Refactor Particle Store to be more generic -| | * | fe5b7a40 Retrieve Tokens from universe rather than hardcode -| | * | 4f087e8f Use addresses rather than EUID destinations for determining shards -| | * | a47e4ef1 Add simple support for receiving 3rd party tokens -| | * | 3edca70c Allow only one owner per consumable -| | * | fc632cc0 Move particles into their own package -| | * | 33f51d51 Add API to create a token -| | * | 0c54f078 Refactor AtomBuilder -| | * | 9844df31 Refactor Asset to be a Token application object -| | * | bb79b5b6 Update betanet universe -| |/ / -| * | 0034c707 Merge branch 'master' into betanet -| |\| -| | * c9a77443 Merge pull request #94 from radixdlt/particle-store -| | |\ -| | | * 7a7ffb5d Fix compile errs after rebase -| | | * 08078b1c Add Unit Test to test caching -| | | * 815d60e5 Utilize reducers for managing dapp state -| | | * 37f2b667 Particle store to return all particles associated to an address -| | | * beedd517 Use RadixAddress rather than EUID in interfaces between modules -| | |/ -| | * 37cbcb53 Merge pull request #96 from radixdlt/fix-connection-errs -| | |\ -| | | * 57c4bc40 Use better err messages in RPC/WS clients -| | | * d600ff89 Fix node rotation on failure -| | |/ -| | * 4b43fc96 Fix toAddress when sending to self -| | * 8dda2181 Added JitPack badge to README.md -| | * 2259c8ac (tag: 0.11.4) Releasing 0.11.4 -| | * 3d671df2 Update sunstone universe -| * | 459e4e24 Merge pull request #97 from radixdlt/consumable-refactor -| |\ \ -| | * | 25a93487 Remove AbstractConsumable -| |/ / -| * | 4bec5b8b Merge pull request #95 from radixdlt/atom-model-refactor-poc -| |\ \ -| | * | 25006fef Update universe -| | * | 98fbaa1a Refactor Spin to be an enum rather than a number -| | * | 3985350c Hack to make planck timestamps work for now -| | * | f9253a04 Fix issue with atom collisions -| | * | 4d582efc Update universe -| | * | aa438ad8 Refactor Transfers -| | * | 4b90fa50 Fix TransferParticle -| | * | 86d48425 Fix POW Fee Validation -| | * | fd59a5ab Refactor Data Particles to be accepted by Core json schema validator -| | * | 01a62c44 Refactor Atom to use a single list of generic particles -| | * | 2588e206 Remove deprecated properties in Atom -| |/ / -| * | 2cb86977 Merge branch 'master' into betanet -| |\| -| * | 860c9dee Merge remote-tracking branch 'origin/master' into betanet -| |\ \ -| * \ \ c0e8fcff Merge pull request #90 from radixdlt/master-to-betanet -| |\ \ \ -| | * | | a2159363 Remove universe check for betanet -| | * | | ce78c839 Merge branch 'master' into master-to-betanet -| | |\ \ \ -| | * | | | e9c2d765 Add asset particle type -| | * | | | 5cb6c064 Fix javadocs -| |/ / / / -| * | | | 1163c4fe Merge pull request #84 from mpsandiford/serialize1 -| |\ \ \ \ -| | * | | | cddd62c6 Corrected DsonTest - note that RadixUniverseConfig isn't designed for DSON serialization. -| | * | | | 2d2738a1 Update betanet universe with updated JSON encoding -| | * | | | eb43e111 Fix for metadata serialization. Client and server now talking correctly. -| | * | | | 52a4bdda First draft of new serialization. -| | * | | | 629ed2d5 Bump sonarqube minor version. -| | * | | | f3afd2c7 Bump shadow plugin minor version. -| | * | | | 7f93fd15 Revised DSON interface in line with current serialize1 branch on RadixCore. -| |/ / / / -| * | | | 11cb4cb9 Merge pull request #83 from radixdlt/encryptor-refactor -| |\ \ \ \ -| | * | | | e077c0bf Some fixes based on Feedback from Martin -| | * | | | c58368cd Change json to application/json for contentType -| | * | | | 7536d47a Utilize contentType metadata for encryptor data particle -| | * | | | ee1c4410 Remove encryptor property in Atom and utilize DataParticle List -| | * | | | 32c98ef5 Reuse DataParticle for Encryptor Object -| |/ / / / -| * | | | f4689f7c Merge branch 'master' into betanet -| |\ \ \ \ -| * \ \ \ \ df397903 Merge remote-tracking branch 'origin/master' into betanet -| |\ \ \ \ \ -| * \ \ \ \ \ e9a05c51 Merge pull request #80 from radixdlt/chrono-refactor -| |\ \ \ \ \ \ -| | * | | | | | 61d11356 Refactor Atom timestamps to be ChronoParticle -| |/ / / / / / -| * | | | | | f648b52c Remove API Check for betanet -| * | | | | | 3c22c704 Merge branch 'master' into 'betanet' -| |\ \ \ \ \ \ -| * | | | | | | 0868082e Add more descriptive Exception messages -| * | | | | | | d6c1c436 Merge pull request #78 from radixdlt/transaction-refactor -| |\ \ \ \ \ \ \ -| | * | | | | | | 1c9aa2a9 Add TODO documentation to Atom -| | * | | | | | | 5d3b09ec Separate Consumers and Consumables -| | * | | | | | | 783b1d29 Replace Particle with AbstractConsumable for Token Transfer operations -| |/ / / / / / / -| * | | | | | | 2e3d411b Merge branch 'master' into betanet -| |\ \ \ \ \ \ \ -| * \ \ \ \ \ \ \ 068dab1a Merge pull request #77 from radixdlt/unique-nulljunk-refactor -| |\ \ \ \ \ \ \ \ -| | * \ \ \ \ \ \ \ fc5481bd Merge branch 'unique-property' into unique-nulljunk-refactor -| | |\ \ \ \ \ \ \ \ -| | * | | | | | | | | 5e328dbc Move uniqueParticle outside of particle list of atom -| | * | | | | | | | | 1d613a7a Refactor JunkParticle and IdParticle into UniqueParticle -| |/ / / / / / / / / -| * | | | | | | | | 07339d33 Merge branch 'master' into betanet -| |\ \ \ \ \ \ \ \ \ -| * \ \ \ \ \ \ \ \ \ f5f981d5 Merge pull request #73 from radixdlt/metadata -| |\ \ \ \ \ \ \ \ \ \ -| | * | | | | | | | | | 3cd8b0e1 Fix small issues -| | * | | | | | | | | | abe76632 Merge remote-tracking branch 'origin/betanet' into metadata -| | |\ \ \ \ \ \ \ \ \ \ -| | |/ / / / / / / / / / -| |/| | | | | | | | | | -| * | | | | | | | | | | 1e2e1927 Merge pull request #72 from radixdlt/data-particle -| |\ \ \ \ \ \ \ \ \ \ \ -| | * | | | | | | | | | | a019a43e Fix EncryptorParticle creation issue -| | * | | | | | | | | | | a0324db9 Use LinkedHashMap for predictable ordering for DSON -| * | | | | | | | | | | | 4e6cbce5 Merge branch 'master' into betanet -| |\ \ \ \ \ \ \ \ \ \ \ \ -| | | | * | | | | | | | | | cbf68822 Add a way to get all debug data for Atom Submission Update -| | | | * | | | | | | | | | 700f4662 Add Data Particle Unit Tests -| | | | * | | | | | | | | | 41b7a0eb Implement metaData in DataParticle -| | | |/ / / / / / / / / / -| | | * | | | | | | | | | bac58744 Add documentation -| | | * | | | | | | | | | 30a147de Merge remote-tracking branch 'origin/betanet' into data-particle -| | | |\ \ \ \ \ \ \ \ \ \ -| | |_|/ / / / / / / / / / -| |/| | | | | | | | | | | -| * | | | | | | | | | | | 85586324 Merge pull request #71 from radixdlt/atom-refactor -| |\ \ \ \ \ \ \ \ \ \ \ \ -| | | | * | | | | | | | | | 89493be0 Refactor Encryptor into an EncryptorParticle -| | | | * | | | | | | | | | a0065806 Refactor AtomSubmissionUpdate to have arbitrary debug data -| | | | * | | | | | | | | | 6aafe71f Implement DataParticle structure -| | | |/ / / / / / / / / / -| | |/| | | | | | | | | | -| | * | | | | | | | | | | 211ca2a7 Fix checkstyle -| | * | | | | | | | | | | 604a8c16 Merge branch 'betanet' into atom-refactor -| | |\ \ \ \ \ \ \ \ \ \ \ -| | |/ / / / / / / / / / / -| |/| | | | | | | | | | | -| * | | | | | | | | | | | f88f5fd0 Merge pull request #70 from mpsandiford/shardhigh -| |\ \ \ \ \ \ \ \ \ \ \ \ -| | * | | | | | | | | | | | 8805e6f1 Shard IDs are now the high-order word of EUIDs. -| |/ / / / / / / / / / / / -| | * | | | | | | | | | | 2b3d045e Fix NPE for atoms with no particles -| | * | | | | | | | | | | 141a7038 Refactor Asset to become a property of an Atom -| | * | | | | | | | | | | d57d24fe Cleanup unneeded code after Atom consolidation -| | * | | | | | | | | | | d508de9c Consolidate PayloadAtom into one Atom class -| | * | | | | | | | | | | 6fd851d0 Remove deprecated functionality from Payload Atoms -| | * | | | | | | | | | | 071add54 Consolidate Transaction Atom into Payload Atom -| | * | | | | | | | | | | a26b71c6 Merge branch 'betanet' into atom-refactor -| | |\ \ \ \ \ \ \ \ \ \ \ -| | |/ / / / / / / / / / / -| |/| | | | | | | | | | | -| * | | | | | | | | | | | 575a6b94 Merge pull request #69 from mpsandiford/sha256iso -| |\ \ \ \ \ \ \ \ \ \ \ \ -| | * | | | | | | | | | | | 63f44126 Updated betanet.json to match universe key in the default.config file on RadixCore sha256iso branch. -| | * | | | | | | | | | | | 1b1701f1 Assets now calculate their ID as the sha256 hash of the "ISO" code UTF-8 representation. Previously IDs were calculated using the Java "hashCode()" value. Note that universe files have not been regenerated. Old ones are incompatible with this change. -| |/ / / / / / / / / / / / -| | * | | | | | | | | | | d1cab8c2 Remove Null Atom -| | * | | | | | | | | | | 48067299 Consolidate Transaction Atom and Payload Atom into a single Atom -| |/ / / / / / / / / / / -| * | | | | | | | | | | 7a9ca6e9 Merge branch 'master' into betanet -| |\ \ \ \ \ \ \ \ \ \ \ -| * \ \ \ \ \ \ \ \ \ \ \ 5f6e562b Merge remote-tracking branch 'origin/master' into betanet -| |\ \ \ \ \ \ \ \ \ \ \ \ -| * | | | | | | | | | | | | 1f325d71 Use hex to represent EUIDs -| * | | | | | | | | | | | | 51a69ad4 Add a more descriptive exception for json rpc errors -| * | | | | | | | | | | | | f4d9c9e4 Add betanet configuration -| * | | | | | | | | | | | | 6fa571c9 Merge remote-tracking branch 'mpsandiford/euid128' into betanet -| |\ \ \ \ \ \ \ \ \ \ \ \ \ -| | * | | | | | | | | | | | | cceca517 Replaced 96-bit EUID assumption in test case with 128-bit assumption. -| | * | | | | | | | | | | | | d000fa4d Minor whitespace changes to placate checkstyle. -| | * | | | | | | | | | | | | 3ada7f49 Modifications to work with RadixCore euid128 change. -| |/ / / / / / / / / / / / / -* | | | | | | | | | | | | | eff2c7d5 Merge pull request #93 from radixdlt/head-support -|\ \ \ \ \ \ \ \ \ \ \ \ \ \ -| |_|_|_|_|_|_|_|_|_|_|_|_|/ -|/| | | | | | | | | | | | | -| * | | | | | | | | | | | | 233fca26 Use flatMap rather than flatMapIterable for Head support -| * | | | | | | | | | | | | bf6881ad Get rid of debouncer for consumable detection, utilize HEAD instead -| * | | | | | | | | | | | | 91c8c2bb Utilize AtomObservations in subscriptions rather than just Raw Atoms -| * | | | | | | | | | | | | 18420d2b Remove AtomQuery class -|/ / / / / / / / / / / / / -* | | | | | | | | | | | | ff4dbca2 (tag: 0.11.3) Update README for hotfix release -* | | | | | | | | | | | | e3928623 Fix retrieving atoms from other addresses -| |_|_|_|_|_|_|_|_|_|_|/ -|/| | | | | | | | | | | -* | | | | | | | | | | | 6eb053c9 (tag: 0.11.2) Update README for hotfix release -* | | | | | | | | | | | 3124e166 Merge pull request #91 from radixdlt/identities-hotfix -|\ \ \ \ \ \ \ \ \ \ \ \ -| |_|_|_|_|_|_|_|_|_|_|/ -|/| | | | | | | | | | | -| * | | | | | | | | | | f931cceb Make sure to flush new identities created -|/ / / / / / / / / / / -* | | | | | | | | | | 6a8fbd6c (tag: 0.11.1) Update README -* | | | | | | | | | | 347eddde Handle initial connection errors more gracefully -* | | | | | | | | | | 46291b5e (tag: 0.11.0) Merge pull request #88 from radixdlt/connections-refactor -|\ \ \ \ \ \ \ \ \ \ \ -| * | | | | | | | | | | 30d8cf22 Update README -| * | | | | | | | | | | e24ae1a2 Add ability for dapp to prefetch atoms -| * | | | | | | | | | | 30c90870 Cleanup/refactor of Ledger interface -| * | | | | | | | | | | e5b526a5 Refactor of RadixLedger into smaller modules -| * | | | | | | | | | | 63982e0b Implement an AtomStore interface, in memory implementation for now -| * | | | | | | | | | | c46eb403 Remove dependency of ConsumableDataSource in RadixApplicationAPI -| * | | | | | | | | | | c5bdb1f0 Remove RadixApplicationAPI dependency on RadixLedger -| * | | | | | | | | | | 669f2a30 Utilize a cache to store all atoms for a given shard -| * | | | | | | | | | | ce09dff3 Remove AtomClass from AtomQuery -|/ / / / / / / / / / / -* | | | | | | | | | | 46f1ba80 Merge pull request #87 from radixdlt/wallet-refactor -|\ \ \ \ \ \ \ \ \ \ \ -| * | | | | | | | | | | f1288aba Change ordering of parameters to sendWhenAvailable for consistency -| * | | | | | | | | | | d1da48b2 Change ordering to wallet send action parameters -| * | | | | | | | | | | 68326439 Use format specifiers rather than String concatenation for logging -| * | | | | | | | | | | c339cf4f Simplify API naming scheme of native wallet -|/ / / / / / / / / / / -* | | | | | | | | | | aec0c283 Merge pull request #86 from radixdlt/network-fix -|\ \ \ \ \ \ \ \ \ \ \ -| * | | | | | | | | | | f58162e7 Include gradle repositories in radixdlt-java subproject -| * | | | | | | | | | | 818a1d15 Retry on findPeers error -| * | | | | | | | | | | 3a0a1f82 Move universe check into RadixLedger from RadixNetwork -|/ / / / / / / / / / / -* | | | | | | | | | | 588e9c7b Merge pull request #85 from radixdlt/parse-universe -|\ \ \ \ \ \ \ \ \ \ \ -| * | | | | | | | | | | cb4ba006 Add Universe check with connecting node -| * | | | | | | | | | | 6e98e549 Remove UnknownAtom class -|/ / / / / / / / / / / -* | | | | | | | | | / fe1c9a6f Add method to create a universe config from base64 dson -| |_|_|_|_|_|_|_|_|/ -|/| | | | | | | | | -* | | | | | | | | | dd6f09f5 Refactor to simplify RadixApplicationAPI unit test -| |_|_|_|_|_|_|_|/ -|/| | | | | | | | -* | | | | | | | | fa650df0 Merge pull request #82 from radixdlt/refactor-identity -|\ \ \ \ \ \ \ \ \ -| * | | | | | | | | f88de2e8 Expose API to get all data at an address -| * | | | | | | | | 882e27e3 Refactor Identity classes -|/ / / / / / / / / -* | | | | | | | | 05d88764 Merge pull request #81 from radixdlt/highgarden -|\ \ \ \ \ \ \ \ \ -| * | | | | | | | | e0a64bfb highgarden universe changed (again) -|/ / / / / / / / / -* | | | | | | | | fc467d57 Remove API Check -* | | | | | | | | e3ac9e4c Merge pull request #62 from nadam/master -|\ \ \ \ \ \ \ \ \ -| |_|_|_|_|_|_|_|/ -|/| | | | | | | | -| * | | | | | | | 20b698fc Merge branch 'master' into master -| |\ \ \ \ \ \ \ \ -| |/ / / / / / / / -|/| | | | | | | | -* | | | | | | | | c7479bb0 Merge pull request #79 from radixdlt/api-version-check -|\ \ \ \ \ \ \ \ \ -| * | | | | | | | | 9e78b799 Implement API Version Check with Server -|/ / / / / / / / / -| * / / / / / / / 249c26a6 Support for alternative storage using Reader and Writer in the constructors. Improved exception declarations. -|/ / / / / / / / -* | | | | | | | 495d4f2a (tag: 0.10.2) Add method to create Amount from a BigDecimal -* | | | | | | | 9927b70a Update highgarden universe -* | | | | | | | 933a4a47 (tag: 0.10.1) Update README.md with new release version -* | | | | | | | 4e41ca07 (tag: 0.10.0) Add temporary hack to allow data with no applicationId to be submitted -| |_|_|_|_|_|/ -|/| | | | | | -* | | | | | | 0a304f0a Cleanup README.md -* | | | | | | e6822a5b Merge pull request #76 from radixdlt/unique-property -|\ \ \ \ \ \ \ -| | |_|_|_|_|/ -| |/| | | | | -| * | | | | | b9965d08 Remove unused import -| * | | | | | d3eb30b8 Fix name UNKNOWN_ERROR -| * | | | | | 1ec3bbf3 Implement toCompletable in TransferResult Class -| * | | | | | 2a29a50b Fix NPE -| * | | | | | ac9b7d84 Add uniqueable transactions to wallet api -| * | | | | | 0d8eef35 Create Unique Property application layer object -|/ / / / / / -* | | | | / 6a71f52b Fix README -| |_|_|_|/ -|/| | | | -* | | | | 27589126 Merge pull request #75 from juztamau5/java-10 -|\ \ \ \ \ -| * | | | | 53c0d9f3 Gradle: Update Mockito to version 2.17.0 -| | |_|_|/ -| |/| | | -* | | | | e46df95b (tag: v0.10.0) Merge pull request #74 from radixdlt/documentation -|\ \ \ \ \ -| |/ / / / -|/| | | | -| * | | | f5a65b6a Update release version -| * | | | e08b3c98 Remove unused import -| * | | | 93144f99 Update README documentation -| * | | | e82a1f61 Add API method to retrieve Public Key of user -| * | | | 4d10017b Rename XRD asset to TEST for testnets -| * | | | 01754409 Refactor AssetAmount and use in the Application API -| * | | | 2f7032d5 Add Unit Tests for the Application Level Data object -| * | | | 10e8dffb Change method names of Application API -|/ / / / -* | | / 2f4cc4f0 Add Documentation and another method in Radix Wallet -| |_|/ -|/| | -* | | 55eba167 Merge pull request #68 from radixdlt/application-layer -|\ \ \ -| |_|/ -|/| | -| * | e13deef1 Include Payload attachments to Token Transfers -| * | 7848737a Refactor RadixIdentity to use Application Layer Objects for decryption -| * | eaca720e Move Identity module to be a higher level Application Layer construct -| * | 8c2e73dd Refactor Data Application Layer Objects encryption structure -| * | f00bd8f7 Include timestamp in TokenTransfer action object -| * | 976feee3 Fix name of TokenTransferTranslator -| * | ccb7ea2d Handle translating Emissions -| * | 6a0297fb Use Observable rather than Completable for Transfer results -| * | 2f6027e9 Refactor wallet to utilize Token Transfer Application Layer Spec -| * | 2c9cead4 Fix issue where unsubscribed API calls were not being executed -| * | 86863c68 Create a Consumable Data source abstraction -| * | 2c2c552d Increase Coverage of RadixApplicationAPI Junit Test -| * | 5691f282 Move wallet and messaging into separate dapps package -| * | eae6f5e8 Merge branch 'master' into application-layer -| |\ \ -| |/ / -|/| | -* | | b6a5dd80 Merge pull request #66 from radixdlt/data-application-layer -|\ \ \ -| |_|/ -|/| | -| | * 4792e06a Add JUnit test for RadixApplicationAPI -| | * 8e0c1ece Refactor application package -| |/ -| * ee492e0a Create subscribe application layer action which retrieves all data -| * e8da5154 Include a default universe RadixApplicationAPI constructor -| * f919c13b Remove unused classes and methods from refactor -| * 03b5e116 Refactor RadixMessaging to use application layer -| * a5d0f33b Implement storeData method in Application Layer -| * 02b36440 Remove complex examples -|/ -* b64eecc8 Merge pull request #64 from radixdlt/websocket-refactor -|\ -| * e4dc4fef Test for failures in PeersFromSeed -| * dd1d834d Refactor PeersFromSeed to be more easily unit tested -| * f801b872 Add WebSocketClient Unit tests for websocket failures -| * 6a7531dd Use Request class to specify endpoint for WebSocketClient -| * d85b25be Remove WebSocketClient inheritance of WebSocketListener -|/ -* 6fb0481d Fix unused import -* a508687e Fix file separator issue for resource loading on Windows -* 863e23b8 Merge pull request #61 from radixdlt/jwt-service -|\ -| * 118dae27 Add WalletTransaction getAmount Test -| * 8f9eb2db Add Helper function for retrieving all senders of a Transaction Atom -| * 222340d0 Add ability to use unique ID particle for messaging -|/ -* 61aa03aa Merge pull request #60 from radixdlt/faucet-refactor -|\ -| * 1fe76af4 Move faucet address calculation to be a local variable -| * 5864605e Simplify Faucet flow logic -| * 137f7088 Fix imports to satisfy sonarqube -| * c3534e1a Refactor Faucet to make use of a simple RateLimiter -| * 159ba546 Utilize groupedObservable for managing sessions between addresses -| * 807fa12d Add Simple CreateReply test for Messages -| * 8fc2cfc9 Create RadixMessage helper method createReply -* | 38817736 Merge pull request #58 from nadam/master -|\ \ -| |/ -|/| -| * 10c4aa16 Moved isPowerOfTen() to the class where it's used -| * 48291651 Minor -| * abd14a97 Decimal format for assets that have a fixed number of decimals -| * 1fae51b0 Decimal format of assets that are powers of 10 -* | dcced3c7 (tag: 0.9.3) Merge pull request #57 from radixdlt/fix-errorcrashandroid -|\ \ -| * | 8b14f14a Keep on retrying with backoff if connection to node-finder fails -| * | 0270ee74 Handle errors when failing to find Peers which will prevent Android apps from crashing. -| |/ -* | 0884ec95 Merge pull request #59 from radixdlt/fix-bcandroid -|\ \ -| |/ -|/| -| * 1341cd0c Remove deprecated wallet test -| * 7ddaaa4c Ensure Bouncy Castle when used on Android uses the correct provider on class initialisation. -|/ -* 9b5b6036 Merge pull request #53 from radixdlt/sonarcloud-fixes -|\ -| * ace056b4 Add junit test for HttpClient creation -| * 83b9a4bb Fix HttpClients -|/ -* 8d58b6c6 Merge pull request #51 from radixdlt/universe-json-support -|\ -| * 518a5df2 Remove unused imports -| * 561f7f72 Add getConfig method to RadixUniverse -| * ef80eda6 Add JSON support for retrieving universe information -|/ -* c0474440 Merge pull request #52 from radixdlt/refactor-universeconfig -|\ -| * 0cc2fd4a Add the hashCode method that got deleted. -| * c8d711d9 Refactor Universe config to use files located in resources folder. -* | 91cab485 Merge pull request #50 from radixdlt/lurker-api -|\ \ -| |/ -|/| -| * 151d62c3 Fix atom submission bug -| * d14a7b9e Use better names for jsonRpc calls -| * 65a2d18a Add JUnit test for cancelling subscriptions -| * 6fc0164f Utilize generic subscription method for JSON-RPC subscriptions -| * b315fe1d Use generic json-rpc method call for subscription calls -| * 336ce9f7 Refactor of callJsonRpcMethod to be more generic -|/ -* 099727e2 Merge pull request #48 from radixdlt/fix-sonarcloud-bugs -|\ -| * 0fbecf6e Resource closing and other minor fixes -|/ -* c7a1b614 Merge pull request #44 from radixdlt/fix-equals -|\ -| * 756d5a4b Better checks for equals() -|/ -* 919fd77e Merge pull request #26 from radixdlt/getatom-api -|\ -| * 4307d4c0 Expose API for retrieving an atom by HID -|/ -* c5c44877 Merge pull request #30 from radixdlt/refactor-radix-client -|\ -| * c30685a3 Add Javadocs to RadixJsonRpcClient -| * 15bee259 Remove deprecated code from RadixJsonRpcClient -| * 3ff29dbc Refactor submitAtom to utilize observables logic -| * c3ccb5d6 Add basic submitAtom JUnit Test -| * 361d2638 Refactor getAtoms to utilize observables logic -| * 41630469 Add basic getAtoms JUnit Test -| * 8f255809 Fix checkstyle for new classes -| * c86019e9 Merge remote-tracking branch 'origin/master' into refactor-radix-client -| |\ -| |/ -|/| -* | 2cff8919 Merge pull request #29 from radixdlt/android-bc-compatibility -|\ \ -| * | 0585f6fe No default constructor for AndroidUtil utility class -| * | 4aa53015 Merge remote-tracking branch 'origin/master' into android-bc-compatibility -| |\ \ -| |/ / -|/| | -* | | 891d688f Merge pull request #28 from radixdlt/checkstyle -|\ \ \ -| * | | 0d215264 Fixes for checkstyle -| * | | 2a9f6670 Enabled checkstyle -| * | | 4a57e83c travis: multiple build stages -|/ / / -| * / b0d9db97 Android ships with an old version of BouncyCastle hence to ensure we use the version shipped with the library the BC provider has to first be removed. -|/ / -* | 51280702 fixed badge links -* | 0a847e49 Merge pull request #24 from radixdlt/travis-ci -|\ \ -| * | 99b6f275 enabled jacoco and sonarqube -| * | cefedf74 renamed .travis-ci.yml -> .travis.yml -|/ / -| * 85c1346f Remove some logging -| * 362e2ebd Reuse same observable logic in getLivePeers -| * dcfacf59 Add error test in JsonRpcClient -| * 97c64759 Add getSelf unit test for JsonRpcClient -| * ed637834 Change RadixClient to more descriptive name RadixJsonRpcClient -| * ce8d028f Decoupled Network specific logic from RadixClient.java -| * ab2e0122 Merge remote-tracking branch 'origin/travis-ci' -|/| -| * ec09ae78 enabled jacoco and sonarqube -| * 876ccada update .travis.yml -| * fd64af5c renamed .travis-ci.yml -> .travis.yml -* | 88d157d8 Merge pull request #21 from radixdlt/dynamic_versions -|\ \ -| |/ -|/| -| * a2512b07 changed to dynamic version based on git describe -* | a7919102 Merge pull request #23 from radixdlt/refactor-tests -|\ \ -| * | d6d55deb Don't remove BouncyCastleProvider before inserting it -| * | 120de6cb Refactor TransactionAtomsTest -| * | 7d69a8b3 Use a supplier for OkHttpClient -| * | a87b78f9 Refactor ECKeyPairGenerator -| * | e1ff959c Remove use of getUnconsumedConsumables -| * | a3d4187c Remove dependency on bouncycastle in RadixAtomValidatorTest -| * | d3d41019 Remove dependency on bouncycastle in RadixMessagingTest -* | | 5b278cec Integrated Travis CI -| |/ -|/| -* | 86cc2331 Merge pull request #20 from radixdlt/fix-faucet -|\ \ -| |/ -|/| -| * e858e50e Fix InsufficientFundsException message -|/ -* bba3f892 Merge pull request #19 from radixdlt/jitpack -|\ -| * 5eed33d2 changed from bintray -> jitpack -* | c6f488f1 Merge pull request #18 from nadam/master -|\| -| * be871353 Renamed "change" to "amount" and added some JavaDoc -|/ -* d591dea8 (tag: 0.9.2) Merge pull request #7 from radixdlt/refactor-address -|\ -| * 2fcc0e8b Refactor RadixAddress and particle owner checks -|/ -* 91e93014 (tag: 0.9.1) update install notes - its now mirrored in jcenter -* bd80218c fixed exception about missing bintrayUser property -* 280e7baf Fixed empty jar in 0.9.0 -* c7d4c732 (tag: 0.9.0) fixed install instructions in README.md -* 349c668d publish all artifacts needed by jcenter/mavenCentral -* c75f336d release version 0.9.0 -* 1c59692d Set theme jekyll-theme-hacker -* 82246fde Initial release for alpha diff --git a/radixdlt-java/src/main/java/com/radixdlt/client/application/RadixApplicationAPI.java b/radixdlt-java/src/main/java/com/radixdlt/client/application/RadixApplicationAPI.java index 9a48f4ea5..ce0adc000 100644 --- a/radixdlt-java/src/main/java/com/radixdlt/client/application/RadixApplicationAPI.java +++ b/radixdlt-java/src/main/java/com/radixdlt/client/application/RadixApplicationAPI.java @@ -44,13 +44,13 @@ import com.radixdlt.client.application.translate.data.AtomToDecryptedMessageMapper; import com.radixdlt.client.application.translate.data.CRUDataUpdate; import com.radixdlt.client.application.translate.data.AtomToCRUDataUpdateMapper; -import com.radixdlt.client.application.translate.data.CreateDataAction; +import com.radixdlt.client.application.translate.data.CreateCRUDataAction; import com.radixdlt.client.application.translate.data.CreateDataToParticleGroupsMapper; import com.radixdlt.client.application.translate.data.DecryptedMessage; import com.radixdlt.client.application.translate.data.SendMessageAction; import com.radixdlt.client.application.translate.data.SendMessageToParticleGroupsMapper; -import com.radixdlt.client.application.translate.data.UpdateDataAction; -import com.radixdlt.client.application.translate.data.UpdateDataToParticleGroupsMapper; +import com.radixdlt.client.application.translate.data.UpdateCRUDataAction; +import com.radixdlt.client.application.translate.data.UpdateCRUDataToParticleGroupsMapper; import com.radixdlt.client.application.translate.tokens.AtomToTokenTransfersMapper; import com.radixdlt.client.application.translate.tokens.BurnTokensAction; import com.radixdlt.client.application.translate.tokens.BurnTokensActionMapper; @@ -152,10 +152,10 @@ public static RadixApplicationAPIBuilder defaultBuilder() { SendMessageAction.class, new SendMessageToParticleGroupsMapper(ECKeyPair::generateNew) ) - .addStatelessParticlesMapper(CreateDataAction.class, new CreateDataToParticleGroupsMapper()) + .addStatelessParticlesMapper(CreateCRUDataAction.class, new CreateDataToParticleGroupsMapper()) .addStatelessParticlesMapper(CreateTokenAction.class, new CreateTokenToParticleGroupsMapper()) .addStatelessParticlesMapper(PutUniqueIdAction.class, new PutUniqueIdToParticleGroupsMapper()) - .addStatefulParticlesMapper(UpdateDataAction.class, new UpdateDataToParticleGroupsMapper()) + .addStatefulParticlesMapper(UpdateCRUDataAction.class, new UpdateCRUDataToParticleGroupsMapper()) .addStatefulParticlesMapper(MintTokensAction.class, new MintTokensActionMapper()) .addStatefulParticlesMapper(BurnTokensAction.class, new BurnTokensActionMapper()) .addStatefulParticlesMapper(TransferTokensAction.class, new TransferTokensToParticleGroupsMapper()) @@ -444,49 +444,49 @@ public Result sendMessage(RadixAddress toAddress, byte[] data, boolean encrypt) return execute(sendMessageAction); } - /** - * Returns a never ending stream of data stored at a given address. The pull() - * method must be called to continually retrieve the latest messages. - * - * @param address the address to retrieve data from - * @return a cold observable of the messages at the given address - */ - public Observable observeData(RadixAddress address) { - Objects.requireNonNull(address); - return observeActions(CRUDataUpdate.class, address); - } - - /** - * Creates a data resource and store it - * - * @param rri the resource which will be associated with this data - * @param data to be store - * @return result of the create data action - */ - public Result createData(RRI rri, byte[] data) { - RadixAddress address = getAddress(); - if (!rri.getAddress().equals(address)) { - throw new IllegalArgumentException(); - } - CreateDataAction createDataAction = CreateDataAction.create(rri, data); - return execute(createDataAction); - } - - /** - * Update an existing data resource - * - * @param rri the resource which is associated with this data - * @param data new version of data - * @return result of the send message execution - */ - public Result updateData(RRI rri, byte[] data) { - RadixAddress address = getAddress(); - if (!rri.getAddress().equals(address)) { - throw new IllegalArgumentException(); - } - UpdateDataAction updateAction = UpdateDataAction.create(rri, data); - return execute(updateAction); - } + /** + * Returns a never ending stream of data stored at a given address. The pull() + * method must be called to continually retrieve the latest messages. + * + * @param address the address to retrieve data from + * @return a cold observable of the messages at the given address + */ + public Observable observeData(RadixAddress address) { + Objects.requireNonNull(address); + return observeActions(CRUDataUpdate.class, address); + } + + /** + * Creates a data resource and stores it. + * + * @param rri the resource which will be associated with this data + * @param data to be storedg + * @return result of the create data action + */ + public Result createData(RRI rri, byte[] data) { + RadixAddress address = getAddress(); + if (!rri.getAddress().equals(address)) { + throw new IllegalArgumentException(); + } + CreateCRUDataAction createDataAction = CreateCRUDataAction.create(rri, data); + return execute(createDataAction); + } + + /** + * Update an existing data resource + * + * @param rri the resource which is associated with this data + * @param data new version of data + * @return result of the send message execution + */ + public Result updateData(RRI rri, byte[] data) { + RadixAddress address = getAddress(); + if (!rri.getAddress().equals(address)) { + throw new IllegalArgumentException(); + } + UpdateCRUDataAction updateAction = UpdateCRUDataAction.create(rri, data); + return execute(updateAction); + } /** * Returns a never ending stream of token transfers stored at the current address. diff --git a/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/AtomToCRUDataUpdateMapper.java b/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/AtomToCRUDataUpdateMapper.java index 11f971df2..49f2d7de5 100644 --- a/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/AtomToCRUDataUpdateMapper.java +++ b/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/AtomToCRUDataUpdateMapper.java @@ -45,14 +45,14 @@ public Class actionClass() { @Override public Observable map(Atom atom, RadixIdentity identity) { - long timestamp = atom.getTimestamp(); - List dataUpdates = atom.spunParticles() - .map(SpunParticle::getParticle) - .filter(p -> p instanceof CRUDataParticle) - .map(CRUDataParticle.class::cast) - .map(p -> new CRUDataUpdate(p.getRRI(), p.data(), timestamp, p.euid())) - .collect(Collectors.toList()); - return Observable.fromIterable(dataUpdates); + long timestamp = atom.getTimestamp(); + List dataUpdates = atom.spunParticles() + .map(SpunParticle::getParticle) + .filter(p -> p instanceof CRUDataParticle) + .map(CRUDataParticle.class::cast) + .map(p -> new CRUDataUpdate(p.getRRI(), p.data(), timestamp, p.euid())) + .collect(Collectors.toList()); + return Observable.fromIterable(dataUpdates); } } diff --git a/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/CRUDataMissingException.java b/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/CRUDataMissingException.java new file mode 100644 index 000000000..a7639e412 --- /dev/null +++ b/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/CRUDataMissingException.java @@ -0,0 +1,61 @@ +/* + * (C) Copyright 2020 Radix DLT Ltd + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the “Software”), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +package com.radixdlt.client.application.translate.data; + +import com.radixdlt.client.application.translate.StageActionException; +import com.radixdlt.identifiers.RRI; +import java.util.Objects; + +public class CRUDataMissingException extends StageActionException { + private final RRI rri; + private final int nRecords; + + public CRUDataMissingException(RRI cruDataRri, int nRecords) { + super("Could not find CRU data " + cruDataRri + " to update"); + this.rri = cruDataRri; + this.nRecords = nRecords; + } + + public RRI rri() { + return this.rri; + } + + public int nRecords() { + return this.nRecords; + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof CRUDataMissingException)) { + return false; + } + + CRUDataMissingException that = (CRUDataMissingException) obj; + return this.nRecords == that.nRecords && Objects.equals(this.rri, that.rri); + } + + @Override + public int hashCode() { + return this.nRecords * 31 + Objects.hashCode(this.rri); + } +} diff --git a/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/CRUDataUpdate.java b/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/CRUDataUpdate.java index d450bbb7a..9e2d3ad16 100644 --- a/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/CRUDataUpdate.java +++ b/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/CRUDataUpdate.java @@ -23,6 +23,9 @@ package com.radixdlt.client.application.translate.data; +import java.util.Arrays; +import java.util.Objects; + import com.radixdlt.identifiers.EUID; import com.radixdlt.identifiers.RRI; import com.radixdlt.utils.Bytes; @@ -34,8 +37,8 @@ public class CRUDataUpdate { private final RRI rri; private final byte[] data; - private final long timestamp; private final EUID actionId; + private final transient long timestamp; public CRUDataUpdate(RRI rri, byte[] data, long timestamp, EUID actionId) { this.rri = rri; @@ -45,25 +48,60 @@ public CRUDataUpdate(RRI rri, byte[] data, long timestamp, EUID actionId) { } /** - * The unique id for the this message action - * @return euid for the action + * The unique id for the this update action. + * @return {@link EUID} for the action */ public EUID getActionId() { - return actionId; + return this.actionId; } + /** + * The data from this update action. + * @return the data for the action + */ public byte[] getData() { return data; } + /** + * The timestamp from this update action. + *

+ * Timestamp is in milliseconds since Unix epoch. + * + * @return the timestamp for the action + */ public long getTimestamp() { return timestamp; } + /** + * The resource identifier for this update action. + * @return the resource identifier for the action + */ public RRI rri() { return rri; } + @Override + public int hashCode() { + return Objects.hash(this.actionId, this.rri) + * 31 + Arrays.hashCode(this.data); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj instanceof CRUDataUpdate) { + CRUDataUpdate that = (CRUDataUpdate) obj; + return Objects.equals(this.actionId, that.actionId) + && Objects.equals(this.rri, that.rri) + && Arrays.equals(this.data, that.data); + } + return false; + } + @Override public String toString() { return timestamp + " " + rri + " " + Bytes.toHexString(data); diff --git a/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/UpdateDataAction.java b/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/CreateCRUDataAction.java similarity index 64% rename from radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/UpdateDataAction.java rename to radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/CreateCRUDataAction.java index 943d797e1..2b0c0b3f4 100644 --- a/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/UpdateDataAction.java +++ b/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/CreateCRUDataAction.java @@ -26,33 +26,35 @@ import com.radixdlt.client.application.translate.Action; import com.radixdlt.identifiers.RRI; +import com.radixdlt.utils.Bytes; /** - * An Action object which sends a data transaction from one account to another. + * An Action object which create a CRU data object. */ -public final class UpdateDataAction implements Action { - private final RRI rri; - private final byte[] data; - - private UpdateDataAction(RRI rri, byte[] data) { - this.rri = rri; - this.data = Objects.requireNonNull(data); - } - - public static UpdateDataAction create(RRI rri, byte[] data) { - return new UpdateDataAction(rri, data); - } - - public byte[] getData() { - return data; - } - - public RRI getRRI() { - return rri; - } - - @Override - public String toString() { - return "Updating data FOR resource " + rri; - } +public final class CreateCRUDataAction implements Action { + private final RRI rri; + private final byte[] data; + + private CreateCRUDataAction(RRI rri, byte[] data) { + this.rri = rri; + this.data = Objects.requireNonNull(data); + } + + public static CreateCRUDataAction create(RRI rri, byte[] data) { + return new CreateCRUDataAction(rri, data); + } + + public byte[] getData() { + return this.data; + } + + public RRI getRRI() { + return this.rri; + } + + @Override + public String toString() { + String dataString = this.data == null ? "null" : Bytes.toBase64String(this.data); + return String.format("%s[%s:%s]", getClass().getSimpleName(), this.rri, dataString); + } } diff --git a/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/CreateDataToParticleGroupsMapper.java b/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/CreateDataToParticleGroupsMapper.java index 98818f82f..dca6c20ce 100644 --- a/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/CreateDataToParticleGroupsMapper.java +++ b/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/CreateDataToParticleGroupsMapper.java @@ -32,24 +32,23 @@ import com.radixdlt.client.core.atoms.particles.SpunParticle; /** - * Maps a send message action to the particles necessary to be included in an - * atom. + * Maps a create CRU data action to the particles necessary to be included in an atom. */ -public class CreateDataToParticleGroupsMapper implements StatelessActionToParticleGroupsMapper { +public class CreateDataToParticleGroupsMapper implements StatelessActionToParticleGroupsMapper { - private static final int INITIAL_VERSION = 0; + private static final int INITIAL_VERSION = 0; - /** - * - * @param action the action to mapToParticles to particles - * @return observable of spunparticles to be included in an atom for a given - * action - */ - @Override - public List mapToParticleGroups(CreateDataAction action) { - RRIParticle rriParticle = new RRIParticle(action.getRRI()); - CRUDataParticle cruParticule = new CRUDataParticle(action.getRRI(), INITIAL_VERSION, action.getData()); - ParticleGroup particleGroup = ParticleGroup.of(SpunParticle.down(rriParticle), SpunParticle.up(cruParticule)); - return Collections.singletonList(particleGroup); - } + /** + * Create {@link ParticleGroup} objects representing the specified user action. + * + * @param action the action to mapToParticles to particles + * @return observable of particle groups to be included in an atom for a given action + */ + @Override + public List mapToParticleGroups(CreateCRUDataAction action) { + RRIParticle rriParticle = new RRIParticle(action.getRRI()); + CRUDataParticle cruParticule = new CRUDataParticle(action.getRRI(), INITIAL_VERSION, action.getData()); + ParticleGroup particleGroup = ParticleGroup.of(SpunParticle.down(rriParticle), SpunParticle.up(cruParticule)); + return Collections.singletonList(particleGroup); + } } diff --git a/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/CreateDataAction.java b/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/UpdateCRUDataAction.java similarity index 74% rename from radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/CreateDataAction.java rename to radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/UpdateCRUDataAction.java index 2d1a9958e..63eb24145 100644 --- a/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/CreateDataAction.java +++ b/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/UpdateCRUDataAction.java @@ -26,33 +26,35 @@ import com.radixdlt.client.application.translate.Action; import com.radixdlt.identifiers.RRI; +import com.radixdlt.utils.Bytes; /** - * An Action object which sends a data transaction from one account to another. + * An Action object which updates a CRU data object. */ -public final class CreateDataAction implements Action { +public final class UpdateCRUDataAction implements Action { private final RRI rri; private final byte[] data; - private CreateDataAction(RRI rri, byte[] data) { + private UpdateCRUDataAction(RRI rri, byte[] data) { this.rri = rri; this.data = Objects.requireNonNull(data); } - public static CreateDataAction create(RRI rri, byte[] data) { - return new CreateDataAction(rri, data); + public static UpdateCRUDataAction create(RRI rri, byte[] data) { + return new UpdateCRUDataAction(rri, data); } public byte[] getData() { - return data; + return this.data; } public RRI getRRI() { - return rri; + return this.rri; } @Override public String toString() { - return "Updating data FOR resource" + rri; + String dataString = this.data == null ? "null" : Bytes.toBase64String(this.data); + return String.format("%s[%s:%s]", getClass().getSimpleName(), this.rri, dataString); } } diff --git a/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/UpdateDataToParticleGroupsMapper.java b/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/UpdateCRUDataToParticleGroupsMapper.java similarity index 56% rename from radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/UpdateDataToParticleGroupsMapper.java rename to radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/UpdateCRUDataToParticleGroupsMapper.java index 10fc8e968..aaeba627a 100644 --- a/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/UpdateDataToParticleGroupsMapper.java +++ b/radixdlt-java/src/main/java/com/radixdlt/client/application/translate/data/UpdateCRUDataToParticleGroupsMapper.java @@ -29,7 +29,6 @@ import com.google.common.collect.ImmutableSet; import com.radixdlt.client.application.translate.ShardedParticleStateId; -import com.radixdlt.client.application.translate.StageActionException; import com.radixdlt.client.application.translate.StatefulActionToParticleGroupsMapper; import com.radixdlt.client.atommodel.cru.CRUDataParticle; import com.radixdlt.client.core.atoms.ParticleGroup; @@ -38,32 +37,34 @@ import com.radixdlt.identifiers.RRI; import com.radixdlt.identifiers.RadixAddress; +/** + * Creates {@link ParticleGroup} objects for specified CRU data update. + */ +public class UpdateCRUDataToParticleGroupsMapper implements StatefulActionToParticleGroupsMapper { + @Override + public Set requiredState(UpdateCRUDataAction updateDataAction) { + RadixAddress address = updateDataAction.getRRI().getAddress(); + return ImmutableSet.of(ShardedParticleStateId.of(CRUDataParticle.class, address)); + } -public class UpdateDataToParticleGroupsMapper implements StatefulActionToParticleGroupsMapper { - - @Override - public Set requiredState(UpdateDataAction updateDataAction) { - RadixAddress address = updateDataAction.getRRI().getAddress(); - return ImmutableSet.of(ShardedParticleStateId.of(CRUDataParticle.class, address)); - } - - @Override - public List mapToParticleGroups(UpdateDataAction updateDataAction, Stream store) throws StageActionException { - RRI rri = updateDataAction.getRRI(); - List particles = store.collect(Collectors.toList()); - List records = particles.stream() - .filter(p -> p instanceof CRUDataParticle) - .map(CRUDataParticle.class::cast) - .filter(p -> p.getRRI().equals(rri)) - .collect(Collectors.toList()); - if (records.size() != 1) { - String msg = String.format("Broken storage (%s) %s", records.size(), particles); - throw new StageActionException(msg) { }; - } - CRUDataParticle prevData = records.get(0); - CRUDataParticle newData = new CRUDataParticle(rri, prevData.serialno() + 1, updateDataAction.getData()); - ParticleGroup particleGroup = ParticleGroup.of(SpunParticle.down(prevData), SpunParticle.up(newData)); - return Collections.singletonList(particleGroup); - } + @Override + public List mapToParticleGroups(UpdateCRUDataAction updateDataAction, Stream store) throws CRUDataMissingException { + RRI rri = updateDataAction.getRRI(); + List particles = store.collect(Collectors.toList()); + List records = particles.stream() + .filter(p -> p instanceof CRUDataParticle) + .map(CRUDataParticle.class::cast) + .filter(p -> p.getRRI().equals(rri)) + .collect(Collectors.toList()); + if (records.size() != 1) { + // Serious problem if records is not empty, as this means that there is more than one CRU Data particle + assert records.isEmpty(); + throw new CRUDataMissingException(rri, records.size()); + } + CRUDataParticle prevData = records.get(0); + CRUDataParticle newData = new CRUDataParticle(rri, prevData.serialno() + 1, updateDataAction.getData()); + ParticleGroup particleGroup = ParticleGroup.of(SpunParticle.down(prevData), SpunParticle.up(newData)); + return Collections.singletonList(particleGroup); + } } diff --git a/radixdlt-java/src/main/java/com/radixdlt/client/atommodel/cru/CRUDataParticle.java b/radixdlt-java/src/main/java/com/radixdlt/client/atommodel/cru/CRUDataParticle.java index ebe3a3d2d..8eb5f935d 100644 --- a/radixdlt-java/src/main/java/com/radixdlt/client/atommodel/cru/CRUDataParticle.java +++ b/radixdlt-java/src/main/java/com/radixdlt/client/atommodel/cru/CRUDataParticle.java @@ -1,9 +1,3 @@ -package com.radixdlt.client.atommodel.cru; - -import java.util.Objects; - -import javax.annotation.concurrent.Immutable; - /* * (C) Copyright 2020 Radix DLT Ltd * @@ -20,6 +14,9 @@ * either express or implied. See the License for the specific * language governing permissions and limitations under the License. */ +package com.radixdlt.client.atommodel.cru; + +import javax.annotation.concurrent.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; import com.radixdlt.client.atommodel.Identifiable; @@ -31,56 +28,66 @@ import com.radixdlt.utils.Bytes; /** - * Particle representing a fixed supply token definition + * Particle representing data that can be created, read and updated. */ @Immutable @SerializerId2("radix.particles.cru") public final class CRUDataParticle extends Particle implements Identifiable { - // Account and lookup key - @JsonProperty("rri") - @DsonOutput(Output.ALL) - private RRI rri; + // Account and lookup key + @JsonProperty("rri") + @DsonOutput(Output.ALL) + private RRI rri; - // Serial / version number for updates - // First creation must == 0, updates incrementing monotonically - @JsonProperty("serialno") - @DsonOutput(Output.ALL) - private long serialno; + // Serial / version number for updates + // First creation must == 0, updates incrementing monotonically + @JsonProperty("serialno") + @DsonOutput(Output.ALL) + private long serialno; - // The actual data - @JsonProperty("data") - @DsonOutput(Output.ALL) - private byte[] data; + // The actual data + @JsonProperty("data") + @DsonOutput(Output.ALL) + private byte[] data; - CRUDataParticle() { - super(); - } + CRUDataParticle() { + super(); + } - public CRUDataParticle(RRI rri, long serialno, byte[] data) { - super(rri.getAddress().euid()); + public CRUDataParticle(RRI rri, long serialno, byte[] data) { + super(rri.getAddress().euid()); - this.rri = rri; - this.serialno = serialno; - this.data = Objects.requireNonNull(data); - } + this.rri = rri; + this.serialno = serialno; + this.data = data; + } @Override public RRI getRRI() { return this.rri; } - public long serialno() { - return this.serialno; - } + /** + * Retrieve the serial number of this particle. + * @return the serial number. + */ + public long serialno() { + return this.serialno; + } - public byte[] data() { - return this.data.clone(); - } + /** + * Retrieve the data for this particle. + *

+ * Note that callers should not modify the contents of the returned array. + * @return the particle data. + */ + public byte[] data() { + return this.data; + } - @Override - public String toString() { - String stringData = this.data == null ? "" : Bytes.toHexString(this.data); - return String.format("%s[(%s:%s), (%s)]", getClass().getSimpleName(), String.valueOf(this.rri), this.serialno, stringData); - } -} \ No newline at end of file + @Override + public String toString() { + String stringData = this.data == null ? "" : Bytes.toHexString(this.data); + return String.format("%s[(%s:%s), (%s)]", getClass().getSimpleName(), String.valueOf(this.rri), this.serialno, stringData); + } +} diff --git a/radixdlt-java/src/test/java/com/radixdlt/client/application/translate/data/CRUDataUpdateTest.java b/radixdlt-java/src/test/java/com/radixdlt/client/application/translate/data/CRUDataUpdateTest.java index df291a9d4..d8516b2f7 100644 --- a/radixdlt-java/src/test/java/com/radixdlt/client/application/translate/data/CRUDataUpdateTest.java +++ b/radixdlt-java/src/test/java/com/radixdlt/client/application/translate/data/CRUDataUpdateTest.java @@ -1,3 +1,25 @@ +/* + * (C) Copyright 2020 Radix DLT Ltd + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the “Software”), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + package com.radixdlt.client.application.translate.data; import static org.assertj.core.api.Assertions.assertThat; @@ -21,49 +43,49 @@ import com.radixdlt.identifiers.RadixAddress; public class CRUDataUpdateTest { - @Test - public void testCreateMapper() { - RadixAddress address = RadixAddress.from("JEbhKQzBn4qJzWJFBbaPioA2GTeaQhuUjYWkanTE6N8VvvPpvM8"); - RRI rri = RRI.of(address, "TestData"); - byte[] data = new byte[128]; - Arrays.fill(data, (byte) 0xFE); - CreateDataAction createDataAction = CreateDataAction.create(rri, data); - CreateDataToParticleGroupsMapper mapper = new CreateDataToParticleGroupsMapper(); - List particleGroups = mapper.mapToParticleGroups(createDataAction); - assertThat(particleGroups).hasSize(1); - ImmutableList spunParticles = particleGroups.get(0).getSpunParticles(); - assertThat(spunParticles.get(0).getParticle()).isInstanceOf(RRIParticle.class); - assertThat(spunParticles.get(1).getParticle()).isInstanceOf(CRUDataParticle.class); - } + @Test + public void testCreateMapper() { + RadixAddress address = RadixAddress.from("JEbhKQzBn4qJzWJFBbaPioA2GTeaQhuUjYWkanTE6N8VvvPpvM8"); + RRI rri = RRI.of(address, "TestData"); + byte[] data = new byte[128]; + Arrays.fill(data, (byte) 0xFE); + CreateCRUDataAction createDataAction = CreateCRUDataAction.create(rri, data); + CreateDataToParticleGroupsMapper mapper = new CreateDataToParticleGroupsMapper(); + List particleGroups = mapper.mapToParticleGroups(createDataAction); + assertThat(particleGroups).hasSize(1); + ImmutableList spunParticles = particleGroups.get(0).getSpunParticles(); + assertThat(spunParticles.get(0).getParticle()).isInstanceOf(RRIParticle.class); + assertThat(spunParticles.get(1).getParticle()).isInstanceOf(CRUDataParticle.class); + } - @Test - public void testUpdateMapper() { - RadixAddress address = RadixAddress.from("JEbhKQzBn4qJzWJFBbaPioA2GTeaQhuUjYWkanTE6N8VvvPpvM8"); - RRI rri = RRI.of(address, "TestData"); - byte[] data = new byte[128]; - Arrays.fill(data, (byte) 0xFE); - UpdateDataAction updateDataAction = UpdateDataAction.create(rri, data); - UpdateDataToParticleGroupsMapper mapper = new UpdateDataToParticleGroupsMapper(); - Set state = mapper.requiredState(updateDataAction); - assertThat(state).hasSize(1); - } + @Test + public void testUpdateMapper() { + RadixAddress address = RadixAddress.from("JEbhKQzBn4qJzWJFBbaPioA2GTeaQhuUjYWkanTE6N8VvvPpvM8"); + RRI rri = RRI.of(address, "TestData"); + byte[] data = new byte[128]; + Arrays.fill(data, (byte) 0xFE); + UpdateCRUDataAction updateDataAction = UpdateCRUDataAction.create(rri, data); + UpdateCRUDataToParticleGroupsMapper mapper = new UpdateCRUDataToParticleGroupsMapper(); + Set state = mapper.requiredState(updateDataAction); + assertThat(state).hasSize(1); + } - @Test - public void testUpdateAction() { - RadixAddress address = RadixAddress.from("JEbhKQzBn4qJzWJFBbaPioA2GTeaQhuUjYWkanTE6N8VvvPpvM8"); - RRI rri = RRI.of(address, "TestData"); - byte[] data = new byte[128]; - Arrays.fill(data, (byte) 0xFE); - UpdateDataAction updateDataAction = UpdateDataAction.create(rri, data); - List items = new ArrayList<>(); - CRUDataParticle oldData = new CRUDataParticle(rri, 0, new byte[64]); - items.add(oldData); - Stream store = items.stream(); - UpdateDataToParticleGroupsMapper mapper = new UpdateDataToParticleGroupsMapper(); - List groups = mapper.mapToParticleGroups(updateDataAction, store); - assertThat(groups).hasSize(1); - ImmutableList spunParticles = groups.get(0).getSpunParticles(); - assertThat(spunParticles.get(0).getParticle()).isInstanceOf(CRUDataParticle.class); - assertThat(spunParticles.get(1).getParticle()).isInstanceOf(CRUDataParticle.class); - } -} \ No newline at end of file + @Test + public void testUpdateAction() { + RadixAddress address = RadixAddress.from("JEbhKQzBn4qJzWJFBbaPioA2GTeaQhuUjYWkanTE6N8VvvPpvM8"); + RRI rri = RRI.of(address, "TestData"); + byte[] data = new byte[128]; + Arrays.fill(data, (byte) 0xFE); + UpdateCRUDataAction updateDataAction = UpdateCRUDataAction.create(rri, data); + List items = new ArrayList<>(); + CRUDataParticle oldData = new CRUDataParticle(rri, 0, new byte[64]); + items.add(oldData); + Stream store = items.stream(); + UpdateCRUDataToParticleGroupsMapper mapper = new UpdateCRUDataToParticleGroupsMapper(); + List groups = mapper.mapToParticleGroups(updateDataAction, store); + assertThat(groups).hasSize(1); + ImmutableList spunParticles = groups.get(0).getSpunParticles(); + assertThat(spunParticles.get(0).getParticle()).isInstanceOf(CRUDataParticle.class); + assertThat(spunParticles.get(1).getParticle()).isInstanceOf(CRUDataParticle.class); + } +}