Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/onflow/cadence into supun…
Browse files Browse the repository at this point in the history
…/sync-v1.0-master
  • Loading branch information
SupunS committed Oct 8, 2024
2 parents 9e12a05 + ed99fbf commit 4de9544
Show file tree
Hide file tree
Showing 38 changed files with 10,163 additions and 913 deletions.
6,028 changes: 5,478 additions & 550 deletions CHANGELOG.md

Large diffs are not rendered by default.

93 changes: 2 additions & 91 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,51 +6,16 @@ listed in no particular order.

## High Priority

- Reliability

Cadence should run deterministically, and should not have crashers, stack overflows, or security issues.

- Performance

Cadence's checker is currently not optimized for performance.
We are making performance improvements, mainly by profiling it using real-world programs
and optimizing hot paths, as well as avoiding unnecessary work (e.g. tracking position information).

Cadence programs are also currently executed using a tree-walking interpreter,
which is easy to modify and useful for debugging. However, it is not optimized for performance.
We are investigating compilation to improve performance.
Potential targets / inspirations are WebAssembly, MoveVM, and IELE.

## Lower Priority

- [Testing of Cadence programs](https://github.com/onflow/cadence/issues/330)

Cadence should provide means to test code.

- Storage API

- [Storage querying API](https://github.com/onflow/cadence/issues/208)

Cadence should provide an API to query/iterate over account storage.

- [Storage API improvements](https://github.com/onflow/cadence/issues/376)
- Standard Library

Cadence should provide APIs to overwrite and remove stored values.

- [Scripts should have access to authorized accounts](https://github.com/onflow/cadence/issues/539)


- Extensibility

Cadence should provide means to extend existing types with additional functionality
even when those types did not explicitly provide mechanisms to do so.
This would be very useful and would increase future-proofing code.

However, it might have a negative impact on explicitness/discoverability,
i.e it might be hard for a user to understand where a definition originates from
if it wasn't defined in the type's original set of functions.
It might also have system and security implications.
A solution needs to take these issues into account.
## Lower Priority

- Host interface

Expand All @@ -70,19 +35,10 @@ listed in no particular order.

Cadence should offer a tool that generates human-readable documentation for programs.

- Improving type inference

- [Improve the inferred type of conditional statements and expressions](http://github.com/onflow/cadence/issues/61),
binary expressions and literal expressions (e.g. arrays and dictionaries).

- Type aliases

Cadence should provide a way to define type aliases.

- `Word128` and `Word256` types

Cadence should provide `Word128` and `Word256` types, just like it provides `UInt128` and `UInt256`

- ABI generation and code generation

Cadence should offer a tool to generate an ABI file, a description
Expand All @@ -96,12 +52,6 @@ listed in no particular order.
From an ABI source code could be generated that would allow client libraries
to call Cadence programs in a type-safe way.

- Code size reduction

Cadence programs are currently stored in source code form on-chain.

Cadence should offer a more efficient format that is optimized for size and read time.

- Allow import statements to specify the hash of the imported contract

Cadence programs can import other programs.
Expand Down Expand Up @@ -152,20 +102,6 @@ listed in no particular order.

Cadence should provide an XOR operator (`^`): logical for booleans and bitwise for integers.

- Debugger

Cadence should offer a debugger, which would assist developers with debugging issues.

This could be done as a command line tool, potentially integrated into the command line runner
and/or REPL.

Another opportunity could be implementing the debugger as a server process
that implements the
[Debug Adapter Protocol](https://microsoft.github.io/debug-adapter-protocol/),
which would allow multiple editors to debug Cadence programs,
just like the language server implements the Language Server Protocol
to allow different editors to provide editing features for Cadence code.

- Loose mode / Gradual typing

Cadence should have a mode that does not require type annotations and which performs
Expand Down Expand Up @@ -223,12 +159,6 @@ listed in no particular order.

Optimize the performance by reducing the number of actual copies through copy-on-write.

- Interface requirements

Cadence should allow interfaces to require conforming types to also conform to other interfaces,
e.g. the interface declaration `interface I3: I1, I2 {}` requires conforming types
to also conform to interfaces `I1` and `I2`.

- Built-in types to work with timestamps and durations

Cadence should offer two new built in types: `Timestamp` and `Duration`,
Expand Down Expand Up @@ -257,13 +187,6 @@ listed in no particular order.
might be useful in the blocktime field,
given that the block rate might be >1 block/sec at some point.

- Exposing entropy, safe random functionality

Cadence should provide a way to get safe random numbers.

This could potentially be based on a callback mechanism,
which depends on contexts and a service chunk in the block.

- Re-entrancy

Cadence should provide means to prevent re-entrancy attacks.
Expand Down Expand Up @@ -296,19 +219,7 @@ listed in no particular order.

- [Support more code-suggestions/auto-completions](https://github.com/onflow/cadence/issues/531)

- [Make the Crypto contract compatible with Ethereum](https://github.com/onflow/cadence/issues/537)

Cadence should offer a mechanism to verify an Ethereum signature, ideally a personal signed message.

For this to be possible, the Crypto contract needs support for the Keccak hashing algorithm,
and the signature verification method must allow providing a custom tag,
e.g. the Ethereum personal signed message prefix.

- Extend paths

Cadence should [allow values like types, numbers, and addresses to be included in paths](https://github.com/onflow/cadence/issues/538).
Currently paths only consist of a domain and an identifier.

- Extend run-time types

Cadence should [allow run-time types to be tested for subtyping relationships](https://github.com/onflow/cadence/issues/473)
8 changes: 3 additions & 5 deletions bump-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ esac
echo "$v => $v2"

for f in $VERSIONED_FILES; do \
prevCount=$(grep -c -i "$v2" "$f")

# Replace the version.
echo "- $f"; \
if [[ "$OSTYPE" == "darwin"* ]]; then
Expand All @@ -38,9 +36,9 @@ for f in $VERSIONED_FILES; do \
fi

# Check if the version has being properly replaced.
newCount=$(grep -c -i "$v2" "$f")
if [[ $newCount -le $prevCount ]]; then
echo "fail to update version in '$f'"
git diff --exit-code -s "$f"
if [[ $? -ne 1 ]]; then
echo "failed to update version in '$f'"
exit 1
fi
done
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ require (
github.com/kr/pretty v0.3.1
github.com/leanovate/gopter v0.2.9
github.com/logrusorgru/aurora/v4 v4.0.0
github.com/onflow/atree v0.8.0-rc.6
github.com/onflow/atree v0.8.0
github.com/rivo/uniseg v0.4.4
github.com/schollz/progressbar/v3 v3.13.1
github.com/stretchr/testify v1.9.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db h1:62I3jR2Em
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/onflow/atree v0.8.0-rc.6 h1:GWgaylK24b5ta2Hq+TvyOF7X5tZLiLzMMn7lEt59fsA=
github.com/onflow/atree v0.8.0-rc.6/go.mod h1:yccR+LR7xc1Jdic0mrjocbHvUD7lnVvg8/Ct1AA5zBo=
github.com/onflow/atree v0.8.0 h1:qg5c6J1gVDNObughpEeWm8oxqhPGdEyGrda121GM4u0=
github.com/onflow/atree v0.8.0/go.mod h1:yccR+LR7xc1Jdic0mrjocbHvUD7lnVvg8/Ct1AA5zBo=
github.com/onflow/crypto v0.25.0 h1:BeWbLsh3ZD13Ej+Uky6kg1PL1ZIVBDVX+2MVBNwqddg=
github.com/onflow/crypto v0.25.0/go.mod h1:C8FbaX0x8y+FxWjbkHy0Q4EASCDR9bSPWZqlpCLYyVI=
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
Expand Down

Large diffs are not rendered by default.

Loading

0 comments on commit 4de9544

Please sign in to comment.